@Test public void testConstruct() throws Exception { TableInfo<Foo, String> tableInfo = new TableInfo<Foo, String>(connectionSource, null, Foo.class); Foo foo = tableInfo.createObject(); assertNotNull(foo); }
public T createObject() throws SQLException { try { T instance; ObjectFactory<T> factory = null; if (baseDaoImpl != null) { factory = baseDaoImpl.getObjectFactory(); } if (factory == null) { instance = constructor.newInstance(); } else { instance = factory.createObject(constructor, baseDaoImpl.getDataClass()); } wireNewInstance(baseDaoImpl, instance); return instance; } catch (Exception e) { throw SqlExceptionUtil.create("Could not create object for " + constructor.getDeclaringClass(), e); } }
TableInfo { public T createObject() throws SQLException { try { T instance; ObjectFactory<T> factory = null; if (baseDaoImpl != null) { factory = baseDaoImpl.getObjectFactory(); } if (factory == null) { instance = constructor.newInstance(); } else { instance = factory.createObject(constructor, baseDaoImpl.getDataClass()); } wireNewInstance(baseDaoImpl, instance); return instance; } catch (Exception e) { throw SqlExceptionUtil.create("Could not create object for " + constructor.getDeclaringClass(), e); } } }
TableInfo { public T createObject() throws SQLException { try { T instance; ObjectFactory<T> factory = null; if (baseDaoImpl != null) { factory = baseDaoImpl.getObjectFactory(); } if (factory == null) { instance = constructor.newInstance(); } else { instance = factory.createObject(constructor, baseDaoImpl.getDataClass()); } wireNewInstance(baseDaoImpl, instance); return instance; } catch (Exception e) { throw SqlExceptionUtil.create("Could not create object for " + constructor.getDeclaringClass(), e); } } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass);  TableInfo(DatabaseType databaseType, BaseDaoImpl<T, ID> baseDaoImpl, DatabaseTableConfig<T> tableConfig); }
TableInfo { public T createObject() throws SQLException { try { T instance; ObjectFactory<T> factory = null; if (baseDaoImpl != null) { factory = baseDaoImpl.getObjectFactory(); } if (factory == null) { instance = constructor.newInstance(); } else { instance = factory.createObject(constructor, baseDaoImpl.getDataClass()); } wireNewInstance(baseDaoImpl, instance); return instance; } catch (Exception e) { throw SqlExceptionUtil.create("Could not create object for " + constructor.getDeclaringClass(), e); } } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass);  TableInfo(DatabaseType databaseType, BaseDaoImpl<T, ID> baseDaoImpl, DatabaseTableConfig<T> tableConfig); Class<T> getDataClass(); String getTableName(); FieldType[] getFieldTypes(); FieldType getFieldTypeByColumnName(String columnName); FieldType getIdField(); Constructor<T> getConstructor(); String objectToString(T object); T createObject(); boolean isUpdatable(); boolean isForeignAutoCreate(); FieldType[] getForeignCollections(); boolean hasColumnName(String columnName); }
TableInfo { public T createObject() throws SQLException { try { T instance; ObjectFactory<T> factory = null; if (baseDaoImpl != null) { factory = baseDaoImpl.getObjectFactory(); } if (factory == null) { instance = constructor.newInstance(); } else { instance = factory.createObject(constructor, baseDaoImpl.getDataClass()); } wireNewInstance(baseDaoImpl, instance); return instance; } catch (Exception e) { throw SqlExceptionUtil.create("Could not create object for " + constructor.getDeclaringClass(), e); } } TableInfo(ConnectionSource connectionSource, BaseDaoImpl<T, ID> baseDaoImpl, Class<T> dataClass);  TableInfo(DatabaseType databaseType, BaseDaoImpl<T, ID> baseDaoImpl, DatabaseTableConfig<T> tableConfig); Class<T> getDataClass(); String getTableName(); FieldType[] getFieldTypes(); FieldType getFieldTypeByColumnName(String columnName); FieldType getIdField(); Constructor<T> getConstructor(); String objectToString(T object); T createObject(); boolean isUpdatable(); boolean isForeignAutoCreate(); FieldType[] getForeignCollections(); boolean hasColumnName(String columnName);  }