public abstract class DBColumn extends DBColumnExpr implements Column
The column object describes a database column and thus provides metadata. Other non data model specific metadata may be added through attributes.
DBTableColumn
,
DBView.DBViewColumn
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected String |
comment |
static String |
DBCOLATTR_READONLY
Read only column (Boolean)
|
static String |
DBCOLATTR_SINGLEBYTECHARS
Read only column (Boolean)
|
protected String |
name |
protected DBRowSet |
rowset |
attributes, beanPropertyName, DBCOLATTR_TITLE, DBCOLATTR_TYPE, options
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESES, CTX_VALUE
COLATTR_CURRENCY_CODE, COLATTR_DATETIMEPATTERN, COLATTR_ENUMTYPE, COLATTR_FRACTION_DIGITS, COLATTR_MAXVALUE, COLATTR_MINLENGTH, COLATTR_MINVALUE, COLATTR_NUMBER_GROUPSEP, COLATTR_NUMBER_TYPE, COLATTR_REGEXP, COLATTR_TITLE, COLATTR_TOOLTIP, COLATTR_TYPE
Modifier | Constructor and Description |
---|---|
protected |
DBColumn(DBRowSet rowset,
String name)
Constructs a DBColumn object and set the specified parameters to this object.
|
Modifier and Type | Method and Description |
---|---|
void |
addReferencedColumns(Set<DBColumn> list)
Internal function to obtain all DBColumnExpr-objects used by this expression.
|
void |
addSQL(StringBuilder buf,
long context)
Adds the colunm name to the SQL-Command.
|
abstract Element |
addXml(Element parent,
long flags)
Add a description of this column with relevant metadata
to the supplied parent XML Element.
|
void |
checkValue(Object value)
Deprecated.
use validate() instead
|
boolean |
equals(Object other) |
static DBColumn |
findById(String columnId)
returns a rowset by its identifier
|
String |
getAlias()
returns the qualified alias name for this column
|
Object |
getAttribute(String name)
Returns the value of a column attribute.
|
String |
getComment()
Returns a comment describing the column in the data scheme.
|
DBDatabase |
getDatabase()
Returns the database object to which this object belongs to.
|
String |
getFullName()
Returns the full qualified column name.
|
String |
getId()
Gets an identifier for this RowSet Object
|
String |
getName()
Returns the column name.
|
Options |
getOptions()
Returns the list of options for this column
containing all possible field values.
|
DBRowSet |
getRowSet()
Returns DBTable, DBQuery or DBView object.
|
abstract double |
getSize()
Returns the size of the column.
|
DBColumn |
getUpdateColumn()
Returns this object.
|
int |
hashCode() |
boolean |
isAggregate()
Always returns false since DBColumns cannot be aggregates.
|
abstract boolean |
isAutoGenerated()
Returns true if column is a columns value is an automatically generated value
|
abstract boolean |
isReadOnly()
Returns true if the column is read-only.
|
abstract boolean |
isRequired()
Returns true if the column is required.
|
DBColumnExpr |
qualified()
returns an expression that renames the column with its alias name
|
void |
setComment(String comment)
Sets a comment describing the current column.
|
DBSetExpr |
to(Object value)
Creates and returns a new DBSetExpr object.
|
String |
toString()
Override the toString method.
|
abstract Object |
validate(Object value)
Checks if the given value is a valid value for this column
If not, an exception is thrown
|
abs, append, as, as, asc, avg, ceiling, cmp, coalesce, convertTo, convertTo, count, countDistinct, day, decode, decode, decode, decode, decode, decode, desc, divideBy, floor, getBeanPropertyName, getControlType, getDataType, getExprFromPhrase, getExprFromPhrase, getSourceColumn, getTitle, in, in, in, indexOf, indexOf, indexOf, is, isBetween, isGreaterThan, isLessOrEqual, isMoreOrEqual, isNot, isNotBetween, isSmallerThan, length, like, like, likeLower, likeUpper, lower, max, min, minus, minus, modulo, month, multiplyWith, notIn, notIn, notIn, notLike, nvl, parenthesis, plus, plus, replace, reverse, round, setAttribute, setBeanPropertyName, setControlType, setOptions, setTitle, substring, substring, substring, substring, substring, substring, sum, toChar, toChar, trim, trimLeft, trimRight, trunc, upper, when, year
getObjectValue, getValueClass
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getBeanPropertyName, getControlType, getDataType, getSourceColumn, getTitle
public static final String DBCOLATTR_READONLY
public static final String DBCOLATTR_SINGLEBYTECHARS
protected final transient DBRowSet rowset
protected final String name
protected String comment
public String getId()
public static DBColumn findById(String columnId)
columnId
- the id of the columnpublic abstract double getSize()
public abstract boolean isRequired()
isRequired
in interface Column
public abstract boolean isAutoGenerated()
isAutoGenerated
in interface Column
public abstract boolean isReadOnly()
isReadOnly
in interface Column
public abstract Object validate(Object value)
@Deprecated public final void checkValue(Object value)
public abstract Element addXml(Element parent, long flags)
DBColumnExpr
addXml
in class DBColumnExpr
parent
- the parent element to which to append the column descriptionflags
- currently not usedpublic DBDatabase getDatabase()
DBObject
getDatabase
in class DBObject
public void addReferencedColumns(Set<DBColumn> list)
DBExpr
addReferencedColumns
in class DBExpr
list
- list to which all used column expressions must be addedDBExpr.addReferencedColumns(Set)
public void addSQL(StringBuilder buf, long context)
public DBColumn getUpdateColumn()
getUpdateColumn
in class DBColumnExpr
public boolean isAggregate()
isAggregate
in class DBColumnExpr
public DBRowSet getRowSet()
public String getName()
getName
in interface ColumnExpr
getName
in class DBColumnExpr
public String getFullName()
public String getAlias()
public DBColumnExpr qualified()
public Object getAttribute(String name)
DBColumnExpr
getAttribute
in interface ColumnExpr
getAttribute
in class DBColumnExpr
name
- the attribute nameDBColumnExpr.getAttribute(String)
public Options getOptions()
DBColumnExpr
getOptions
in interface ColumnExpr
getOptions
in class DBColumnExpr
DBColumnExpr.getOptions()
public DBSetExpr to(Object value)
value
- the Object valueDBSetExpr
public String toString()
public String getComment()
public void setComment(String comment)
comment
- the column commentCopyright © 2008–2018 Apache Software Foundation. All rights reserved.