public class ForeignKey extends AbstractConstraint implements Constraint, Exportable
| Modifier and Type | Class and Description |
|---|---|
static class |
ForeignKey.ReferentialAction |
| Modifier | Constructor and Description |
|---|---|
protected |
ForeignKey(TableSpecification sourceTable,
TableSpecification targetTable) |
protected |
ForeignKey(TableSpecification sourceTable,
TableSpecification targetTable,
String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(Column column) |
void |
addColumnMapping(Column sourceColumn,
Column targetColumn) |
ForeignKey.ReferentialAction |
getDeleteRule() |
String |
getExportIdentifier()
Get a unique identifier to make sure we are not exporting the same database structure multiple times.
|
Iterable<Column> |
getSourceColumns() |
TableSpecification |
getSourceTable() |
Iterable<Column> |
getTargetColumns() |
TableSpecification |
getTargetTable() |
ForeignKey.ReferentialAction |
getUpdateRule() |
void |
setDeleteRule(ForeignKey.ReferentialAction deleteRule) |
void |
setUpdateRule(ForeignKey.ReferentialAction updateRule) |
String |
sqlConstraintStringInAlterTable(Dialect dialect) |
String[] |
sqlDropStrings(Dialect dialect)
Gets the SQL strings for dropping the database object.
|
getColumns, getColumnSpan, getName, getTable, internalAddColumn, internalColumnAccess, isCreationVetoed, sqlCreateStringsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetColumns, getName, getTablesqlCreateStringsprotected ForeignKey(TableSpecification sourceTable, TableSpecification targetTable, String name)
protected ForeignKey(TableSpecification sourceTable, TableSpecification targetTable)
public TableSpecification getSourceTable()
public TableSpecification getTargetTable()
public void addColumn(Column column)
addColumn in class AbstractConstraintpublic String getExportIdentifier()
ExportablegetExportIdentifier in interface Exportablepublic ForeignKey.ReferentialAction getDeleteRule()
public void setDeleteRule(ForeignKey.ReferentialAction deleteRule)
public ForeignKey.ReferentialAction getUpdateRule()
public void setUpdateRule(ForeignKey.ReferentialAction updateRule)
public String[] sqlDropStrings(Dialect dialect)
ExportablesqlDropStrings in interface ExportablesqlDropStrings in class AbstractConstraintdialect - The dialect for which to generate the SQL drop stringspublic String sqlConstraintStringInAlterTable(Dialect dialect)
sqlConstraintStringInAlterTable in class AbstractConstraintCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.