|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.j256.ormlite.table.DatabaseTableConfig<T>
public class DatabaseTableConfig<T>
Database table configuration information either supplied by Spring or direct Java wiring or from a
DatabaseTable
annotation.
Constructor Summary | |
---|---|
DatabaseTableConfig()
|
|
DatabaseTableConfig(Class<T> dataClass,
List<DatabaseFieldConfig> fieldConfigs)
Setup a table config associated with the dataClass and field configurations. |
|
DatabaseTableConfig(Class<T> dataClass,
String tableName,
List<DatabaseFieldConfig> fieldConfigs)
Setup a table config associated with the dataClass, table-name, and field configurations. |
Method Summary | ||
---|---|---|
void |
extractFieldTypes(ConnectionSource connectionSource)
Extract the field types from the fieldConfigs if they have not already been configured. |
|
static
|
extractIdFieldType(ConnectionSource connectionSource,
Class<T> clazz,
String tableName)
Find and return the field-type of the id field in this class. |
|
static
|
extractTableName(Class<T> clazz)
Extract and return the table name for a class. |
|
static
|
findNoArgConstructor(Class<T> dataClass)
Locate the no arg constructor for the class. |
|
static
|
fromClass(ConnectionSource connectionSource,
Class<T> clazz)
Extract the DatabaseTableConfig for a particular class by looking for class and field annotations. |
|
Constructor<T> |
getConstructor()
Return the constructor for this class. |
|
Class<T> |
getDataClass()
|
|
List<DatabaseFieldConfig> |
getFieldConfigs()
|
|
FieldType[] |
getFieldTypes(DatabaseType databaseType)
Return the field types associated with this configuration. |
|
String |
getTableName()
|
|
void |
initialize()
Initialize the class if this is being called with Spring. |
|
void |
setConstructor(Constructor<T> constructor)
|
|
void |
setDataClass(Class<T> dataClass)
|
|
void |
setFieldConfigs(List<DatabaseFieldConfig> fieldConfigs)
|
|
void |
setTableName(String tableName)
Set the table name which is turned into lowercase. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DatabaseTableConfig()
public DatabaseTableConfig(Class<T> dataClass, List<DatabaseFieldConfig> fieldConfigs)
public DatabaseTableConfig(Class<T> dataClass, String tableName, List<DatabaseFieldConfig> fieldConfigs)
Method Detail |
---|
public void initialize()
public Class<T> getDataClass()
public void setDataClass(Class<T> dataClass)
public String getTableName()
public void setTableName(String tableName)
public void setFieldConfigs(List<DatabaseFieldConfig> fieldConfigs)
public void extractFieldTypes(ConnectionSource connectionSource) throws SQLException
SQLException
public FieldType[] getFieldTypes(DatabaseType databaseType) throws SQLException
SQLException
public List<DatabaseFieldConfig> getFieldConfigs()
public Constructor<T> getConstructor()
public void setConstructor(Constructor<T> constructor)
public static <T> DatabaseTableConfig<T> fromClass(ConnectionSource connectionSource, Class<T> clazz) throws SQLException
SQLException
public static <T> String extractTableName(Class<T> clazz)
public static <T> FieldType extractIdFieldType(ConnectionSource connectionSource, Class<T> clazz, String tableName) throws SQLException
SQLException
public static <T> Constructor<T> findNoArgConstructor(Class<T> dataClass)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |