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
All Methods Instance Methods Concrete Methods 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 Detail
-
CurrentModel
public CurrentModel(io.ebeaninternal.api.SpiEbeanServer server)
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 Detail
-
getDdlOptions
public DdlOptions getDdlOptions()
-
isTablePartitioning
public boolean isTablePartitioning()
Return true if the model contains tables that are partitioned.
-
getPartitionedTables
public List<MTable> getPartitionedTables()
Return the tables that have partitioning.
-
read
public ModelContainer read()
Return the current model by reading all the bean descriptors and properties.
-
setChangeSet
public void setChangeSet(ChangeSet changeSet)
-
getChangeSet
public ChangeSet getChangeSet()
Return as a ChangeSet.
-
getCreateDdl
public String getCreateDdl() throws IOException
Return the 'Create' DDL.- Throws:
IOException
-
getDropAllDdl
public String getDropAllDdl() throws IOException
Return the 'Drop' DDL.- Throws:
IOException
-
-