|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.org.ogsadai.converters.databaseschema.ColumnMetaDataImpl
An simple implementation of ColumnMetaData which stores
column metadata.
| Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
|
private int |
mColumnSize
|
private int |
mDataType
|
private int |
mDecimalDigits
|
private java.lang.String |
mFullName
|
private boolean |
mIsNullable
|
private boolean |
mIsPrimaryKey
|
private java.lang.String |
mName
|
private int |
mPosition
|
private TableMetaData |
mTable
|
private java.lang.String |
mTypeName
|
| Constructor Summary | |
ColumnMetaDataImpl(java.lang.String name,
int position,
TableMetaData table)
Constructs a new column metadata object with the given name, column number and table. |
|
| Method Summary | |
int |
getColumnSize()
Returns the column size. |
int |
getDataType()
Returns the java type of the column. |
int |
getDecimalDigits()
Returns the number of decimal digits in this column if the column type is a numerical type. |
java.lang.String |
getFullName()
Returns the full name of the column. |
java.lang.String |
getName()
Returns the name of the column. |
int |
getPosition()
Returns the ordinal position (column number) of this column in the table. |
java.lang.String |
getSQLType()
Returns the SQL type of this column. |
TableMetaData |
getTable()
Returns the table that this column belongs to. |
boolean |
isNullable()
Indicates whether this column can contain NULL
values. |
boolean |
isPrimaryKey()
Returns the primary key property of this column |
void |
setColumnSize(int colSize)
Set the column size. |
void |
setDataType(int type)
Set the data type of this column. |
void |
setDecimalDigits(int digits)
Set the number of decimal digits. |
void |
setFullName(java.lang.String fullName)
Set the full name of this column. |
void |
setNullable(boolean isNullable)
Specify whether the column can contain the value NULL. |
void |
setPrimaryKey(boolean isPrimaryKey)
Sets the primary key property of this column. |
void |
setTypeName(java.lang.String name)
Set the SQL type name of this column. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private java.lang.String mName
private java.lang.String mFullName
private int mPosition
private TableMetaData mTable
private int mDataType
private java.lang.String mTypeName
private int mColumnSize
private int mDecimalDigits
private boolean mIsNullable
private boolean mIsPrimaryKey
| Constructor Detail |
public ColumnMetaDataImpl(java.lang.String name,
int position,
TableMetaData table)
name - Column name.position - Column number.table - Table where this column is stored.| Method Detail |
public void setFullName(java.lang.String fullName)
fullName - Full name.public void setDataType(int type)
type - Data type.public void setTypeName(java.lang.String name)
name - SQL type name.public void setColumnSize(int colSize)
colSize - Column size.public void setDecimalDigits(int digits)
digits - Decimal digits.public void setNullable(boolean isNullable)
NULL.
isNullable - true if the column is nullable,
false otherwise.public void setPrimaryKey(boolean isPrimaryKey)
isPrimaryKey - true if column is a primary key.public java.lang.String getName()
ColumnMetaData
getName in interface ColumnMetaDatapublic java.lang.String getFullName()
ColumnMetaData
getFullName in interface ColumnMetaDatapublic TableMetaData getTable()
ColumnMetaData
getTable in interface ColumnMetaDatapublic int getPosition()
ColumnMetaData
getPosition in interface ColumnMetaDatapublic int getDataType()
ColumnMetaData
getDataType in interface ColumnMetaDatapublic java.lang.String getSQLType()
ColumnMetaData
getSQLType in interface ColumnMetaDatapublic int getColumnSize()
ColumnMetaData
getColumnSize in interface ColumnMetaDatapublic int getDecimalDigits()
ColumnMetaData
getDecimalDigits in interface ColumnMetaData-1 if this
operation is not applicable to the column type.public boolean isNullable()
ColumnMetaDataNULL
values.
isNullable in interface ColumnMetaDatatrue if the column is nullable,
false otherwise.public boolean isPrimaryKey()
ColumnMetaData
isPrimaryKey in interface ColumnMetaDatatrue if this columns forms part of the
primary key.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||