| org.netbeans.modules.sql.framework.model.ForeignKey
All known Subclasses: org.netbeans.modules.sql.framework.model.impl.ForeignKeyImpl,
ForeignKey | public interface ForeignKey extends Cloneable(Code) | | Interface describing foreign-key metadata for data sources providing information
in a database or database-like format. Implementing classes must support the
Cloneable interface.
author: Jonathan Giron |
Method Summary | |
public boolean | contains(String fkColumnName) Indicates whether this ForeignKey contains the column represented by
the given name. | public boolean | contains(DBColumn fkCol) Indicates whether this ForeignKey contains the given column. | public int | getColumnCount() Gets count of columns participating in this ForeignKey. | public String | getColumnName(int iColumn) Gets name of the column positioned as the iColumn-th column, if any,
participating in this ForeignKey. | public List<String> | getColumnNames() Gets read-only List of Strings (in sequential order) representing names
of columns comprising this ForeignKey. | public int | getDeferrability() Gets enumerated deferrability rule associated with columns of this
ForeignKey, as defined in java.sql.DatabaseMetaData. | public int | getDeleteRule() Gets enumerated delete rule associated with columns of this ForeignKey,
as defined in java.sql.DatabaseMetaData. | public String | getMatchingPKColumn(String fkColumnName) Gets name of PK column, if any, which the FK column (represented by the
given column name) references. | public String | getName() Gets user-defined name for this Foreign Key. | public String | getPKCatalog() Gets name of catalog, if any, to which PK table belongs. | public List<String> | getPKColumnNames() Gets read-only List of Strings (in key sequence order) representing
names of PK columns referenced by elements of this ForeignKey. | public String | getPKName() | public String | getPKSchema() Gets name of schema, if any, to which PK table belongs. | public String | getPKTable() Gets name of table containing PK columns referenced by this ForeignKey. | public DBTable | getParent() Gets reference to DBTable that owns this primary key. | public int | getSequence(DBColumn col) Gets ordinal (base-one) sequence of the given DBColumn in this FK,
provided it is part of this FK. | public int | getUpdateRule() Gets enumerated update rule associated with columns of this ForeignKey,
as defined in java.sql.DatabaseMetaData. | public boolean | references(PrimaryKey pk) Indicates whether this ForeignKey references columns in the DBTable
represented by the given tuple of (table name, schema name, catalog name). |
contains | public boolean contains(String fkColumnName)(Code) | | Indicates whether this ForeignKey contains the column represented by
the given name.
Parameters: fkColumnName - name of column to test true if this ForeignKey contains the column referenced by fkColumnName, false otherwise. |
contains | public boolean contains(DBColumn fkCol)(Code) | | Indicates whether this ForeignKey contains the given column.
Parameters: fkCol - ETLColumn to test true if this ForeignKey contains fkCol, false otherwise |
getColumnCount | public int getColumnCount()(Code) | | Gets count of columns participating in this ForeignKey.
column count |
getColumnName | public String getColumnName(int iColumn)(Code) | | Gets name of the column positioned as the iColumn-th column, if any,
participating in this ForeignKey. iColumn ranges from 1 (first column)
to n, where n is the total number of columns in this ForeignKey.
Parameters: iColumn - index of column whose name is requested name of iColumn-th DBColumn in this ForeignKey, or null if no column exists at the given position. |
getColumnNames | public List<String> getColumnNames()(Code) | | Gets read-only List of Strings (in sequential order) representing names
of columns comprising this ForeignKey.
List of column names |
getDeferrability | public int getDeferrability()(Code) | | Gets enumerated deferrability rule associated with columns of this
ForeignKey, as defined in java.sql.DatabaseMetaData.
int value representing associated deferrability rule See Also: java.sql.DatabaseMetaData |
getDeleteRule | public int getDeleteRule()(Code) | | Gets enumerated delete rule associated with columns of this ForeignKey,
as defined in java.sql.DatabaseMetaData.
int value representing associated delete rule See Also: java.sql.DatabaseMetaData |
getMatchingPKColumn | public String getMatchingPKColumn(String fkColumnName)(Code) | | Gets name of PK column, if any, which the FK column (represented by the
given column name) references.
Parameters: fkColumnName - name of FK column whose referenced PK column is tobe retrieved name of matching PK column, or null if fkColumnName is not an FKcolumn |
getName | public String getName()(Code) | | Gets user-defined name for this Foreign Key.
FK name |
getPKCatalog | public String getPKCatalog()(Code) | | Gets name of catalog, if any, to which PK table belongs.
catalog name for PK table; null if no catalog name is defined |
getPKColumnNames | public List<String> getPKColumnNames()(Code) | | Gets read-only List of Strings (in key sequence order) representing
names of PK columns referenced by elements of this ForeignKey.
List of PK column names referenced by this ForeignKey |
getPKName | public String getPKName()(Code) | | Gets name, if any, of associated primary key
name of this primary key; may be null if no name exists for the PK |
getPKSchema | public String getPKSchema()(Code) | | Gets name of schema, if any, to which PK table belongs.
schema name for PK table; null if no schema name is defined |
getPKTable | public String getPKTable()(Code) | | Gets name of table containing PK columns referenced by this ForeignKey.
PK table name |
getParent | public DBTable getParent()(Code) | | Gets reference to DBTable that owns this primary key.
parent DBTable |
getSequence | public int getSequence(DBColumn col)(Code) | | Gets ordinal (base-one) sequence of the given DBColumn in this FK,
provided it is part of this FK. The return value ranges from 1 (first
column) to n, where n is the total number of columns in this ForeignKey,
or -1 if col is not part of the ForeignKey.
Parameters: col - DBColumn whose sequence is requested ordinal sequence of col, starting with 1 if the column is the first in a composite key; -1 if col does not participate in this ForeignKey |
getUpdateRule | public int getUpdateRule()(Code) | | Gets enumerated update rule associated with columns of this ForeignKey,
as defined in java.sql.DatabaseMetaData.
int value representing associated update rule See Also: java.sql.DatabaseMetaData |
references | public boolean references(PrimaryKey pk)(Code) | | Indicates whether this ForeignKey references columns in the DBTable
represented by the given tuple of (table name, schema name, catalog name).
Parameters: pk - PrimaryKey whose relationship to this FK is to be tested true if this FK references columns in pk; false otherwise |
|
|