|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.j256.ormlite.field.DatabaseFieldConfig
public class DatabaseFieldConfig
Database field configuration information either supplied by Spring or direct Java wiring or from a
DatabaseField annotation.
| Constructor Summary | |
|---|---|
DatabaseFieldConfig()
|
|
DatabaseFieldConfig(String fieldName,
String columnName,
JdbcType jdbcType,
String defaultValue,
int width,
boolean canBeNull,
boolean id,
boolean generatedId,
String generatedIdSequence,
boolean foreign,
DatabaseTableConfig<?> foreignTableConfig,
boolean useGetSet,
Enum<?> unknownEnumValue,
boolean throwIfNull)
|
|
| Method Summary | |
|---|---|
static Method |
findGetMethod(Field field,
boolean throwExceptions)
Find and return the appropriate getter method for field. |
static Method |
findSetMethod(Field field,
boolean throwExceptions)
Find and return the appropriate setter method for field. |
static DatabaseFieldConfig |
fromField(DatabaseType databaseType,
Field field)
Create and return a config converted from a Field that may have either a DatabaseField annotation
or the javax.persistence annotations. |
String |
getColumnName()
|
String |
getDefaultValue()
|
String |
getFieldName()
Return the name of the field in the class. |
DatabaseTableConfig<?> |
getForeignTableConfig()
For a foreign class which does not use the DatabaseField annotations, you need to inject the table
configuration. |
String |
getGeneratedIdSequence()
|
JdbcType |
getJdbcType()
|
Enum<?> |
getUnknownEnumvalue()
|
int |
getWidth()
|
boolean |
isCanBeNull()
|
boolean |
isForeign()
|
boolean |
isGeneratedId()
|
boolean |
isId()
|
boolean |
isThrowIfNull()
|
boolean |
isUseGetSet()
|
void |
setCanBeNull(boolean canBeNull)
|
void |
setColumnName(String columnName)
|
void |
setDefaultValue(String defaultValue)
|
void |
setFieldName(String fieldName)
|
void |
setForeign(boolean foreign)
|
void |
setForeignTableConfig(DatabaseTableConfig<?> foreignTableConfig)
|
void |
setGeneratedId(boolean generatedId)
|
void |
setGeneratedIdSequence(String generatedIdSequence)
|
void |
setId(boolean id)
|
void |
setJdbcType(JdbcType jdbcType)
|
void |
setThrowIfNull(boolean throwIfNull)
|
void |
setUnknownEnumvalue(Enum<?> unknownEnumvalue)
|
void |
setUseGetSet(boolean useGetSet)
|
void |
setWidth(int width)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DatabaseFieldConfig()
public DatabaseFieldConfig(String fieldName,
String columnName,
JdbcType jdbcType,
String defaultValue,
int width,
boolean canBeNull,
boolean id,
boolean generatedId,
String generatedIdSequence,
boolean foreign,
DatabaseTableConfig<?> foreignTableConfig,
boolean useGetSet,
Enum<?> unknownEnumValue,
boolean throwIfNull)
| Method Detail |
|---|
public String getFieldName()
public void setFieldName(String fieldName)
public String getColumnName()
DatabaseField.columnName()public void setColumnName(String columnName)
public JdbcType getJdbcType()
DatabaseField.jdbcType()public void setJdbcType(JdbcType jdbcType)
public String getDefaultValue()
DatabaseField.defaultValue()public void setDefaultValue(String defaultValue)
public int getWidth()
DatabaseField.width()public void setWidth(int width)
public boolean isCanBeNull()
DatabaseField.canBeNull()public void setCanBeNull(boolean canBeNull)
public boolean isId()
DatabaseField.id()public void setId(boolean id)
public boolean isGeneratedId()
DatabaseField.generatedId()public void setGeneratedId(boolean generatedId)
public String getGeneratedIdSequence()
DatabaseField.generatedIdSequence()public void setGeneratedIdSequence(String generatedIdSequence)
public boolean isForeign()
DatabaseField.foreign()public void setForeign(boolean foreign)
public DatabaseTableConfig<?> getForeignTableConfig()
DatabaseField annotations, you need to inject the table
configuration.
public void setForeignTableConfig(DatabaseTableConfig<?> foreignTableConfig)
public boolean isUseGetSet()
DatabaseField.useGetSet()public void setUseGetSet(boolean useGetSet)
public Enum<?> getUnknownEnumvalue()
public void setUnknownEnumvalue(Enum<?> unknownEnumvalue)
public boolean isThrowIfNull()
public void setThrowIfNull(boolean throwIfNull)
public static DatabaseFieldConfig fromField(DatabaseType databaseType,
Field field)
throws SQLException
Field that may have either a DatabaseField annotation
or the javax.persistence annotations.
SQLException
public static Method findGetMethod(Field field,
boolean throwExceptions)
public static Method findSetMethod(Field field,
boolean throwExceptions)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||