|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.triactive.jdo.store.adapter.CatalogInfo com.triactive.jdo.store.adapter.PrimaryKeyInfo
Represents the metadata of a specific primary key column.
This class is basically a data structure that makes accessing the JDBC
primary key metadata easier.
Each of the items returned by DatabaseMetaData.getPrimaryKeys(java.lang.String, java.lang.String, java.lang.String)
is
represented by a public field in this class.
Subclasses of PrimaryKeyInfo 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.newPrimaryKeyInfo(java.sql.ResultSet)
Field Summary | |
java.lang.String |
columnName
The primary key column name. |
short |
keySeq
The sequence number within the primary key, base 1. |
java.lang.String |
pkName
The primary key name. |
java.lang.String |
tableCat
The primary key table catalog, which may be null. |
java.lang.String |
tableName
The primary key table name. |
java.lang.String |
tableSchem
The primary key table schema, which may be null. |
Constructor Summary | |
PrimaryKeyInfo(java.sql.ResultSet rs)
Constructs a primary key information object from the current row of the given result set. |
|
PrimaryKeyInfo(java.lang.String tableCat,
java.lang.String tableSchem,
java.lang.String tableName,
java.lang.String columnName,
short keySeq,
java.lang.String pkName)
Constructs a primary 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 tableCat
public java.lang.String tableSchem
public java.lang.String tableName
public java.lang.String columnName
public short keySeq
public java.lang.String pkName
Constructor Detail |
public PrimaryKeyInfo(java.sql.ResultSet rs) throws java.sql.SQLException
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.getPrimaryKeys().
java.sql.SQLException
- if a column of primary key information could not be retrieved from the
result set.public PrimaryKeyInfo(java.lang.String tableCat, java.lang.String tableSchem, java.lang.String tableName, java.lang.String columnName, short keySeq, java.lang.String pkName)
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 | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |