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,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
addColumn(Column column) |
void |
addColumnMapping(Column sourceColumn,
Column targetColumn) |
ForeignKey.ReferentialAction |
getDeleteRule() |
java.lang.String |
getExportIdentifier()
Get a unique identifier to make sure we are not exporting the same database structure multiple times.
|
java.lang.Iterable<Column> |
getSourceColumns() |
TableSpecification |
getSourceTable() |
java.lang.Iterable<Column> |
getTargetColumns() |
TableSpecification |
getTargetTable() |
ForeignKey.ReferentialAction |
getUpdateRule() |
void |
setDeleteRule(ForeignKey.ReferentialAction deleteRule) |
void |
setUpdateRule(ForeignKey.ReferentialAction updateRule) |
java.lang.String |
sqlConstraintStringInAlterTable(Dialect dialect) |
java.lang.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, java.lang.String name)
protected ForeignKey(TableSpecification sourceTable, TableSpecification targetTable)
public TableSpecification getSourceTable()
public TableSpecification getTargetTable()
public java.lang.Iterable<Column> getSourceColumns()
public java.lang.Iterable<Column> getTargetColumns()
public void addColumn(Column column)
addColumn in class AbstractConstraintpublic java.lang.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 java.lang.String[] sqlDropStrings(Dialect dialect)
ExportablesqlDropStrings in interface ExportablesqlDropStrings in class AbstractConstraintdialect - The dialect for which to generate the SQL drop stringspublic java.lang.String sqlConstraintStringInAlterTable(Dialect dialect)
sqlConstraintStringInAlterTable in class AbstractConstraintCopyright © 2001-2013 Red Hat, Inc. All Rights Reserved.