|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.empire.commons.ErrorObject
org.apache.empire.db.DBObject
org.apache.empire.db.DBExpr
org.apache.empire.db.DBColumnExpr
org.apache.empire.db.DBColumn
public abstract class DBColumn
This is the base class for all database columns that have a physical representation. i.e. either table or view columns (DBTableColumn oder DBViewColumn)
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
Field Summary | |
---|---|
static java.lang.String |
DBCOLATTR_MANDATORY
|
static java.lang.String |
DBCOLATTR_READONLY
|
Fields inherited from class org.apache.empire.db.DBColumnExpr |
---|
DBCOLATTR_TITLE, DBCOLATTR_TYPE |
Fields inherited from class org.apache.empire.db.DBExpr |
---|
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESES, CTX_VALUE |
Method Summary | |
---|---|
void |
addReferencedColumns(java.util.Set<DBColumn> list)
Internal function to obtain all DBColumnExpr-objects used by this expression. |
void |
addSQL(java.lang.StringBuilder buf,
long context)
Adds the colunm name to the SQL-Command. |
abstract org.w3c.dom.Element |
addXml(org.w3c.dom.Element parent,
long flags)
Add a description of this column with relevant metadata to the supplied parent XML Element. |
abstract boolean |
checkValue(java.lang.Object value)
|
java.lang.Object |
getAttribute(java.lang.String name)
Returns the value of a column attribute. |
java.lang.String |
getComment()
Returns a comment describing the column in the data scheme. |
DBDatabase |
getDatabase()
Returns the database object to which this object belongs to. |
java.lang.String |
getFullName()
Returns the full qualified column name. |
java.lang.String |
getName()
Returns the column name. |
Options |
getOptions()
Returns the list of options for this column containing all possbile field values. |
DBRowSet |
getRowSet()
Returns DBTable, DBQuery or DBView object. |
abstract double |
getSize()
Returns the size of the column. |
DBColumn |
getUpdateColumn()
Returns this object. |
boolean |
isAggregate()
Always returns false since DBColumns cannot be aggregates. |
abstract boolean |
isReadOnly()
Returns true if the column is read-only. |
abstract boolean |
isRequired()
Returns true if the column is required. |
void |
setComment(java.lang.String comment)
Sets a comment describing the current column. |
DBSetExpr |
to(java.lang.Object value)
Creates and returns a new DBSetExpr object. |
java.lang.String |
toString()
Override the toString method. |
Methods inherited from class org.apache.empire.db.DBColumnExpr |
---|
abs, append, as, as, avg, cmp, coalesce, convertTo, convertTo, count, countDistinct, day, decode, decode, decode, decode, decode, decode, divideBy, getBeanPropertyName, getControlType, getDataType, getSourceColumn, getTitle, in, indexOf, indexOf, indexOf, is, isBetween, isGreaterThan, isLessOrEqual, isMoreOrEqual, isNot, isNotBetween, isSmallerThan, length, like, like, likeLower, likeUpper, lower, max, min, minus, minus, month, multiplyWith, 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 |
Methods inherited from class org.apache.empire.db.DBExpr |
---|
getValueClass |
Methods inherited from class org.apache.empire.commons.ErrorObject |
---|
clearError, getErrorMessage, getErrorParams, getErrorSource, getErrorType, getMessage, hasError, isExceptionsEnabled, setExceptionsEnabled |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.empire.data.ColumnExpr |
---|
getBeanPropertyName, getControlType, getDataType, getSourceColumn, getTitle |
Field Detail |
---|
public static final java.lang.String DBCOLATTR_MANDATORY
public static final java.lang.String DBCOLATTR_READONLY
Method Detail |
---|
public abstract double getSize()
getSize
in interface Column
public abstract boolean isRequired()
isRequired
in interface Column
public abstract boolean isReadOnly()
isReadOnly
in interface Column
public abstract boolean checkValue(java.lang.Object value)
public abstract org.w3c.dom.Element addXml(org.w3c.dom.Element parent, long flags)
DBColumnExpr
addXml
in class DBColumnExpr
parent
- the parent element to which to append the column descriptionflags
- currenly not used
public DBDatabase getDatabase()
DBObject
getDatabase
in class DBObject
public void addReferencedColumns(java.util.Set<DBColumn> list)
DBExpr
addReferencedColumns
in class DBExpr
list
- list to which all used column expressions must be addedDBExpr.addReferencedColumns(Set)
public void addSQL(java.lang.StringBuilder buf, long context)
addSQL
in class DBExpr
buf
- the SQL statmentcontext
- the current SQL-Command contextpublic DBColumn getUpdateColumn()
getUpdateColumn
in class DBColumnExpr
public boolean isAggregate()
isAggregate
in class DBColumnExpr
public DBRowSet getRowSet()
public java.lang.String getName()
getName
in interface ColumnExpr
getName
in class DBColumnExpr
public java.lang.String getFullName()
public java.lang.Object getAttribute(java.lang.String name)
DBColumnExpr
getAttribute
in interface ColumnExpr
getAttribute
in class DBColumnExpr
name
- the attribute name
DBColumnExpr.getAttribute(String)
public Options getOptions()
DBColumnExpr
getOptions
in interface ColumnExpr
getOptions
in class DBColumnExpr
DBColumnExpr.getOptions()
public DBSetExpr to(java.lang.Object value)
value
- the Object value
DBSetExpr
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getComment()
public void setComment(java.lang.String comment)
comment
- the column comment
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |