org.apache.empire.db
Class DBView.DBViewColumn

java.lang.Object
  extended by org.apache.empire.db.DBObject
      extended by org.apache.empire.db.DBExpr
          extended by org.apache.empire.db.DBColumnExpr
              extended by org.apache.empire.db.DBColumn
                  extended by org.apache.empire.db.DBView.DBViewColumn
All Implemented Interfaces:
Serializable, Column, ColumnExpr
Enclosing class:
DBView

public static class DBView.DBViewColumn
extends DBColumn

See Also:
Serialized Form

Field Summary
protected  DBColumnExpr expr
           
protected  DBColumn updateColumn
           
 
Fields inherited from class org.apache.empire.db.DBColumn
comment, DBCOLATTR_MANDATORY, DBCOLATTR_MAXVALUE, DBCOLATTR_MINVALUE, DBCOLATTR_READONLY, DBCOLATTR_SINGLEBYTECHARS, name, rowset
 
Fields inherited from class org.apache.empire.db.DBColumnExpr
attributes, beanPropertyName, DBCOLATTR_TITLE, DBCOLATTR_TYPE, options
 
Fields inherited from class org.apache.empire.db.DBExpr
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESES, CTX_VALUE
 
Constructor Summary
protected DBView.DBViewColumn(DBView view, String name, DBColumnExpr expr)
          Constructs a DBViewColumn object set the specified parameters to this object.
 
Method Summary
 Element addXml(Element parent, long flags)
          Add a description of this column with relevant metadata to the supplied parent XML Element.
 Object getAttribute(String name)
          Returns the value of a column attribute.
 DataType getDataType()
          Returns the data type of this column expression.
 Options getOptions()
          Returns the list of options for this column containing all possible field values.
 double getSize()
          Returns the size of the column.
 DBColumnExpr getSourceColumnExpr()
           
 DBView getView()
           
 boolean isAutoGenerated()
          Returns true if column is a columns value is an automatically generated value
 boolean isReadOnly()
          Returns true if the column is read-only.
 boolean isRequired()
          Returns true if the column is required.
 void validate(Object value)
          Checks if the given value is a valid value for this column If not, an exception is thrown
 
Methods inherited from class org.apache.empire.db.DBColumn
addReferencedColumns, addSQL, checkValue, equals, findById, getComment, getDatabase, getFullName, getId, getName, getRowSet, getUpdateColumn, isAggregate, isDateColumn, isLOBColumn, isNumericColumn, isTextColumn, setComment, to, toString
 
Methods inherited from class org.apache.empire.db.DBColumnExpr
abs, append, as, as, asc, avg, cmp, coalesce, convertTo, convertTo, count, countDistinct, day, decode, decode, decode, decode, decode, decode, desc, detectDataType, divideBy, getBeanPropertyName, getControlType, getExprFromPhrase, getExprFromPhrase, 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
getObjectValue, getValueClass
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.empire.data.ColumnExpr
getBeanPropertyName, getControlType, getSourceColumn, getTitle
 

Field Detail

expr

protected final DBColumnExpr expr

updateColumn

protected final DBColumn updateColumn
Constructor Detail

DBView.DBViewColumn

protected DBView.DBViewColumn(DBView view,
                              String name,
                              DBColumnExpr expr)
Constructs a DBViewColumn object set the specified parameters to this object.

Parameters:
view - the DBView object
expr - the DBColumnExpr of the source table
Method Detail

getSourceColumnExpr

public DBColumnExpr getSourceColumnExpr()

getView

public DBView getView()

getDataType

public DataType getDataType()
Description copied from class: DBColumnExpr
Returns the data type of this column expression.

Specified by:
getDataType in interface ColumnExpr
Specified by:
getDataType in class DBColumnExpr
Returns:
the expressions data type
See Also:
DataType

getSize

public double getSize()
Description copied from class: DBColumn
Returns the size of the column.

Specified by:
getSize in interface Column
Specified by:
getSize in class DBColumn
Returns:
Returns the size of the column

isAutoGenerated

public boolean isAutoGenerated()
Description copied from class: DBColumn
Returns true if column is a columns value is an automatically generated value

Specified by:
isAutoGenerated in interface Column
Specified by:
isAutoGenerated in class DBColumn
Returns:
true if column is auto-generated

isReadOnly

public boolean isReadOnly()
Description copied from class: DBColumn
Returns true if the column is read-only.

Specified by:
isReadOnly in interface Column
Specified by:
isReadOnly in class DBColumn
Returns:
Returns true if the column is read-only

isRequired

public boolean isRequired()
Description copied from class: DBColumn
Returns true if the column is required.

Specified by:
isRequired in interface Column
Specified by:
isRequired in class DBColumn
Returns:
Returns true if the column is required

validate

public void validate(Object value)
Description copied from class: DBColumn
Checks if the given value is a valid value for this column If not, an exception is thrown

Specified by:
validate in interface Column
Specified by:
validate in class DBColumn

getAttribute

public Object getAttribute(String name)
Description copied from class: DBColumnExpr
Returns the value of a column attribute. Column attributes are used to provide metadata for a column.

Specified by:
getAttribute in interface ColumnExpr
Overrides:
getAttribute in class DBColumn
Parameters:
name - the attribute name
Returns:
value of the attribute if it exists or null otherwise
See Also:
DBColumnExpr.getAttribute(String)

getOptions

public Options getOptions()
Description copied from class: DBColumnExpr
Returns the list of options for this column containing all possible field values.

Specified by:
getOptions in interface ColumnExpr
Overrides:
getOptions in class DBColumn
Returns:
the list of options
See Also:
DBColumnExpr.getOptions()

addXml

public Element addXml(Element parent,
                      long flags)
Description copied from class: DBColumnExpr
Add a description of this column with relevant metadata to the supplied parent XML Element.

Specified by:
addXml in class DBColumn
Parameters:
parent - the parent element to which to append the column description
flags - currently not used
Returns:
the newly created child element


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.