public class Column extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Column.Type
Data types.
|
Modifier and Type | Field and Description |
---|---|
static Column |
AUTOINCID
An auto-incrementing integer column.
|
static Column |
BLOB
A BLOB column.
|
static Column |
BOOLEAN
A boolean column.
|
static Column |
INTEGER
An integer column.
|
static Column |
MD5_BINARY
An MD5 binary column.
|
static Column |
MD5_TEXT
An MD5 text column.
|
static Column |
NULLABLE_INTEGER
An integer column that can be null.
|
static Column |
NULLABLE_MD5_TEXT
An MD5 text column that can be null.
|
static Column |
NULLABLE_TEXT
A text column that can be null.
|
static Column |
PK_INTEGER
A primary key integer column.
|
static Column |
PK_MD5_BINARY |
static Column |
PK_MD5_TEXT
A primary key MD5 text column.
|
static Column |
PK_TEXT
A primary key text column.
|
static Column |
PK_UUID_TEXT
A column for text UUIDs that are primary keys.
|
static Column |
TEXT
A text column.
|
static Column |
TEXT_UNLIMITED
A text column with no maximum length.
|
static Column |
TIMESTAMP
A timestamp column.
|
static Column |
UUID_TEXT
A column for text UUIDs.
|
Constructor and Description |
---|
Column(Column.Type type)
Construct a Column with a type.
|
Column(Column.Type type,
boolean autoIncrement)
Construct a Column with a type and specify auto-increment.
|
Column(Column.Type type,
boolean autoIncrement,
boolean primary)
Construct a Column with a type and specify auto-increment and
primary key.
|
Column(Column.Type type,
boolean autoIncrement,
boolean primary,
boolean nullAllowed)
Construct a Column with a type and specify auto-increment,
primary key, and if null values are allowed.
|
Column(Column.Type type,
int length)
Construct a Column with a type and type length.
|
Column(Column.Type type,
int length,
boolean nullAllowed)
Construct a Column with a type and type length, and specifying if
can be null.
|
Column(Column.Type type,
int length,
boolean nullAllowed,
boolean primary)
Construct a Column with a type and type length, and specifying if
can be null or a primary key.
|
Column(Column.Type type,
java.lang.String defaultValue)
Construct a Column with a type and a default value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultValue()
Get the default value.
|
int |
getLength()
Get the length of the column's type.
|
java.lang.String |
getName()
Get the name.
|
Table |
getTable()
Get the containing table.
|
Column.Type |
getType()
Get the data type.
|
boolean |
isAutoIncrement()
Returns true if column value is auto-incremented.
|
boolean |
isNullAllowed()
Returns true if column can have null values.
|
boolean |
isPrimaryKey()
Returns true if column is primary key.
|
void |
setName(java.lang.String name)
Set the name.
|
java.lang.String |
toString()
Get a string representation of the column.
|
public static final Column MD5_BINARY
public static final Column NULLABLE_INTEGER
public static final Column NULLABLE_MD5_TEXT
public static final Column NULLABLE_TEXT
public static final Column PK_INTEGER
public static final Column PK_MD5_TEXT
public static final Column PK_MD5_BINARY
public static final Column PK_TEXT
public static final Column TEXT_UNLIMITED
public static final Column PK_UUID_TEXT
public Column(Column.Type type)
public Column(Column.Type type, boolean autoIncrement)
public Column(Column.Type type, boolean autoIncrement, boolean primary)
public Column(Column.Type type, boolean autoIncrement, boolean primary, boolean nullAllowed)
public Column(Column.Type type, int length)
public Column(Column.Type type, int length, boolean nullAllowed)
public Column(Column.Type type, int length, boolean nullAllowed, boolean primary)
public Column(Column.Type type, java.lang.String defaultValue)
public java.lang.String getDefaultValue()
public int getLength()
public java.lang.String getName()
public Table getTable()
public Column.Type getType()
public boolean isAutoIncrement()
public boolean isNullAllowed()
public boolean isPrimaryKey()
public void setName(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object