Class BindingSetContextObject

java.lang.Object
de.businesscode.sqlengine.context.BindingSetContextObject

public class BindingSetContextObject extends Object
This is the velocity context object, that represents a concrete BindingSet in phase 2 (@see SQLEngine) 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 Details

    • BindingSetContextObject

      public BindingSetContextObject(Bindings bindings, String requestedName, Set<String> requestedItems, String tableAlias)
      Parameters:
      bindings - Global BCD-UI Bindings singleton
      requestedName - Its logical name
      requestedItems - All binding item names it will be asked for
  • Method Details

    • getBindingSet

      public StandardBindingSet getBindingSet()
      Returns:
      the bindingSet
    • getTableReference

      public String getTableReference()
      getTableName
      Returns:
      the table name
    • getPlainTableName

      public String getPlainTableName()
      This is useful for insert/update statements and self joining selects
      Returns:
      the table name without alias name.
    • get

      public Object get(String key)
      getter for Velocity
      Returns:
      The BindingItem of this BindingSet for the requested binding item name
    • getPlain

      public Object getPlain(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 String toString()
      Overrides:
      toString in class Object
      See Also:
    • getSelectedBindingItemsInOrder

      public 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 List<BindingItem> getAllBindingItemsInOrder()
      Getter for BindingItems mentioned somewhere, useful for a caller of SQLEngine to get info about the query structure