Class MColumn
- java.lang.Object
-
- io.ebeaninternal.dbmigration.model.MColumn
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapply(AlterColumn alterColumn)Apply changes based on the AlterColumn request.voidclearForeignKey()voidcompare(ModelDiff modelDiff, MTable table, MColumn newColumn)Compare the column meta data and return true if there is a change that means the history table column needsMColumncopyForDraft()Return a copy of this column used for creating the associated draft table.ColumncreateColumn()StringgetCheckConstraint()StringgetCheckConstraintName()StringgetComment()Return the column comment.StringgetDefaultValue()StringgetForeignKeyIndex()StringgetForeignKeyName()StringgetName()StringgetReferences()StringgetType()StringgetUnique()StringgetUniqueOneToOne()Return true if this is unique for a OneToOne.booleanisDraftOnly()Return the draftOnly status for this column.booleanisHistoryExclude()booleanisIdentity()booleanisIncludeInHistory()Return true if this column should be included in History DB triggers etc.booleanisNotnull()booleanisPrimaryKey()MColumnrename(String newName)Rename the column.voidsetCheckConstraint(String checkConstraint)voidsetCheckConstraintName(String checkConstraintName)voidsetComment(String comment)Set the column comment.voidsetDbMigrationInfos(List<io.ebeaninternal.server.deploy.DbMigrationInfo> dbMigrationInfos)voidsetDefaultValue(String defaultValue)voidsetDraftOnly(boolean draftOnly)Set the draftOnly status for this column.voidsetForeignKeyIndex(String foreignKeyIndex)voidsetForeignKeyModes(io.ebean.annotation.ConstraintMode onDelete, io.ebean.annotation.ConstraintMode onUpdate)voidsetForeignKeyName(String foreignKeyName)voidsetHistoryExclude(boolean historyExclude)voidsetIdentity(boolean identity)voidsetNotnull(boolean notnull)voidsetPrimaryKey(boolean primaryKey)voidsetReferences(String references)voidsetUnique(String unique)voidsetUniqueOneToOne(String uniqueOneToOne)Set unique specifically for OneToOne mapping.
-
-
-
Method Detail
-
copyForDraft
public MColumn copyForDraft()
Return a copy of this column used for creating the associated draft table.
-
isPrimaryKey
public boolean isPrimaryKey()
-
setPrimaryKey
public void setPrimaryKey(boolean primaryKey)
-
isIdentity
public boolean isIdentity()
-
setIdentity
public void setIdentity(boolean identity)
-
getCheckConstraint
public String getCheckConstraint()
-
setCheckConstraint
public void setCheckConstraint(String checkConstraint)
-
getCheckConstraintName
public String getCheckConstraintName()
-
setCheckConstraintName
public void setCheckConstraintName(String checkConstraintName)
-
getForeignKeyName
public String getForeignKeyName()
-
setForeignKeyName
public void setForeignKeyName(String foreignKeyName)
-
getForeignKeyIndex
public String getForeignKeyIndex()
-
setForeignKeyIndex
public void setForeignKeyIndex(String foreignKeyIndex)
-
setForeignKeyModes
public void setForeignKeyModes(io.ebean.annotation.ConstraintMode onDelete, io.ebean.annotation.ConstraintMode onUpdate)
-
getDefaultValue
public String getDefaultValue()
-
setDefaultValue
public void setDefaultValue(String defaultValue)
-
getReferences
public String getReferences()
-
setReferences
public void setReferences(String references)
-
isNotnull
public boolean isNotnull()
-
setNotnull
public void setNotnull(boolean notnull)
-
isHistoryExclude
public boolean isHistoryExclude()
-
setHistoryExclude
public void setHistoryExclude(boolean historyExclude)
-
setUniqueOneToOne
public void setUniqueOneToOne(String uniqueOneToOne)
Set unique specifically for OneToOne mapping. We need special DDL for this case for SqlServer.
-
getUniqueOneToOne
public String getUniqueOneToOne()
Return true if this is unique for a OneToOne.
-
getComment
public String getComment()
Return the column comment.
-
setComment
public void setComment(String comment)
Set the column comment.
-
setDraftOnly
public void setDraftOnly(boolean draftOnly)
Set the draftOnly status for this column.
-
isDraftOnly
public boolean isDraftOnly()
Return the draftOnly status for this column.
-
isIncludeInHistory
public boolean isIncludeInHistory()
Return true if this column should be included in History DB triggers etc.
-
clearForeignKey
public void clearForeignKey()
-
createColumn
public Column createColumn()
-
compare
public void compare(ModelDiff modelDiff, MTable table, MColumn newColumn)
Compare the column meta data and return true if there is a change that means the history table column needs
-
setDbMigrationInfos
public void setDbMigrationInfos(List<io.ebeaninternal.server.deploy.DbMigrationInfo> dbMigrationInfos)
-
apply
public void apply(AlterColumn alterColumn)
Apply changes based on the AlterColumn request.
-
-