|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mortbay.JDBC.Column
Meta data for database column
Provides the Type, name, label and size of a column in a JDBC database.
DATETIME and ENUMs are converted to int as mSQL does not support those types yet.
See TestHarness
Class.ThisShouldHaveBeenChanged
Field Summary | |
static int |
DATETIME
|
static int |
ENUM
|
static int |
INT
|
static int |
KEY
|
static int |
NONE
|
static int |
PRIMARY
|
static int |
REAL
|
Constructor Summary | |
Column(java.lang.String name,
java.lang.String label,
int type,
int options)
Column constructor |
|
Column(java.lang.String name,
java.lang.String label,
java.lang.String[] enum,
int options)
Column constructor for enumerated column |
Method Summary | |
static int |
CHAR(int length)
|
static java.lang.String[] |
ENUM(java.lang.String[] e)
|
java.lang.String |
enum2str(int e)
Get the String value of an enumerated type |
DbAdaptor |
getAdaptor()
|
java.lang.String |
getLabel()
|
java.lang.String |
getName()
|
boolean |
isChar()
|
boolean |
isEnum()
|
boolean |
isKey()
|
boolean |
isPrimary()
|
boolean |
isText()
|
boolean |
isType(int type)
|
static void |
main(java.lang.String[] args)
|
java.lang.Object |
nullValue()
Get the null value for column |
int |
size()
|
int |
str2enum(java.lang.String s)
Get the index of a String value of an enumerated type |
static int |
TEXT()
|
static int |
TEXT(int length)
|
java.lang.String |
toClause(java.lang.String op,
java.lang.Object value)
Format the WHERE clause string in the form "colname op value" |
java.lang.String |
toString()
|
java.lang.String |
toString(java.lang.Object value)
Format the value by column type |
static int |
VARCHAR(int length)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final int INT
public static final int REAL
public static final int DATETIME
public static final int ENUM
public static final int NONE
public static final int KEY
public static final int PRIMARY
Constructor Detail |
public Column(java.lang.String name, java.lang.String label, int type, int options)
name
- The name of the column in the database.label
- A long descriptive name of the column for humanstype
- The type of value the column can holdoptional
- status indicators for the columnpublic Column(java.lang.String name, java.lang.String label, java.lang.String[] enum, int options)
name
- The name of the column in the database.label
- A long descriptive name of the column for humansenum
- An array of string enum descriptors.optional
- status indicators for the columnMethod Detail |
public static final int CHAR(int length)
public static final int TEXT()
public static final int TEXT(int length)
public static final int VARCHAR(int length)
public static final java.lang.String[] ENUM(java.lang.String[] e)
public java.lang.String getName()
public java.lang.String getLabel()
public DbAdaptor getAdaptor()
public boolean isKey()
public boolean isPrimary()
public boolean isChar()
public boolean isText()
public boolean isEnum()
public boolean isType(int type)
public int size()
public java.lang.String toString()
public java.lang.String toString(java.lang.Object value)
public java.lang.String toClause(java.lang.String op, java.lang.Object value)
public java.lang.Object nullValue()
public java.lang.String enum2str(int e)
public int str2enum(java.lang.String s)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |