|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.triactive.jdo.store.adapter.CatalogInfo com.triactive.jdo.store.adapter.ForeignKeyInfo
Represents the metadata of a specific foreign key column.
This class is basically a data structure that makes accessing the JDBC
foreign key metadata easier.
Each of the items returned by DatabaseMetaData.getImportedKeys(java.lang.String, java.lang.String, java.lang.String)
is
represented by a public field in this class.
Subclasses of ForeignKeyInfo can be created on a per-DBMS basis to supply missing metadata or correct faulty metadata obtained from that DBMS's JDBC driver(s).
DatabaseAdapter.newForeignKeyInfo(java.sql.ResultSet)
Field Summary | |
short |
deferrability
Indicates whether the evaluation of the foreign key constraint can be deferred until commit time. |
short |
deleteRule
What happens to a foreign key when the primary key is deleted. |
java.lang.String |
fkColumnName
The foreign key column name. |
java.lang.String |
fkName
The foreign key name. |
java.lang.String |
fkTableCat
The foreign key table catalog, which may be null. |
java.lang.String |
fkTableName
The foreign key table name. |
java.lang.String |
fkTableSchem
The foreign key table schema, which may be null. |
short |
keySeq
The sequence number within the foreign key, base 1. |
java.lang.String |
pkColumnName
The primary key column name. |
java.lang.String |
pkName
The primary key name. |
java.lang.String |
pkTableCat
The primary key table catalog, which may be null. |
java.lang.String |
pkTableName
The primary key table name. |
java.lang.String |
pkTableSchem
The primary key table schema, which may be null. |
short |
updateRule
What happens to a foreign key when the primary key is updated. |
Constructor Summary | |
ForeignKeyInfo(java.sql.ResultSet rs)
Constructs a foreign key information object from the current row of the given result set. |
|
ForeignKeyInfo(java.lang.String pkTableCat,
java.lang.String pkTableSchem,
java.lang.String pkTableName,
java.lang.String pkColumnName,
java.lang.String fkTableCat,
java.lang.String fkTableSchem,
java.lang.String fkTableName,
java.lang.String fkColumnName,
short keySeq,
short updateRule,
short deleteRule,
java.lang.String fkName,
java.lang.String pkName,
short deferrability)
Constructs a foreign key information object from its individual attributes. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Indicates whether some object is "equal to" this one. |
java.lang.String |
getTableCatalog()
|
java.lang.String |
getTableName()
|
java.lang.String |
getTableSchema()
|
int |
hashCode()
Returns a hash code value for this object. |
java.lang.String |
toString()
Returns the string representation of this object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public java.lang.String pkTableCat
public java.lang.String pkTableSchem
public java.lang.String pkTableName
public java.lang.String pkColumnName
public java.lang.String fkTableCat
public java.lang.String fkTableSchem
public java.lang.String fkTableName
public java.lang.String fkColumnName
public short keySeq
public short updateRule
DatabaseMetaData.importedKeyNoAction
,
DatabaseMetaData.importedKeyCascade
,
DatabaseMetaData.importedKeySetNull
,
DatabaseMetaData.importedKeySetDefault
,
DatabaseMetaData.importedKeyRestrict
public short deleteRule
DatabaseMetaData.importedKeyNoAction
,
DatabaseMetaData.importedKeyCascade
,
DatabaseMetaData.importedKeySetNull
,
DatabaseMetaData.importedKeySetDefault
,
DatabaseMetaData.importedKeyRestrict
public java.lang.String fkName
public java.lang.String pkName
public short deferrability
DatabaseMetaData.importedKeyInitiallyDeferred
,
DatabaseMetaData.importedKeyInitiallyImmediate
,
DatabaseMetaData.importedKeyNotDeferrable
Constructor Detail |
public ForeignKeyInfo(java.sql.ResultSet rs) throws java.sql.SQLException
ResultSet
object passed must have been obtained from a call
to DatabaseMetaData.getImportedKeys() or
DatabaseMetaData.getImportedKeys().
This method only retrieves the values from the current row; the caller
is required to advance to the next row with ResultSet.next()
.
rs
- The result set returned from DatabaseMetaData.get??portedKeys().
java.sql.SQLException
- if a column of foreign key information could not be retrieved from the
result set.public ForeignKeyInfo(java.lang.String pkTableCat, java.lang.String pkTableSchem, java.lang.String pkTableName, java.lang.String pkColumnName, java.lang.String fkTableCat, java.lang.String fkTableSchem, java.lang.String fkTableName, java.lang.String fkColumnName, short keySeq, short updateRule, short deleteRule, java.lang.String fkName, java.lang.String pkName, short deferrability)
This can be useful to subclasses and/or custom DatabaseAdapters that need to modify and/or correct the metadata returned by the JDBC driver.
Method Detail |
public java.lang.String getTableCatalog()
getTableCatalog
in class CatalogInfo
public java.lang.String getTableSchema()
getTableSchema
in class CatalogInfo
public java.lang.String getTableName()
getTableName
in class CatalogInfo
public final boolean equals(java.lang.Object obj)
obj
- the reference object with which to compare
public final int hashCode()
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |