| org.netbeans.modules.sql.framework.model.PrimaryKey
All known Subclasses: org.netbeans.modules.sql.framework.model.impl.PrimaryKeyImpl,
PrimaryKey | public interface PrimaryKey extends Cloneable(Code) | | Interface describing primary-key metadata for data sources providing information
in a database or database-like format. Implementing classes must support the
Cloneable interface.
author: Jonathan Giron version: $Revision$ |
Method Summary | |
public boolean | contains(String columnName) Indicates whether this primary key contains the column represented by
the given name. | public boolean | contains(DBColumn col) Indicates whether this primary key contains the given column. | public int | getColumnCount() Gets count of columns participating in this PrimaryKey. | public List<String> | getColumnNames() Gets read-only List of Strings (in key sequence order)
representing names of columns referenced in this PrimaryKey. | public String | getDBColumnName(int iColumn) Gets name of the DBColumn positioned as the iColumn-th column, if any,
participating in this PrimaryKey. | public String | getName() Gets (optional) name of this primary key. | public DBTable | getParent() Gets reference to DBTable that owns this primary key. | public int | getSequence(String columnName) Gets ordinal (base-one) sequence of the column referenced by the given
columnName in this PrimaryKey, provided the column is actually part of
this PK. | public int | getSequence(DBColumn col) Gets ordinal (base-one) sequence of the given DBColumn, provided it is
participating in this PK. | public boolean | isReferencedBy(ForeignKey fk) Indicates whether this PrimaryKey is referenced by the given ForeignKey.
Parameters: fk - ForeignKey whose references are to be tested. |
contains | public boolean contains(String columnName)(Code) | | Indicates whether this primary key contains the column represented by
the given name.
Parameters: columnName - name of column to test true if this PrimaryKey contains the column referenced by columnName, false otherwise. |
contains | public boolean contains(DBColumn col)(Code) | | Indicates whether this primary key contains the given column.
Parameters: col - DBColumn to test true if this PrimaryKey contains col, false otherwise |
getColumnCount | public int getColumnCount()(Code) | | Gets count of columns participating in this PrimaryKey.
column count |
getColumnNames | public List<String> getColumnNames()(Code) | | Gets read-only List of Strings (in key sequence order)
representing names of columns referenced in this PrimaryKey.
List of ColumnReference instances |
getDBColumnName | public String getDBColumnName(int iColumn)(Code) | | Gets name of the DBColumn positioned as the iColumn-th column, if any,
participating in this PrimaryKey. iColumn ranges from 1 (first column)
to n, where n is the total number of columns in this PrimaryKey.
Parameters: iColumn - index of column whose name is requested name of iColumn-th DBColumn in this PrimaryKey, or null if no column exists at the given position. |
getName | public String getName()(Code) | | Gets (optional) name of this primary key.
name of PK, or null if none was defined |
getParent | public DBTable getParent()(Code) | | Gets reference to DBTable that owns this primary key.
parent DBTable |
getSequence | public int getSequence(String columnName)(Code) | | Gets ordinal (base-one) sequence of the column referenced by the given
columnName in this PrimaryKey, provided the column is actually part of
this PK. The return value ranges from 1 (first column) to n, where
n is the total number of columns in this PrimaryKey, or -1 if the
column referenced by given columnName is not part of this PrimaryKey.
Parameters: columnName - name of column whose sequence is requested ordinal sequence of column referenced by columnName, starting with 1 if the column is the first in a composite key; -1 if the column is not part of this PrimaryKey |
getSequence | public int getSequence(DBColumn col)(Code) | | Gets ordinal (base-one) sequence of the given DBColumn, provided it is
participating in this PK. The return value ranges from 1 (first column)
to n, where n is the total number of columns in this PrimaryKey, or
-1 if col is not part of the PrimaryKey.
Parameters: col - DBColumn whose sequence is requested ordinal sequence of col, starting with 1 if the column is the first in this (composite) key; -1 if col does not participate in this PrimaryKey |
isReferencedBy | public boolean isReferencedBy(ForeignKey fk)(Code) | | Indicates whether this PrimaryKey is referenced by the given ForeignKey.
Parameters: fk - ForeignKey whose references are to be tested. true if fk references this PrimaryKey, false otherwise. |
|
|