|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpox.store.rdbms.columninfo.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(String,String,String,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).
RDBMSAdapter.newColumnInfo(java.sql.ResultSet)
Field Summary | |
protected int |
charOctetLength
Indicates the maximum number of bytes in the column (for char types only). |
protected java.lang.String |
columnDef
The default value for the column; may be null. |
protected java.lang.String |
columnName
The column name. |
protected int |
columnSize
Indicates the column size. |
protected short |
dataType
Indicates the JDBC (SQL) data type from Types . |
protected int |
decimalDigits
Indicates the number of fractional digits. |
protected 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. |
protected int |
nullable
Indicates whether the column can be NULL. |
protected int |
numPrecRadix
Indicates the radix, which is typically either 10 or 2. |
protected int |
ordinalPosition
Indicates the index of the column in its table; the first column is 1, the second column is 2, and so on. |
protected java.lang.String |
remarks
An explanatory comment on the column; 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 |
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. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Indicates whether some object is "equal to" this one. |
int |
getCharOctetLength()
Accessor for the maximum no of bytes in a column |
java.lang.String |
getColumnDef()
Accessor for default value for column. |
java.lang.String |
getColumnName()
Accessor for column name |
int |
getColumnSize()
Accessor for the column size. |
short |
getDataType()
Accessor for the JDBC data type. |
int |
getDecimalDigits()
Accessor for no of fractional digits |
java.lang.String |
getIsNullable()
Accessor for nullable attribute. |
int |
getNullable()
Accessor for whether the column can be null |
int |
getNumPrecRadix()
Accessor for the radix |
int |
getOrdinalPosition()
Accessor for the ordinal position. |
java.lang.String |
getRemarks()
Accessor for column 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 |
protected java.lang.String tableCat
protected java.lang.String tableSchem
protected java.lang.String tableName
protected java.lang.String columnName
protected short dataType
Types
.
protected java.lang.String typeName
protected int columnSize
protected int decimalDigits
protected int numPrecRadix
protected int nullable
protected java.lang.String remarks
protected java.lang.String columnDef
protected int charOctetLength
protected int ordinalPosition
protected java.lang.String isNullable
Constructor Detail |
public ColumnInfo(java.sql.ResultSet rs) throws javax.jdo.JDOFatalDataStoreException
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()
.
rs
- The result set returned from
java.sql.DatabaseMetaData.getColumns().
javax.jdo.JDOFatalDataStoreException
- if a column of column information could not be retrieved from the
result set.Method Detail |
public int getDecimalDigits()
public java.lang.String getIsNullable()
public int getNullable()
public int getColumnSize()
public short getDataType()
public int getNumPrecRadix()
public int getCharOctetLength()
public int getOrdinalPosition()
public java.lang.String getColumnDef()
public java.lang.String getRemarks()
public java.lang.String getTypeName()
public java.lang.String getTableName()
public java.lang.String getColumnName()
public java.lang.String getTableCat()
public java.lang.String getTableSchem()
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 |