Package org.apache.empire.db
Class DBView.DBViewColumn
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.DBView.DBViewColumn
- All Implemented Interfaces:
Column,ColumnExpr
- Enclosing class:
- DBView
DBViewColumn
- Author:
- doebele
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DataTypeprotected final DBColumnExprprotected final doubleprotected final DBColumnFields 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
ConstructorsModifierConstructorDescriptionprotectedDBViewColumn(DBView view, String name, DBColumnExpr expr, double size) Constructs a DBViewColumn object set the specified parameters to this object.protectedDBViewColumn(DBView view, DBView.DBViewColumn other) Copy constructor -
Method Summary
Modifier and TypeMethodDescriptionAppends column meta information to the parent elementgetAttribute(String name) Returns the value of a column attribute.Returns the data type of this column expression.Returns the list of options for this column containing all possible field values.doublegetSize()Returns the size of the column.getView()booleanReturns true if column is a columns value is an automatically generated valuebooleanReturns true if the column is read-only.booleanReturns true if the column is required.voidsetEnumOptions(Class<? extends Enum<?>> enumType) sets the options from an enum classvalidateValue(Object value) Checks if the given value is a valid value for this column If not, an exception is thrownMethods inherited from class org.apache.empire.db.DBColumn
addReferencedColumns, addSQL, 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
-
Field Details
-
expr
-
dataType
-
updateColumn
-
size
protected final double size
-
-
Constructor Details
-
DBViewColumn
Constructs a DBViewColumn object set the specified parameters to this object.- Parameters:
view- the DBView objectname- the column nameexpr- the DBColumnExpr of the source tablesize- the column size
-
DBViewColumn
Copy constructor- Parameters:
view- the copied viewother- the column to copy
-
-
Method Details
-
getSourceColumnExpr
-
getView
-
getDataType
Description copied from class:DBColumnExprReturns the data type of this column expression.- Specified by:
getDataTypein interfaceColumnExpr- Specified by:
getDataTypein classDBColumnExpr- Returns:
- the expressions data type
- See Also:
-
getSize
public double getSize()Description copied from class:DBColumnReturns the size of the column. -
isAutoGenerated
public boolean isAutoGenerated()Description copied from class:DBColumnReturns true if column is a columns value is an automatically generated value- Specified by:
isAutoGeneratedin interfaceColumn- Specified by:
isAutoGeneratedin classDBColumn- Returns:
- true if column is auto-generated
-
isReadOnly
public boolean isReadOnly()Description copied from class:DBColumnReturns true if the column is read-only.- Specified by:
isReadOnlyin interfaceColumn- Specified by:
isReadOnlyin classDBColumn- Returns:
- Returns true if the column is read-only
-
isRequired
public boolean isRequired()Description copied from class:DBColumnReturns true if the column is required.- Specified by:
isRequiredin interfaceColumn- Specified by:
isRequiredin classDBColumn- Returns:
- Returns true if the column is required
-
getAttribute
Description copied from class:DBColumnExprReturns the value of a column attribute. Column attributes are used to provide metadata for a 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
Description copied from class:DBColumnExprReturns the list of options for this column containing all possible field values.- Specified by:
getOptionsin interfaceColumnExpr- Overrides:
getOptionsin classDBColumn- Returns:
- the list of options
-
validateValue
Description copied from class:DBColumnChecks if the given value is a valid value for this column If not, an exception is thrown- Specified by:
validateValuein interfaceColumn- Specified by:
validateValuein classDBColumn- Parameters:
value- the value to validate- Returns:
- the value the validated and possibly converted value
-
addXml
Description copied from class:DBColumnAppends column meta information to the parent element -
setEnumOptions
sets the options from an enum class- Parameters:
enumType- the enum type
-