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(SpiEbeanServer server)
Construct with a given EbeanServer instance for DDL create all generation, not migration.CurrentModel(SpiEbeanServer server, DbConstraintNaming constraintNaming)
Construct with a given EbeanServer, platformDdl and constraintNaming convention.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChangeSet
getChangeSet()
Return as a ChangeSet.String
getCreateDdl()
Return the 'Create' DDL.DdlOptions
getDdlOptions()
String
getDropAllDdl()
Return the 'Drop' DDL.List<MTable>
getPartitionedTables()
Return the tables that have partitioning.boolean
isTablePartitioning()
Return true if the model contains tables that are partitioned.ModelContainer
read()
Return the current model by reading all the bean descriptors and properties.void
setChangeSet(ChangeSet changeSet)
-
-
-
Constructor Detail
-
CurrentModel
public CurrentModel(SpiEbeanServer server)
Construct with a given EbeanServer instance for DDL create all generation, not migration.
-
CurrentModel
public CurrentModel(SpiEbeanServer server, 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
-
-