Class MCompoundUniqueConstraint
java.lang.Object
io.ebeaninternal.dbmigration.model.MCompoundUniqueConstraint
public class MCompoundUniqueConstraint extends Object
A unique constraint for multiple columns.
Note that unique constraint on a single column is instead a boolean flag on the associated MColumn.
-
Constructor Summary
Constructors Constructor Description MCompoundUniqueConstraint(AddUniqueConstraint change)MCompoundUniqueConstraint(UniqueConstraint uq)MCompoundUniqueConstraint(String[] columns, boolean oneToOne, String name, String platforms)MCompoundUniqueConstraint(String[] columns, String name)Create for OneToOne. -
Method Summary
Modifier and Type Method Description AddUniqueConstraintaddUniqueConstraint(String tableName)Return a AddUniqueConstraint migration for this constraint.AddUniqueConstraintdropUniqueConstraint(String tableName)Create a AddUniqueConstraint migration with 'DROP CONSTRAINT' set for this index.booleanequals(Object obj)String[]getColumns()Return the columns for this unique constraint.StringgetName()Return the constraint name.StringgetPlatforms()UniqueConstraintgetUniqueConstraint()inthashCode()booleanisOneToOne()Return true if this unique constraint is specifically for OneToOne mapping.voidsetNullableColumns(String[] nullableColumns)
-
Constructor Details
-
MCompoundUniqueConstraint
Create for OneToOne. -
MCompoundUniqueConstraint
public MCompoundUniqueConstraint(String[] columns, boolean oneToOne, String name, String platforms) -
MCompoundUniqueConstraint
-
MCompoundUniqueConstraint
-
-
Method Details
-
getColumns
Return the columns for this unique constraint. -
isOneToOne
Return true if this unique constraint is specifically for OneToOne mapping. -
getName
Return the constraint name. -
getPlatforms
-
getUniqueConstraint
-
addUniqueConstraint
Return a AddUniqueConstraint migration for this constraint. -
dropUniqueConstraint
Create a AddUniqueConstraint migration with 'DROP CONSTRAINT' set for this index. -
setNullableColumns
-
hashCode
-
equals
-