Class BindingSetContextObject
- java.lang.Object
-
- de.businesscode.sqlengine.context.BindingSetContextObject
-
public class BindingSetContextObject extends java.lang.Object
This is the velocity context object, that represents a concrete BindingSet in phase 2 (@seeSQLEngine
) From its constructor parameters it already knows, which binding items will be requested from it and this allows it to determine the right concrete BindingSet for its name Also it keeps track of all requested BindingItems to find the right BindingSet for the BindingSet name and to provide the caller with information about used BindingItems
-
-
Constructor Summary
Constructors Constructor Description BindingSetContextObject(Bindings bindings, java.lang.String requestedName, java.util.Set<java.lang.String> requestedItems, java.lang.String tableAlias)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get(java.lang.String key)
getter for Velocityjava.util.List<BindingItem>
getAllBindingItemsInOrder()
Getter for BindingItems mentioned somewhere, useful for a caller of SQLEngine to get info about the query structureStandardBindingSet
getBindingSet()
java.lang.Object
getPlain(java.lang.String key)
This is useful for insert/update statements and self joining selectsjava.lang.String
getPlainTableName()
This is useful for insert/update statements and self joining selectsjava.util.List<BindingItem>
getSelectedBindingItemsInOrder()
Getter for BindingItems which are part of the select clause, i.e. they are mentioned before the table name, useful for a caller of SQLEngine to get info about the query structurejava.lang.String
getTableReference()
getTableNamejava.lang.String
toString()
-
-
-
Constructor Detail
-
BindingSetContextObject
public BindingSetContextObject(Bindings bindings, java.lang.String requestedName, java.util.Set<java.lang.String> requestedItems, java.lang.String tableAlias)
- Parameters:
bindings
- Global BCD-UI Bindings singletonrequestedName
- Its logical namerequestedItems
- All binding item names it will be asked for
-
-
Method Detail
-
getBindingSet
public StandardBindingSet getBindingSet()
- Returns:
- the bindingSet
-
getTableReference
public java.lang.String getTableReference()
getTableName- Returns:
- the table name
-
getPlainTableName
public java.lang.String getPlainTableName()
This is useful for insert/update statements and self joining selects- Returns:
- the table name without alias name.
-
get
public java.lang.Object get(java.lang.String key)
getter for Velocity- Returns:
- The BindingItem of this BindingSet for the requested binding item name
-
getPlain
public java.lang.Object getPlain(java.lang.String key)
This is useful for insert/update statements and self joining selects- Returns:
- just the column name of the BindingItem for a given binding item name
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
getSelectedBindingItemsInOrder
public java.util.List<BindingItem> getSelectedBindingItemsInOrder()
Getter for BindingItems which are part of the select clause, i.e. they are mentioned before the table name, useful for a caller of SQLEngine to get info about the query structure
-
getAllBindingItemsInOrder
public java.util.List<BindingItem> getAllBindingItemsInOrder()
Getter for BindingItems mentioned somewhere, useful for a caller of SQLEngine to get info about the query structure
-
-