public abstract class LitePalBase
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
TAG |
| 构造器和说明 |
|---|
LitePalBase() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected java.util.Collection<AssociationsInfo> |
getAssociationInfo(java.lang.String className)
Get the association info model by the class name.
|
protected java.util.Collection<AssociationsModel> |
getAssociations(java.util.List<java.lang.String> classNames)
This method is used to get association models depends on the given class
name list.
|
protected java.lang.String |
getColumnType(java.lang.String fieldType)
Get the column type for creating table by field type.
|
protected java.lang.String |
getForeignKeyColumnName(java.lang.String associatedTableName)
If two tables are associated, one table have a foreign key column.
|
protected java.util.Collection<GenericModel> |
getGenericModels()
Get all generic models for create generic tables.
|
protected java.lang.Class<?> |
getGenericTypeClass(java.lang.reflect.Field field)
Get the generic type class of List or Set.
|
protected java.lang.String |
getGenericTypeName(java.lang.reflect.Field field)
Get the generic type name of List or Set.
|
protected java.util.List<java.lang.reflect.Field> |
getSupportedFields(java.lang.String className)
Find all the fields in the class.
|
protected java.util.List<java.lang.reflect.Field> |
getSupportedGenericFields(java.lang.String className)
Find all supported generic fields in the class.
|
protected TableModel |
getTableModel(java.lang.String className)
This method is used to get the table model by the class name passed
in.
|
protected boolean |
isCollection(java.lang.Class<?> fieldType)
If the field type implements from List or Set, regard it as a collection.
|
protected boolean |
isIdColumn(java.lang.String columnName)
Judge the passed in column is an id column or not.
|
protected boolean |
isList(java.lang.Class<?> fieldType)
If the field type implements from List, regard it as a list.
|
protected boolean |
isPrivate(java.lang.reflect.Field field)
Check the field is a private field or not.
|
protected boolean |
isSet(java.lang.Class<?> fieldType)
If the field type implements from Set, regard it as a set.
|
public static final java.lang.String TAG
protected TableModel getTableModel(java.lang.String className)
Column.ignore().className - The full name of the class to map in database.protected java.util.Collection<AssociationsModel> getAssociations(java.util.List<java.lang.String> classNames)
classNames - The names of the classes that want to get their associations.protected java.util.Collection<GenericModel> getGenericModels()
protected java.util.Collection<AssociationsInfo> getAssociationInfo(java.lang.String className)
className - The class name to introspection.protected java.util.List<java.lang.reflect.Field> getSupportedFields(java.lang.String className)
className - The full name of the class.protected java.util.List<java.lang.reflect.Field> getSupportedGenericFields(java.lang.String className)
BaseUtility.isGenericTypeSupported(String).className - The full name of the class.protected boolean isCollection(java.lang.Class<?> fieldType)
fieldType - The field type.protected boolean isList(java.lang.Class<?> fieldType)
fieldType - The field type.protected boolean isSet(java.lang.Class<?> fieldType)
fieldType - The field type.protected boolean isIdColumn(java.lang.String columnName)
columnName - The name of column.protected java.lang.String getForeignKeyColumnName(java.lang.String associatedTableName)
associatedTableName - The associated table name.protected java.lang.String getColumnType(java.lang.String fieldType)
fieldType - Type of field.protected java.lang.Class<?> getGenericTypeClass(java.lang.reflect.Field field)
field - A generic type field.protected boolean isPrivate(java.lang.reflect.Field field)
field - The field to check.protected java.lang.String getGenericTypeName(java.lang.reflect.Field field)
field - A generic type field.