|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.database.DataTableColumnDef
public class DataTableColumnDef
All the information regarding a column in a table.
Field Summary | |
---|---|
TType |
type
The TType object for this column. |
Constructor Summary | |
---|---|
DataTableColumnDef()
Constructs the column definition. |
|
DataTableColumnDef(DataTableColumnDef column_def)
Creates a copy of the given column definition. |
Method Summary | |
---|---|
java.lang.Class |
classType()
Returns the Class of Java object that represents this column. |
ColumnDescription |
columnDescriptionValue(java.lang.String column_name)
Returns this column as a ColumnDescription object and gives the column description the given name. |
static DataTableColumnDef |
createBinaryColumn(java.lang.String name)
Convenience helper - creates a DataTableColumnDef that holds a binary value. |
static DataTableColumnDef |
createBooleanColumn(java.lang.String name)
Convenience helper - creates a DataTableColumnDef that holds a boolean value. |
static DataTableColumnDef |
createNumericColumn(java.lang.String name)
Convenience helper - creates a DataTableColumnDef that holds a numeric value. |
static DataTableColumnDef |
createStringColumn(java.lang.String name)
Convenience helper - creates a DataTableColumnDef that holds a string value. |
void |
dump(java.io.PrintStream out)
Dumps information about this object to the PrintStream. |
java.lang.String |
getClassConstraint()
If this column represents a Java Object, this returns the name of the class the objects stored in the column must be derived from. |
java.lang.Class |
getClassConstraintAsClass()
If this column represents a Java Object, this returns the class object that is the constraining class for the column. |
int |
getDBType()
|
java.lang.String |
getDBTypeString()
Returns the type as a String. |
int |
getDecomposition()
|
Expression |
getDefaultExpression(TransactionSystem system)
|
java.lang.String |
getDefaultExpressionString()
|
java.lang.String |
getForeignKey()
Deprecated. |
java.lang.String |
getIndexScheme()
Returns the name of the scheme we use to index this column. |
java.lang.String |
getLocaleString()
|
java.lang.String |
getName()
|
int |
getScale()
|
int |
getSize()
|
int |
getSQLType()
|
java.lang.String |
getSQLTypeString()
Returns the type as a String. |
int |
getStrength()
|
TType |
getTType()
Returns the TType for this column. |
void |
initTTypeInfo()
Initializes the TType information for a column. |
boolean |
isIndexableType()
Returns true if this type of column is able to be indexed. |
boolean |
isNotNull()
|
void |
setClassConstraint(java.lang.String class_constraint)
If this column represents a Java object, this must be a class the object is derived from to be added to this column. |
void |
setDBType(int db_type)
|
void |
setDefaultExpression(Expression expression)
|
void |
setForeignKey(java.lang.String foreign_key)
Deprecated. |
void |
setFromTType(TType type)
Sets this DataTableColumnDef object up from information in the TType object. |
void |
setIndexScheme(java.lang.String index_scheme)
Sets the indexing scheme for this column. |
void |
setName(java.lang.String name)
|
void |
setNotNull(boolean status)
|
void |
setScale(int scale)
|
void |
setSize(int size)
|
void |
setSQLType(int sql_type)
|
void |
setStringLocale(java.lang.String locale_str,
int strength,
int decomposition)
|
static java.lang.String |
sqlTypeToString(int sql_type)
Returns a string that represents the given SQLType enumeration passed to it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public TType type
Constructor Detail |
---|
public DataTableColumnDef()
public DataTableColumnDef(DataTableColumnDef column_def)
Method Detail |
---|
public void setName(java.lang.String name)
public void setNotNull(boolean status)
public void setSQLType(int sql_type)
public void setDBType(int db_type)
public void setSize(int size)
public void setScale(int scale)
public void setStringLocale(java.lang.String locale_str, int strength, int decomposition)
public void setDefaultExpression(Expression expression)
public void setForeignKey(java.lang.String foreign_key)
public void setIndexScheme(java.lang.String index_scheme)
public void setClassConstraint(java.lang.String class_constraint)
public void setFromTType(TType type)
public void initTTypeInfo()
public java.lang.String getName()
public boolean isNotNull()
public int getSQLType()
public java.lang.String getSQLTypeString()
public java.lang.String getDBTypeString()
public java.lang.Class classType()
public int getDBType()
public int getSize()
public int getScale()
public java.lang.String getLocaleString()
public int getStrength()
public int getDecomposition()
public Expression getDefaultExpression(TransactionSystem system)
public java.lang.String getDefaultExpressionString()
public java.lang.String getForeignKey()
public java.lang.String getIndexScheme()
public boolean isIndexableType()
public java.lang.String getClassConstraint()
public java.lang.Class getClassConstraintAsClass()
public TType getTType()
public ColumnDescription columnDescriptionValue(java.lang.String column_name)
public void dump(java.io.PrintStream out)
public static java.lang.String sqlTypeToString(int sql_type)
public static DataTableColumnDef createNumericColumn(java.lang.String name)
public static DataTableColumnDef createBooleanColumn(java.lang.String name)
public static DataTableColumnDef createStringColumn(java.lang.String name)
public static DataTableColumnDef createBinaryColumn(java.lang.String name)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |