Class ModelBuildContext
java.lang.Object
io.ebeaninternal.dbmigration.model.build.ModelBuildContext
public class ModelBuildContext extends Object
The context used during DDL generation.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classModelBuildContext.FkeyBuilder -
Constructor Summary
Constructors Constructor Description ModelBuildContext(ModelContainer model, io.ebean.config.dbplatform.DatabasePlatform databasePlatform, io.ebean.config.DbConstraintNaming naming, boolean platformTypes) -
Method Summary
Modifier and Type Method Description voidaddIndex(MIndex index)MTableaddTable(MTable table)voidaddTableElementCollection(MTable table)voidadjustDraftReferences()Adjust the foreign key references on any draft tables (that reference other draft tables).StringcheckConstraintName(String tableName, String columnName, int checkCount)voidcreateDraft(MTable table, boolean draftable)Create the draft table for a given table.ModelBuildContext.FkeyBuilderfkeyBuilder(MTable destTable)Return a builder to add foreign keys.StringforeignKeyConstraintName(String tableName, String columnName, int foreignKeyCount)StringforeignKeyIndexName(String tableName, String[] columns, int indexCount)StringforeignKeyIndexName(String tableName, String column, int indexCount)StringgetColumnDefn(io.ebeaninternal.server.deploy.BeanProperty p, boolean strict)Render the DB type for this property given the strict mode.io.ebean.config.dbplatform.DbPlatformTypeMappinggetDbTypeMap()Return the map used to determine the DB specific type for a given bean property.StringindexName(String tableName, String[] columns, int indexCount)StringindexName(String tableName, String column, int indexCount)StringnormaliseTable(String baseTable)StringprimaryKeyName(String tableName)StringuniqueConstraintName(String tableName, String[] columnNames, int indexCount)StringuniqueConstraintName(String tableName, String columnName, int indexCount)
-
Constructor Details
-
ModelBuildContext
public ModelBuildContext(ModelContainer model, io.ebean.config.dbplatform.DatabasePlatform databasePlatform, io.ebean.config.DbConstraintNaming naming, boolean platformTypes)
-
-
Method Details
-
adjustDraftReferences
Adjust the foreign key references on any draft tables (that reference other draft tables). This is called as a 'second pass' after all the draft tables have been identified. -
normaliseTable
-
-
foreignKeyConstraintName
-
foreignKeyIndexName
-
foreignKeyIndexName
-
indexName
-
indexName
-
uniqueConstraintName
-
uniqueConstraintName
-
checkConstraintName
-
addTable
-
addTableElementCollection
-
addIndex
-
getDbTypeMap
Return the map used to determine the DB specific type for a given bean property. -
getColumnDefn
Render the DB type for this property given the strict mode. -
createDraft
Create the draft table for a given table. -
fkeyBuilder
Return a builder to add foreign keys.
-