@Test public void testDatabaseTableConfig() throws SQLException { DatabaseTableConfig<DatabaseTableAnno> dbTableConf = DatabaseTableConfig.fromClass(connectionSource, DatabaseTableAnno.class); assertEquals(DatabaseTableAnno.class, dbTableConf.getDataClass()); assertEquals(TABLE_NAME, dbTableConf.getTableName()); dbTableConf.extractFieldTypes(connectionSource); FieldType[] fieldTypes = dbTableConf.getFieldTypes(databaseType); assertEquals(1, fieldTypes.length); assertEquals("stuff", fieldTypes[0].getColumnName()); }
public DatabaseTableConfig() { }
DatabaseTableConfig { public DatabaseTableConfig() { } }
DatabaseTableConfig { public DatabaseTableConfig() { } DatabaseTableConfig();  DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig> fieldConfigs);  DatabaseTableConfig(Class<T> dataClass, String tableName, List<DatabaseFieldConfig> fieldConfigs); private  DatabaseTableConfig(Class<T> dataClass, String tableName, FieldType[] fieldTypes); }
DatabaseTableConfig { public DatabaseTableConfig() { } DatabaseTableConfig();  DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig> fieldConfigs);  DatabaseTableConfig(Class<T> dataClass, String tableName, List<DatabaseFieldConfig> fieldConfigs); private  DatabaseTableConfig(Class<T> dataClass, String tableName, FieldType[] fieldTypes); void initialize(); Class<T> getDataClass(); void setDataClass(Class<T> dataClass); String getTableName(); void setTableName(String tableName); void setFieldConfigs(List<DatabaseFieldConfig> fieldConfigs); void extractFieldTypes(ConnectionSource connectionSource); FieldType[] getFieldTypes(DatabaseType databaseType); List<DatabaseFieldConfig> getFieldConfigs(); Constructor<T> getConstructor(); void setConstructor(Constructor<T> constructor); static DatabaseTableConfig<T> fromClass(ConnectionSource connectionSource, Class<T> clazz); static String extractTableName(Class<T> clazz); static Constructor<T> findNoArgConstructor(Class<T> dataClass); }
DatabaseTableConfig { public DatabaseTableConfig() { } DatabaseTableConfig();  DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig> fieldConfigs);  DatabaseTableConfig(Class<T> dataClass, String tableName, List<DatabaseFieldConfig> fieldConfigs); private  DatabaseTableConfig(Class<T> dataClass, String tableName, FieldType[] fieldTypes); void initialize(); Class<T> getDataClass(); void setDataClass(Class<T> dataClass); String getTableName(); void setTableName(String tableName); void setFieldConfigs(List<DatabaseFieldConfig> fieldConfigs); void extractFieldTypes(ConnectionSource connectionSource); FieldType[] getFieldTypes(DatabaseType databaseType); List<DatabaseFieldConfig> getFieldConfigs(); Constructor<T> getConstructor(); void setConstructor(Constructor<T> constructor); static DatabaseTableConfig<T> fromClass(ConnectionSource connectionSource, Class<T> clazz); static String extractTableName(Class<T> clazz); static Constructor<T> findNoArgConstructor(Class<T> dataClass);  }