Package org.apache.empire.db
Class DBCommandExpr.DBCmdColumn
java.lang.Object
org.apache.empire.db.DBObject
org.apache.empire.db.DBExpr
org.apache.empire.db.DBColumnExpr
org.apache.empire.db.DBColumn
org.apache.empire.db.DBCommandExpr.DBCmdColumn
- All Implemented Interfaces:
Column,ColumnExpr
- Enclosing class:
- DBCommandExpr
This class wraps a column of sql command in a special command column object.
-
Field Summary
Fields inherited from class org.apache.empire.db.DBColumnExpr
attributes, beanPropertyName, optionsFields inherited from class org.apache.empire.db.DBExpr
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESIS, CTX_VALUEFields inherited from interface org.apache.empire.data.Column
COLATTR_CASESENSITIVE, COLATTR_CURRENCY_CODE, COLATTR_ENUMTYPE, COLATTR_FRACTION_DIGITS, COLATTR_INTEGER_DIGITS, COLATTR_MAXVALUE, COLATTR_MINLENGTH, COLATTR_MINVALUE, COLATTR_NORMCOLUMN, COLATTR_NULLTEXT, COLATTR_NUMBER_GROUPSEP, COLATTR_NUMBER_TYPE, COLATTR_REFCOLUMNS, COLATTR_REGEXP, COLATTR_SORTDESCENDING, COLATTR_SORTEXPRESSION, COLATTR_TITLE, COLATTR_TOOLTIP, COLATTR_TYPE, NUMTYPE_CURRENCY, NUMTYPE_DECIMAL, NUMTYPE_INTEGER, NUMTYPE_PERCENT -
Constructor Summary
ConstructorsConstructorDescriptionDBCmdColumn(DBRowSet query, DBColumnExpr expr) Constructs a new DBCmdColumn object -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSQL(DBSQLBuilder sql, long context) create the SQL-Command set the expression name to the SQL-CommandAdds the expression definition to the xml element.getAttribute(String name) Get Attributes of underlying table column.Returns the data type of the DBColumnExpr object.Get Options of underlying table column.doublegetSize()Not applicable - always returns 0.booleanNot applicable - always returns falsebooleanNot applicable - always returns truebooleanChecks whether the column is mandatory.validateValue(Object value) Not applicable - always return the value.Methods inherited from class org.apache.empire.db.DBColumn
addReferencedColumns, coalesceColumn, decodeEnum, decodeSort, equals, getAlias, getAttributes, getComment, getDatabase, getEntity, getEnumType, getFullName, getIdentifier, getJavaType, getName, getNormalizedColumn, getRegExPattern, getRowSet, getSortExpr, getUpdateColumn, hashCode, isAggregate, isEnum, qualified, reference, setCaseInsensitive, setCaseSensitive, setComment, setNormalizedColumn, setNumberType, setRegExPattern, setSortExpr, setSortExpr, to, toStringMethods inherited from class org.apache.empire.db.DBColumnExpr
abs, aggregate, append, as, as, asc, avg, ceiling, cmp, coalesce, concat, concat, contains, convertTo, convertTo, count, countDistinct, day, decode, decode, decode, decode, decode, decode, decodeEnum, decodeSort, desc, divideBy, floor, format, function, getAttribute, getBeanPropertyName, getControlType, getDefaultSortOrder, getExprFromPhrase, getExprFromPhrase, getIgnoreCaseExpr, getNumberType, getSourceColumn, getTitle, in, in, in, indexOf, indexOf, indexOf, is, isBetween, isCaseSensitive, isGreaterThan, isLessOrEqual, isLiteralValue, isMoreOrEqual, isNot, isNotBetween, isSmallerThan, length, like, like, likeLower, likeUpper, lower, max, min, minus, minus, modulo, month, multiplyWith, notContains, notIn, notIn, notIn, notLike, nvl, on, parenthesis, plus, plus, prepend, replace, reverse, round, setAttribute, setBeanPropertyName, setControlType, setDefaultSortOrder, setOptions, setTitle, stringAgg, stringAgg, substring, substring, substring, substring, substring, substring, sum, toChar, toChar, trim, trimLeft, trimRight, trunc, upper, when, yearMethods inherited from class org.apache.empire.db.DBObject
checkParamNullMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.empire.data.ColumnExpr
getBeanPropertyName, getControlType, getSourceColumn, getTitle, setAttribute
-
Constructor Details
-
DBCmdColumn
Constructs a new DBCmdColumn object- Parameters:
query- the row setexpr- the column
-
-
Method Details
-
addSQL
create the SQL-Command set the expression name to the SQL-Command -
getDataType
Returns the data type of the DBColumnExpr object.- Specified by:
getDataTypein interfaceColumnExpr- Specified by:
getDataTypein classDBColumnExpr- Returns:
- the data type
- See Also:
-
getSize
public double getSize()Not applicable - always returns 0. -
isReadOnly
public boolean isReadOnly()Not applicable - always returns true- Specified by:
isReadOnlyin interfaceColumn- Specified by:
isReadOnlyin classDBColumn- Returns:
- Returns true if the column is read-only
-
isAutoGenerated
public boolean isAutoGenerated()Not applicable - always returns false- Specified by:
isAutoGeneratedin interfaceColumn- Specified by:
isAutoGeneratedin classDBColumn- Returns:
- true if column is auto-generated
-
isRequired
public boolean isRequired()Checks whether the column is mandatory.- Specified by:
isRequiredin interfaceColumn- Specified by:
isRequiredin classDBColumn- Returns:
- true if the column is mandatory or false otherwise
-
getAttribute
Get Attributes of underlying table column.- Specified by:
getAttributein interfaceColumnExpr- Overrides:
getAttributein classDBColumn- Parameters:
name- the attribute name- Returns:
- value of the attribute if it exists or null otherwise
- See Also:
-
getOptions
Get Options of underlying table column.- Specified by:
getOptionsin interfaceColumnExpr- Overrides:
getOptionsin classDBColumn- Returns:
- the list of options
-
validateValue
Not applicable - always return the value.- Specified by:
validateValuein interfaceColumn- Specified by:
validateValuein classDBColumn- Parameters:
value- the value to validate- Returns:
- the value the validated and possibly converted value
-
addXml
Adds the expression definition to the xml element.
-