org.jpox.store.rdbms.columninfo
Class TableInfo

java.lang.Object
  extended byorg.jpox.store.rdbms.columninfo.TableInfo

public class TableInfo
extends java.lang.Object

Represents the metadata of a specific table. This class is basically a data structure that makes accessing the JDBC column metadata easier. Each of the items returned by DatabaseMetaData.getTables(String,String,String,String[]) is represented by a public field in this class. Subclasses of TableInfo can be created on a per-DBMS basis to supply missing metadata or correct faulty metadata obtained from that DBMS's JDBC driver(s).

Version:
$Revision$

Field Summary
protected  java.lang.String refGenName
          Specifies how values in SELF_REFERENCING_COL_NAME are created.
protected  java.lang.String remarks
          explanatory comment on the table.
protected  java.lang.String selfRefColName
          (SELF_REFERENCING_COL_NAME) The local name of the designated "identifier" column of a typed table, which may be null.
protected  java.lang.String tableCat
          The table catalog, which may be null.
protected  java.lang.String tableName
          The table name.
protected  java.lang.String tableSchem
          The table schema, which may be null.
protected  java.lang.String tableType
          Table type.
protected  java.lang.String typeCat
          The local type catalog used by the data source, which may be null.
protected  java.lang.String typeName
          The local type name used by the data source, which may be null.
protected  java.lang.String typeSchem
          The local type schema used by the data source, which may be null.
 
Constructor Summary
TableInfo(java.sql.ResultSet rs)
          Constructs a column information object from the current row of the given result set.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some object is "equal to" this one.
 java.lang.String getRemarks()
          Accessor for table remarks
 java.lang.String getTableCat()
          Accessor for table catalog
 java.lang.String getTableName()
          Accessor for table name
 java.lang.String getTableSchem()
          Accessor for table schema
 java.lang.String getTypeName()
          Accessor for type name
 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

tableCat

protected java.lang.String tableCat
The table catalog, which may be null.


tableSchem

protected java.lang.String tableSchem
The table schema, which may be null.


tableName

protected java.lang.String tableName
The table name.


tableType

protected java.lang.String tableType
Table type. Typical types are "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY", "LOCAL TEMPORARY", "ALIAS", "SYNONYM".


remarks

protected java.lang.String remarks
explanatory comment on the table.


typeCat

protected java.lang.String typeCat
The local type catalog used by the data source, which may be null.


typeSchem

protected java.lang.String typeSchem
The local type schema used by the data source, which may be null.


typeName

protected java.lang.String typeName
The local type name used by the data source, which may be null.


selfRefColName

protected java.lang.String selfRefColName
(SELF_REFERENCING_COL_NAME) The local name of the designated "identifier" column of a typed table, which may be null.


refGenName

protected java.lang.String refGenName
Specifies how values in SELF_REFERENCING_COL_NAME are created. Values are "SYSTEM", "USER", "DERIVED", which may be null.

Constructor Detail

TableInfo

public TableInfo(java.sql.ResultSet rs)
          throws javax.jdo.JDOFatalDataStoreException
Constructs a column information object from the current row of the given result set. The ResultSet object passed must have been obtained from a call to java.sql.DatabaseMetaData.getColumns().

This method only retrieves the values from the current row; the caller is required to advance to the next row with ResultSet.next().

Parameters:
rs - The result set returned from java.sql.DatabaseMetaData.getColumns().
Throws:
javax.jdo.JDOFatalDataStoreException - if a column of column information could not be retrieved from the result set.
Method Detail

getRemarks

public java.lang.String getRemarks()
Accessor for table remarks

Returns:
The remarks on the t

getTypeName

public java.lang.String getTypeName()
Accessor for type name

Returns:
The type name for the column

getTableName

public java.lang.String getTableName()
Accessor for table name

Returns:
The table name for the column

getTableCat

public java.lang.String getTableCat()
Accessor for table catalog

Returns:
The table catalog

getTableSchem

public java.lang.String getTableSchem()
Accessor for table schema

Returns:
The table schema

equals

public final boolean equals(java.lang.Object obj)
Indicates whether some object is "equal to" this one. Two ColumnInfo objects are considered equal if their catalog, schema, table, and column names are all equal.

Parameters:
obj - the reference object with which to compare
Returns:
true if this object is equal to the obj argument; false otherwise.

hashCode

public final int hashCode()
Returns a hash code value for this object.

Returns:
a hash code value for this object.

toString

public java.lang.String toString()
Returns the string representation of this object.

Returns:
string representation of this object.


Copyright © -2007 . All Rights Reserved.