Class MCompoundForeignKey
java.lang.Object
io.ebeaninternal.dbmigration.model.MCompoundForeignKey
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumnPair(String dbCol, String refColumn)Add a column pair of local and referenced column.addForeignKey(String tableName)Create and return an AlterForeignKey migration element.voidaddNameSuffix(int counter)Add a counter to the foreign key and index names to avoid duplication.Create and return an ForeignKey migration element.dropForeignKey(String tableName)Create and return an AlterForeignKey migration element.booleanReturn the columns making up the foreign key in order.Return the index name.getName()Return the foreign key name.inthashCode()voidsetIndexName(String indexName)Set the associated index name.
-
Constructor Details
-
MCompoundForeignKey
-
-
Method Details
-
addColumnPair
Add a column pair of local and referenced column. -
createForeignKey
Create and return an ForeignKey migration element. -
addForeignKey
Create and return an AlterForeignKey migration element. -
dropForeignKey
Create and return an AlterForeignKey migration element. -
addNameSuffix
Add a counter to the foreign key and index names to avoid duplication. -
getName
Return the foreign key name. -
getIndexName
Return the index name. -
getColumns
Return the columns making up the foreign key in order. -
setIndexName
Set the associated index name. Note that setting to null has the effect of indicating an associated index should not be created for this foreign key. -
hashCode
-
equals
-