Class CurrentModel
java.lang.Object
io.ebeaninternal.dbmigration.model.CurrentModel
public class CurrentModel extends Object
Reads EbeanServer bean descriptors to build the current model.
-
Constructor Summary
Constructors Constructor Description CurrentModel(io.ebeaninternal.api.SpiEbeanServer server)Construct with a given EbeanServer instance for DDL create all generation, not migration.CurrentModel(io.ebeaninternal.api.SpiEbeanServer server, io.ebean.config.DbConstraintNaming constraintNaming)Construct with a given EbeanServer, platformDdl and constraintNaming convention. -
Method Summary
Modifier and Type Method Description ChangeSetgetChangeSet()Return as a ChangeSet.StringgetCreateDdl()Return the 'Create' DDL.DdlOptionsgetDdlOptions()StringgetDropAllDdl()Return the 'Drop' DDL.List<MTable>getPartitionedTables()Return the tables that have partitioning.booleanisTablePartitioning()Return true if the model contains tables that are partitioned.ModelContainerread()Return the current model by reading all the bean descriptors and properties.voidsetChangeSet(ChangeSet changeSet)
-
Constructor Details
-
CurrentModel
Construct with a given EbeanServer instance for DDL create all generation, not migration. -
CurrentModel
public CurrentModel(io.ebeaninternal.api.SpiEbeanServer server, io.ebean.config.DbConstraintNaming constraintNaming)Construct with a given EbeanServer, platformDdl and constraintNaming convention.Note the EbeanServer is just used to read the BeanDescriptors and platformDdl supplies the platform specific handling on
-
-
Method Details
-
getDdlOptions
-
isTablePartitioning
Return true if the model contains tables that are partitioned. -
getPartitionedTables
Return the tables that have partitioning. -
read
Return the current model by reading all the bean descriptors and properties. -
setChangeSet
-
getChangeSet
Return as a ChangeSet. -
getCreateDdl
Return the 'Create' DDL.- Throws:
IOException
-
getDropAllDdl
Return the 'Drop' DDL.- Throws:
IOException
-