public abstract class Generator extends LitePalBase
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
TAG |
| 构造器和说明 |
|---|
Generator() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract void |
addOrUpdateAssociation(android.database.sqlite.SQLiteDatabase db,
boolean force)
Analysis the
AssociationsModel by the purpose of subclasses, and
generate a SQL to do the intention job. |
protected abstract void |
createOrUpgradeTable(android.database.sqlite.SQLiteDatabase db,
boolean force)
Analysis the TableModel by the purpose of subclasses, and generate a SQL
to do the intention job.
|
protected void |
execute(java.lang.String[] sqls,
android.database.sqlite.SQLiteDatabase db)
Use the parameter SQLiteDatabase to execute the passing SQLs.
|
protected java.util.Collection<AssociationsModel> |
getAllAssociations()
This method is used to get all the association models which in the
mapping list of litepal.xml file.
|
protected java.util.Collection<TableModel> |
getAllTableModels()
This is a shortcut way to get all the table models for each model class
defined in the mapping list.
|
public static final java.lang.String TAG
protected java.util.Collection<TableModel> getAllTableModels()
protected java.util.Collection<AssociationsModel> getAllAssociations()
protected void execute(java.lang.String[] sqls,
android.database.sqlite.SQLiteDatabase db)
sqls - SQLs that want to execute.db - instance of SQLiteDatabaseDatabaseGenerateExceptionprotected abstract void createOrUpgradeTable(android.database.sqlite.SQLiteDatabase db,
boolean force)
db - Instance of SQLiteDatabase.force - Drop the table first if it already exists.protected abstract void addOrUpdateAssociation(android.database.sqlite.SQLiteDatabase db,
boolean force)
AssociationsModel by the purpose of subclasses, and
generate a SQL to do the intention job. The implementation of this method
is totally delegated to the subclasses.db - Instance of SQLiteDatabase.force - Drop the table first if it already exists.