|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ForeignKey
Database foreign key Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves. This interface is not intended to be implemented by clients.
| Nested Class Summary | |
|---|---|
static interface |
ForeignKey.ColumnPair
Pair up the foreign key's column pairs, matching each "base" column with the appropriate "referenced" column. |
| Method Summary | |
|---|---|
java.util.Iterator<Column> |
baseColumns()
Return the foreign key's "base" columns. |
java.util.Iterator<ForeignKey.ColumnPair> |
columnPairs()
Return the foreign key's column pairs. |
int |
columnPairsSize()
Return the size of the foreign key's column pairs. |
java.lang.String |
getAttributeName()
Return an appropriate name for an attribute that holds the entity mapped to the foreign key's "referenced" table. |
Table |
getBaseTable()
Return the foreign key's "base" table. |
ForeignKey.ColumnPair |
getColumnPair()
Return the foreign key's single column pair. |
java.lang.String |
getDefaultAttributeName()
If the name of the "base" column adheres to the JPA spec for a default mapping (i.e. |
java.lang.String |
getJoinColumnAnnotationIdentifier(java.lang.String attributeName)
Given the name of an attribute (field or property) that is mapped to the foreign key, build and return a string to be used as the value for the attribute's JoinColumn annotation's 'name' element. |
Table |
getReferencedTable()
Return the foreign key's "referenced" table. |
java.util.Iterator<Column> |
nonPrimaryKeyBaseColumns()
Return the foreign key's "base" columns that are not part of the base table's primary key. |
java.util.Iterator<Column> |
referencedColumns()
Return the foreign key's "referenced" columns. |
boolean |
referencesSingleColumnPrimaryKey()
Return whether the foreign key references the primary key of the "referenced" table and that primary key has only a single column. |
| Methods inherited from interface org.eclipse.jpt.db.DatabaseObject |
|---|
getConnectionProfile, getDatabase, getIdentifier, getIdentifier, getName |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
Table getBaseTable()
Table getReferencedTable()
java.util.Iterator<ForeignKey.ColumnPair> columnPairs()
int columnPairsSize()
ForeignKey.ColumnPair getColumnPair()
java.util.Iterator<Column> baseColumns()
java.util.Iterator<Column> nonPrimaryKeyBaseColumns()
java.util.Iterator<Column> referencedColumns()
boolean referencesSingleColumnPrimaryKey()
java.lang.String getAttributeName()
java.lang.String getDefaultAttributeName()
java.lang.String getJoinColumnAnnotationIdentifier(java.lang.String attributeName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||