public class Column
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
isIdentityColumn
true if column is identity column. |
boolean |
isNullable
true if column is nullable. |
boolean |
isVirtual
true if column is virtual. |
int |
length
The length (for VARCHAR, DECIMAL, ...) or
0 if type-length is not variable. |
java.lang.String |
name
The name.
|
int |
precision
The precision (for DECIMAL, NUMBER ...) or
-1 if precision is not variable. |
java.lang.String |
type
The type.
|
Constructor and Description |
---|
Column(java.lang.String name,
java.lang.String type,
int length,
int precision)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Filter |
getFilter()
Gets filter for server-side column data filtering.
|
java.lang.String |
getFilterExpression()
Gets SQL expression for server-side column data filtering.
|
int |
hashCode() |
boolean |
isVirtual()
Returns
true iff this column cannot be updated. |
static Column |
parse(java.lang.String columnDeclaration)
Parses a column declaration in SQL syntax.
|
static Column |
parse(java.lang.String columnName,
java.lang.String theColumnDeclaration)
Parses a column declaration in SQL syntax.
|
void |
setFilter(Filter filter)
Sets filter for server-side column data filtering.
|
java.lang.String |
toSQL(java.lang.String columnPrefix)
Returns the column definition in SQL syntax.
|
java.lang.String |
toSQL(java.lang.String columnPrefix,
java.util.Map<java.lang.String,java.lang.String> typeReplacement)
Returns the primary key in SQL syntax.
|
java.lang.String |
toString()
Returns a string representation of the column.
|
public final java.lang.String name
public final java.lang.String type
public final int length
0
if type-length is not variable.public final int precision
-1
if precision is not variable.public boolean isIdentityColumn
true
if column is identity column.public boolean isVirtual
true
if column is virtual.public boolean isNullable
true
if column is nullable.public Column(java.lang.String name, java.lang.String type, int length, int precision)
name
- the name (upper-case)type
- the type (in SQL)length
- the length (for VARCHAR, DECIMAL, ...) or 0
if type-length is not variableprecision
- the precision (for DECIMAL, NUMBER ...) or -1
if precision is not variablepublic java.lang.String getFilterExpression()
Filter.OLD_VALUE_PROP
is replaced by column name.null
, if no filter is defined for this columnpublic Filter getFilter()
null
, if no filter is defined for this columnpublic void setFilter(Filter filter)
filter
- SQL expression for server-side column data filtering
or null
, if no filter is defined for this columnpublic static Column parse(java.lang.String columnDeclaration)
columnDeclaration
- the column declaration in SQL syntaxpublic static Column parse(java.lang.String columnName, java.lang.String theColumnDeclaration)
theColumnDeclaration
- the column declaration in SQL syntaxcolumnName
- (optional) name of columnpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toSQL(java.lang.String columnPrefix, java.util.Map<java.lang.String,java.lang.String> typeReplacement)
columnPrefix
- an optional prefix for each PK-columntypeReplacement
- column types replacementspublic java.lang.String toSQL(java.lang.String columnPrefix)
columnPrefix
- an optional prefix for the column namepublic java.lang.String toString()
toString
in class java.lang.Object
public boolean isVirtual()
true
iff this column cannot be updated.true
iff this column cannot be updated