public class ForeignKey extends Constraint
Constructor and Description |
---|
ForeignKey() |
Modifier and Type | Method and Description |
---|---|
void |
addReferencedColumns(Iterator referencedColumnsIterator) |
void |
alignColumns()
Validates that columnspan of the foreignkey and the primarykey is the same.
|
List |
getReferencedColumns()
Returns the referenced columns if the foreignkey does not refer to the primary key
|
String |
getReferencedEntityName() |
Table |
getReferencedTable() |
boolean |
isCascadeDeleteEnabled() |
boolean |
isPhysicalConstraint() |
boolean |
isReferenceToPrimaryKey()
Does this foreignkey reference the primary key of the reference table
|
void |
setCascadeDeleteEnabled(boolean cascadeDeleteEnabled) |
void |
setReferencedEntityName(String referencedEntityName) |
void |
setReferencedTable(Table referencedTable) |
String |
sqlConstraintString(Dialect dialect,
String constraintName,
String defaultCatalog,
String defaultSchema) |
String |
sqlDropString(Dialect dialect,
String defaultCatalog,
String defaultSchema) |
String |
toString() |
addColumn, addColumns, columnIterator, containsColumn, getColumn, getColumnIterator, getColumns, getColumnSpan, getName, getTable, isGenerated, setName, setTable, sqlCreateString
public String sqlConstraintString(Dialect dialect, String constraintName, String defaultCatalog, String defaultSchema)
sqlConstraintString
in class Constraint
public Table getReferencedTable()
public void setReferencedTable(Table referencedTable) throws MappingException
MappingException
public void alignColumns()
public String getReferencedEntityName()
public void setReferencedEntityName(String referencedEntityName)
public String sqlDropString(Dialect dialect, String defaultCatalog, String defaultSchema)
sqlDropString
in interface RelationalModel
sqlDropString
in class Constraint
public boolean isCascadeDeleteEnabled()
public void setCascadeDeleteEnabled(boolean cascadeDeleteEnabled)
public boolean isPhysicalConstraint()
public List getReferencedColumns()
public boolean isReferenceToPrimaryKey()
public void addReferencedColumns(Iterator referencedColumnsIterator)
public String toString()
toString
in class Constraint
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.