org.apache.empire.db
Class DBCommandExpr.DBCmdColumn

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.DBCommandExpr.DBCmdColumn
All Implemented Interfaces:
Serializable, Column, ColumnExpr
Enclosing class:
DBCommandExpr

protected static class DBCommandExpr.DBCmdColumn
extends DBColumn

This class wraps a column of sql command in a special command column object.

See Also:
Serialized Form

Field Summary
 
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
DBCommandExpr.DBCmdColumn(DBRowSet query, DBColumnExpr expr)
          Constructs a new DBCmdColumn object
 
Method Summary
 void addSQL(StringBuilder buf, long context)
          create the SQL-Command set the expression name to the SQL-Command
 Element addXml(Element parent, long flags)
          Adds the expression definition to the xml element.
 Object getAttribute(String name)
          Get Attributes of underlying table column.
 DataType getDataType()
          Returns the data type of the DBColumnExpr object.
 Options getOptions()
          Get Options of underlying table column.
 double getSize()
          Not applicable - always returns 0.
 boolean isAutoGenerated()
          Not applicable - always returns false
 boolean isReadOnly()
          Not applicable - always returns true
 boolean isRequired()
          Checks whether the column is mandatory.
 void validate(Object value)
          Not applicable - always returns true.
 
Methods inherited from class org.apache.empire.db.DBColumn
addReferencedColumns, 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
 

Constructor Detail

DBCommandExpr.DBCmdColumn

public DBCommandExpr.DBCmdColumn(DBRowSet query,
                                 DBColumnExpr expr)
Constructs a new DBCmdColumn object

Parameters:
query - the row set
expr - the column
Method Detail

addSQL

public void addSQL(StringBuilder buf,
                   long context)
create the SQL-Command set the expression name to the SQL-Command

Overrides:
addSQL in class DBColumn
Parameters:
buf - the SQL-Command
context - the current SQL-Command context

getDataType

public DataType getDataType()
Returns the data type of the DBColumnExpr object.

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

getSize

public double getSize()
Not applicable - always returns 0.

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

isReadOnly

public boolean isReadOnly()
Not applicable - always returns true

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

isAutoGenerated

public boolean isAutoGenerated()
Not applicable - always returns false

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

isRequired

public boolean isRequired()
Checks whether the column is mandatory.

Specified by:
isRequired in interface Column
Specified by:
isRequired in class DBColumn
Returns:
true if the column is mandatory or false otherwise

getAttribute

public Object getAttribute(String name)
Get Attributes of underlying table 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()
Get Options of underlying table column.

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

validate

public void validate(Object value)
Not applicable - always returns true.

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

addXml

public Element addXml(Element parent,
                      long flags)
Adds the expression definition to the 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.