Package de.businesscode.bcdui.wrs.load
Class BindingItemWithMetaData
- java.lang.Object
-
- de.businesscode.bcdui.binding.SimpleBindingItem
-
- de.businesscode.bcdui.binding.BindingItem
-
- de.businesscode.bcdui.wrs.load.BindingItemWithMetaData
-
- All Implemented Interfaces:
WrsBindingItem
- Direct Known Subclasses:
BindingItemAttribute
public class BindingItemWithMetaData extends BindingItem implements WrsBindingItem
This class represents a BindingItem in a concrete statement It adds for example alias, aggregation and the column number
-
-
Field Summary
-
Fields inherited from class de.businesscode.bcdui.binding.SimpleBindingItem
BCD_NO_TABLE_ALIAS, columnExpression, pureColumnNamePattern, qColumnExpr, wordPattern
-
-
Constructor Summary
Constructors Constructor Description BindingItemWithMetaData(BindingItem bindingItem, java.lang.String aggregationFunction, java.lang.String alias)
BindingItemWithMetaData(BindingItem bindingItem, java.lang.String aggregationFunction, java.lang.String alias, java.util.Map<java.lang.String,java.lang.String> userAttributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttribute(java.lang.String name, java.lang.String value)
Adds regular @ attributevoid
addWrsAAttribute(BindingItemAttribute wrsAAttribute)
Adds an wrs:A attributesjava.lang.String
getAggregationFunction()
java.lang.String
getAlias()
java.util.Map<java.lang.String,java.lang.Object>
getAttributes()
Additional attributes at (plain attributes, not wrs:A) are returned here Note that they can overwrite default attributes of the BindingItem, which were derived from the BindingSet and the databaseint
getColumnNumber()
BindingItemWithMetaData
getParentWrsC()
java.lang.String
getQColumnExpression(java.lang.String aliasWithTableAlias)
Helper to merge a table alias into a column expression, which can contain SQL functions etc Method calcQColumnExpressionjava.lang.String
getQColumnExpressionWithAggr(java.lang.String aliasWithTableAlias)
java.lang.String
getQColumnExpressionWithAggr(java.lang.String aliasWithTableAlias, java.lang.String overwriteAggr)
java.util.Collection<WrsBindingItem>
getWrsAAttributes()
java.lang.String
getWrsAName()
boolean
hasWrsAAttributes()
boolean
isOrderByDescending()
void
setAlias(java.lang.String alias)
void
setColumnNumber(int columnNumber)
void
setOrderByDescending(boolean isOrderByDescending)
void
setParentWrsC(BindingItemWithMetaData parentWrsC)
void
setWrsAAttributes(java.util.Collection<BindingItemAttribute> wrsAAttributes)
-
Methods inherited from class de.businesscode.bcdui.binding.BindingItem
getAggr, getCaption, getColumnExpression, getCustomAttributesMap, getDisplayFormat, getDisplayFormatAsNode, getJDBCColumnDisplaySize, getJDBCColumnScale, getJDBCDataType, getJDBCDataTypeName, getJDBCNullable, getJDBCSigned, getReferences, getReferencesAsNode, isDefinedJDBCDataType, isEscapeXML, isKey, isNumeric, isReadOnly, setAggr, setCaption, setDisplayFormat, setEscapeXML, setJDBCColumnDisplaySize, setJDBCColumnScale, setJDBCDataType, setJDBCDataTypeName, setJDBCNullable, setJDBCSigned, setKey, setReadOnly, setReferences, toString, toXML
-
Methods inherited from class de.businesscode.bcdui.binding.SimpleBindingItem
getBindingSet, getId, isColumnQuoting, setBindingSet, setColumnExpression, setId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.businesscode.bcdui.wrs.load.WrsBindingItem
getCaption, getId, getJDBCColumnScale, getJDBCDataType, isEscapeXML, toXML
-
-
-
-
Constructor Detail
-
BindingItemWithMetaData
public BindingItemWithMetaData(BindingItem bindingItem, java.lang.String aggregationFunction, java.lang.String alias)
-
BindingItemWithMetaData
public BindingItemWithMetaData(BindingItem bindingItem, java.lang.String aggregationFunction, java.lang.String alias, java.util.Map<java.lang.String,java.lang.String> userAttributes)
-
-
Method Detail
-
getParentWrsC
public BindingItemWithMetaData getParentWrsC()
-
setParentWrsC
public void setParentWrsC(BindingItemWithMetaData parentWrsC)
-
isOrderByDescending
public boolean isOrderByDescending()
-
setOrderByDescending
public void setOrderByDescending(boolean isOrderByDescending)
-
getAlias
public java.lang.String getAlias()
- Specified by:
getAlias
in interfaceWrsBindingItem
-
setAlias
public void setAlias(java.lang.String alias)
-
getAggregationFunction
public java.lang.String getAggregationFunction()
-
setWrsAAttributes
public void setWrsAAttributes(java.util.Collection<BindingItemAttribute> wrsAAttributes)
- Parameters:
wrsAAttributes
- Collection of new binding item's attributes.
-
hasWrsAAttributes
public boolean hasWrsAAttributes()
- Specified by:
hasWrsAAttributes
in interfaceWrsBindingItem
- Returns:
- Has binding item attributes?
-
getWrsAAttributes
public java.util.Collection<WrsBindingItem> getWrsAAttributes()
- Specified by:
getWrsAAttributes
in interfaceWrsBindingItem
- Returns:
- A copy of the Collection of binding item's attributes wrs:A
-
addWrsAAttribute
public void addWrsAAttribute(BindingItemAttribute wrsAAttribute)
Adds an wrs:A attributes
-
getColumnNumber
public int getColumnNumber()
- Specified by:
getColumnNumber
in interfaceWrsBindingItem
- Returns:
- The binding item's column number in SQL select statement.
-
setColumnNumber
public void setColumnNumber(int columnNumber)
- Parameters:
columnNumber
- The new binding item's column number in SQL select statement.
-
getQColumnExpression
public java.lang.String getQColumnExpression(java.lang.String aliasWithTableAlias)
Description copied from class:SimpleBindingItem
Helper to merge a table alias into a column expression, which can contain SQL functions etc Method calcQColumnExpression- Overrides:
getQColumnExpression
in classSimpleBindingItem
-
getQColumnExpressionWithAggr
public java.lang.String getQColumnExpressionWithAggr(java.lang.String aliasWithTableAlias)
-
getQColumnExpressionWithAggr
public java.lang.String getQColumnExpressionWithAggr(java.lang.String aliasWithTableAlias, java.lang.String overwriteAggr)
-
getAttributes
public java.util.Map<java.lang.String,java.lang.Object> getAttributes()
Additional attributes at (plain attributes, not wrs:A) are returned here Note that they can overwrite default attributes of the BindingItem, which were derived from the BindingSet and the database- Overrides:
getAttributes
in classBindingItem
-
addAttribute
public void addAttribute(java.lang.String name, java.lang.String value)
Adds regular @ attribute
-
getWrsAName
public java.lang.String getWrsAName()
- Specified by:
getWrsAName
in interfaceWrsBindingItem
-
-