|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.jdc.lang.Object
|
+--com.jdc.lang.SerializableObject
|
+--com.jdc.rdb.Column
A default implementation of com.jdc.rdb.tbl.Column. All application database
table column classes should subclass this database table Column class
or one of its subclasses, including:
DateColumn - A table column that represents a Date.
DecimalColumn - A table column that represents a decimal value.
IntegerColumn - A table column that represents an integer value.
TextColumn - A table column that represents a text or String value.
TimestampColumn - A table column that represents a Timestamp.
Column is defined by its attributes. The following are
attributes of database table columns:
DataType - The table column type, i.e. Date, Decimal, Integer, Text, Timestamp, etc.
Table,
Serialized Form| Field Summary | |
static boolean |
ALLOW_NULL
Denotes that the database table column may contain a null value. |
static boolean |
NOT_NULL
Denotes that the database table column may not contain a null value. |
| Fields inherited from class com.jdc.lang.Object |
string |
| Fields inherited from interface com.jdc.db.Column |
NULL |
| Constructor Summary | |
protected |
Column(DataType type,
String name,
String alias,
boolean allowNull)
Constructs a new database table Column object for the specified
column type, name, alias, and allow null status. |
protected |
Column(DataType type,
String name,
String alias,
int length,
boolean allowNull)
Constructs a new database table Column object for the specified
column type, name, alias, length, and allow null status. |
protected |
Column(DataType type,
String name,
String alias,
int precision,
int scale,
boolean allowNull)
Constructs a new database table Column object for the specified
column type, name, alias, precision, scale, and allow null status. |
| Method Summary | |
boolean |
equals(Object object)
Compares this Column object to the specified object. |
String |
getAlias()
Returns the database table column alias. |
int |
getLength()
Returns the database table column length for character table columns. |
String |
getName()
Returns the database table column name. |
int |
getPrecision()
Returns the database table column precision for numeric table columns. |
int |
getScale()
Returns the database table column scale for numeric table columns. |
DataType |
getType()
Returns the database table column data type. |
boolean |
isAllowNull()
Returns true if the database table column allows a null value. |
String |
toString()
Returns a String representing this Column object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.jdc.db.Column |
newInstance |
| Field Detail |
public static final boolean ALLOW_NULL
public static final boolean NOT_NULL
| Constructor Detail |
protected Column(DataType type,
String name,
String alias,
int length,
boolean allowNull)
Column object for the specified
column type, name, alias, length, and allow null status.
The specified text column length determines the database table column type. If
the column length is less than 16 characters, the database table column type will
be DataType.CHAR. Otherwise, the database table column type will be
DataType.VARCHAR
protected Column(DataType type,
String name,
String alias,
int precision,
int scale,
boolean allowNull)
Column object for the specified
column type, name, alias, precision, scale, and allow null status.
protected Column(DataType type,
String name,
String alias,
boolean allowNull)
Column object for the specified
column type, name, alias, and allow null status.
Although this constructor is valid for any DataType, it is
provided primarily in order to create the following Column types:
| Method Detail |
public boolean equals(Object object)
Column object to the specified object. Returns
true if the name and alias for the specified Column
is equal to the name and alias for this Column.
equals in class ObjectTrue if a specified object is equal to this Column object. False if the specified object is not equal to this Column objectpublic String getAlias()
getAlias in interface Columnpublic int getLength()
getLength in interface Columnpublic String getName()
Column
getName in interface Columnpublic int getPrecision()
Column
getPrecision in interface Columnpublic int getScale()
Column
getScale in interface Columnpublic DataType getType()
Column
getType in interface Columnpublic boolean isAllowNull()
true if the database table column allows a null value.
isAllowNull in interface ColumnTrue if the database table column allows a null values. False if the database table column does not allow a null value.public String toString()
String representing this Column object.
toString in class ObjectString representing this Column object.
|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||