Package org.teiid.metadata
Class ForeignKey
- java.lang.Object
-
- org.teiid.metadata.AbstractMetadataRecord
-
- org.teiid.metadata.ColumnSet<Table>
-
- org.teiid.metadata.KeyRecord
-
- org.teiid.metadata.ForeignKey
-
- All Implemented Interfaces:
Serializable
public class ForeignKey extends KeyRecord
ForeignKeyRecordImpl- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.teiid.metadata.KeyRecord
KeyRecord.Type
-
Nested classes/interfaces inherited from class org.teiid.metadata.AbstractMetadataRecord
AbstractMetadataRecord.DataModifiable, AbstractMetadataRecord.Modifiable
-
-
Field Summary
Fields Modifier and Type Field Description static StringALLOW_JOIN-
Fields inherited from class org.teiid.metadata.AbstractMetadataRecord
NAME_DELIM_CHAR, RELATIONAL_PREFIX
-
-
Constructor Summary
Constructors Constructor Description ForeignKey()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description KeyRecordgetPrimaryKey()Deprecated.List<String>getReferenceColumns()KeyRecordgetReferenceKey()StringgetReferenceTableName()WARNING prior to validation this method will return a potentially fully-qualified name after resolving it will return an unqualified nameStringgetUniqueKeyID()voidsetPrimaryKey(KeyRecord primaryKey)Deprecated.voidsetReferenceColumns(List<String> referenceColumns)voidsetReferenceKey(KeyRecord primaryKey)Note: does not need to be directly called.voidsetReferenceTableName(String tableName)voidsetUniqueKeyID(String keyID)-
Methods inherited from class org.teiid.metadata.ColumnSet
addColumn, getColumnByName, getColumns, getParent, removeColumn, setColumns, setParent
-
Methods inherited from class org.teiid.metadata.AbstractMetadataRecord
equals, getAnnotation, getCanonicalName, getFullName, getIdentifier, getIncomingObjects, getName, getNameInSource, getProperties, getProperty, getProperty, getSourceName, getSQLString, getSQLString, getUUID, hashCode, isUUIDSet, setAnnotation, setIncomingObjects, setName, setNameInSource, setProperties, setProperty, setUUID, toString
-
-
-
-
Field Detail
-
ALLOW_JOIN
public static final String ALLOW_JOIN
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUniqueKeyID
public String getUniqueKeyID()
-
setUniqueKeyID
public void setUniqueKeyID(String keyID)
- Parameters:
keyID-
-
getPrimaryKey
public KeyRecord getPrimaryKey()
Deprecated.- Returns:
- the primary key or unique key referenced by this foreign key
- See Also:
getReferenceKey()
-
getReferenceKey
public KeyRecord getReferenceKey()
- Returns:
- the primary or unique key referenced by this foreign key
-
setReferenceKey
public void setReferenceKey(KeyRecord primaryKey)
Note: does not need to be directly called. The engine can resolve the referenced key ifsetReferenceColumns(List)andsetReferenceTableName(String)are used.- Parameters:
primaryKey- the primary key or unique key referenced by this foreign key
-
setPrimaryKey
public void setPrimaryKey(KeyRecord primaryKey)
Deprecated.- Parameters:
primaryKey- the primary key or unique key referenced by this foreign key- See Also:
setReferenceKey(KeyRecord)
-
getReferenceTableName
public String getReferenceTableName()
WARNING prior to validation this method will return a potentially fully-qualified name after resolving it will return an unqualified name- Returns:
-
setReferenceTableName
public void setReferenceTableName(String tableName)
-
-