|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.triactive.jdo.store.adapter.CatalogInfo
com.triactive.jdo.store.adapter.ColumnInfo
Represents the metadata of a specific table column.
This class is basically a data structure that makes accessing the JDBC column
metadata easier.
Each of the items returned by DatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
is
represented by a public field in this class.
Subclasses of ColumnInfo 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.newColumnInfo(java.sql.ResultSet)
,
DatabaseMetaData.getColumns(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
Field Summary | |
int |
charOctetLength
Indicates the maximum number of bytes in the column (for char types only). |
java.lang.String |
columnDef
The default value for the column; may be null. |
java.lang.String |
columnName
The column name. |
int |
columnSize
Indicates the column size. |
short |
dataType
Indicates the JDBC (SQL) data type from Types . |
int |
decimalDigits
Indicates the number of fractional digits. |
java.lang.String |
isNullable
Either "NO" indicating that the column definitely does not allow null values, "YES" indicating that the column might allow null values, or an empty string ("") indicating that nullability is unknown. |
int |
nullable
Indicates whether the column can be NULL. |
int |
numPrecRadix
Indicates the radix, which is typically either 10 or 2. |
int |
ordinalPosition
Indicates the index of the column in its table; the first column is 1, the second column is 2, and so on. |
java.lang.String |
remarks
An explanatory comment on the column; may be null. |
java.lang.String |
tableCat
The table catalog, which may be null. |
java.lang.String |
tableName
The table name. |
java.lang.String |
tableSchem
The table schema, which may be null. |
java.lang.String |
typeName
The local type name used by the data source. |
Constructor Summary | |
ColumnInfo(java.sql.ResultSet rs)
Constructs a column information object from the current row of the given result set. |
|
ColumnInfo(java.lang.String tableCat,
java.lang.String tableSchem,
java.lang.String tableName,
java.lang.String columnName,
short dataType,
java.lang.String typeName,
int columnSize,
int decimalDigits,
int numPrecRadix,
int nullable,
java.lang.String remarks,
java.lang.String columnDef,
int charOctetLength,
int ordinalPosition,
java.lang.String isNullable)
Constructs a column 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 dataType
Types
.
public java.lang.String typeName
public int columnSize
public int decimalDigits
public int numPrecRadix
public int nullable
DatabaseMetaData.columnNoNulls
,
DatabaseMetaData.columnNullable
,
DatabaseMetaData.columnNullableUnknown
public java.lang.String remarks
public java.lang.String columnDef
public int charOctetLength
public int ordinalPosition
public java.lang.String isNullable
Constructor Detail |
public ColumnInfo(java.sql.ResultSet rs) throws java.sql.SQLException
ResultSet
object passed must have been obtained
from a call to 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()
.
rs
- The result set returned from DatabaseMetaData.getColumns().
java.sql.SQLException
- if a column of column information could not be retrieved from the
result set.public ColumnInfo(java.lang.String tableCat, java.lang.String tableSchem, java.lang.String tableName, java.lang.String columnName, short dataType, java.lang.String typeName, int columnSize, int decimalDigits, int numPrecRadix, int nullable, java.lang.String remarks, java.lang.String columnDef, int charOctetLength, int ordinalPosition, java.lang.String isNullable)
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 |