org.objectweb.telosys.dal.metadata
Class DbColumn

java.lang.Object
  extended byorg.objectweb.telosys.dal.metadata.DbColumn

public class DbColumn
extends java.lang.Object

POJO for storage of MetaData about Columns of a Table from a database


Constructor Summary
DbColumn()
           
DbColumn(java.lang.String tableCatalog, java.lang.String tableSchema, java.lang.String tableName, java.lang.String columnName, int dataType, java.lang.String typeName, int columnSize, int bufferLength, int decimalDigits, int numPrecRadix, int nullable, java.lang.String remarks, java.lang.String columnDef, int sqlDataType, int sqlDatetimeSub, int charOctetLength, int ordinalPosition, java.lang.String isNullable, java.lang.String scopeCatalog, java.lang.String scopeSchema, java.lang.String scopeTable, java.lang.String sourceDataType, boolean primaryKey)
           
 
Method Summary
 int getBufferLength()
          Is not used
 int getCharOctetLength()
          for char types the maximum number of bytes in the column
 java.lang.String getColumnDef()
          May be null.
 java.lang.String getColumnName()
           
 int getColumnSize()
          column size.
 int getDataType()
          SQL type from java.sql.Types
 int getDecimalDigits()
          The number of fractional digits
 java.lang.String getIsNullable()
          "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values.
 int getNullable()
          is NULL allowed.
 int getNumPrecRadix()
          Radix (typically either 10 or 2)
 int getOrdinalPosition()
          index of column in table (starting at 1)
 java.lang.String getRemarks()
          Comment describing column May be null
 java.lang.String getScopeCatalog()
          catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)
 java.lang.String getScopeSchema()
          schema of table that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)
 java.lang.String getScopeTable()
          table name that this the scope of a reference attribute (null if the DATA_TYPE isn't REF)
 java.lang.String getSourceDataType()
          source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)
 int getSqlDataType()
          Unused;
 int getSqlDatetimeSub()
          Unused
 java.lang.String getTableCatalog()
          May be null.
 java.lang.String getTableName()
           
 java.lang.String getTableSchema()
          May be null.
 java.lang.String getTypeName()
          Data source dependent type name, for a UDT the type name is fully qualified
 boolean isPrimaryKey()
          Return true if the column is a primary key of her table
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DbColumn

public DbColumn(java.lang.String tableCatalog,
                java.lang.String tableSchema,
                java.lang.String tableName,
                java.lang.String columnName,
                int dataType,
                java.lang.String typeName,
                int columnSize,
                int bufferLength,
                int decimalDigits,
                int numPrecRadix,
                int nullable,
                java.lang.String remarks,
                java.lang.String columnDef,
                int sqlDataType,
                int sqlDatetimeSub,
                int charOctetLength,
                int ordinalPosition,
                java.lang.String isNullable,
                java.lang.String scopeCatalog,
                java.lang.String scopeSchema,
                java.lang.String scopeTable,
                java.lang.String sourceDataType,
                boolean primaryKey)

DbColumn

public DbColumn()
Method Detail

getTableCatalog

public java.lang.String getTableCatalog()
May be null.

Returns:
String

getTableSchema

public java.lang.String getTableSchema()
May be null.

Returns:
String

getTableName

public java.lang.String getTableName()

getColumnName

public java.lang.String getColumnName()

getDataType

public int getDataType()
SQL type from java.sql.Types

Returns:
int

getTypeName

public java.lang.String getTypeName()
Data source dependent type name, for a UDT the type name is fully qualified

Returns:
String

getColumnSize

public int getColumnSize()
column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision.

Returns:
int

getBufferLength

public int getBufferLength()
Is not used

Returns:
int

getDecimalDigits

public int getDecimalDigits()
The number of fractional digits

Returns:
int

getNumPrecRadix

public int getNumPrecRadix()
Radix (typically either 10 or 2)

Returns:
int

getNullable

public int getNullable()
is NULL allowed. Values : columnNoNulls - might not allow NULL values columnNullable - definitely allows NULL values columnNullableUnknown - nullability unknown

Returns:
int

getRemarks

public java.lang.String getRemarks()
Comment describing column May be null

Returns:
String

getColumnDef

public java.lang.String getColumnDef()
May be null.

Returns:
String

getSqlDataType

public int getSqlDataType()
Unused;

Returns:
int

getSqlDatetimeSub

public int getSqlDatetimeSub()
Unused

Returns:
int

getCharOctetLength

public int getCharOctetLength()
for char types the maximum number of bytes in the column

Returns:
int

getOrdinalPosition

public int getOrdinalPosition()
index of column in table (starting at 1)

Returns:
int

getIsNullable

public java.lang.String getIsNullable()
"NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means nobody knows.

Returns:
String

getScopeCatalog

public java.lang.String getScopeCatalog()
catalog of table that is the scope of a reference attribute (null if DATA_TYPE isn't REF)

Returns:
String

getScopeSchema

public java.lang.String getScopeSchema()
schema of table that is the scope of a reference attribute (null if the DATA_TYPE isn't REF)

Returns:
String

getScopeTable

public java.lang.String getScopeTable()
table name that this the scope of a reference attribute (null if the DATA_TYPE isn't REF)

Returns:
String

getSourceDataType

public java.lang.String getSourceDataType()
source type of a distinct type or user-generated Ref type, SQL type from java.sql.Types (null if DATA_TYPE isn't DISTINCT or user-generated REF)

Returns:
String

isPrimaryKey

public boolean isPrimaryKey()
Return true if the column is a primary key of her table

Returns:
boolean

toString

public java.lang.String toString()