Class WrqInfo


  • public class WrqInfo
    extends java.lang.Object
    Collects knowledge about the Wrq. Initially taken from WrsSqlGenerator. For older change history see there
    • Constructor Detail

      • WrqInfo

        public WrqInfo​(SqlFromSubSelect currentSelect,
                       org.w3c.dom.Element selectElem)
                throws java.lang.Exception
        Constructor from currentSelect as context and our wrq:Select element
        Parameters:
        currentSelect -
        selectElem -
        Throws:
        java.lang.Exception
    • Method Detail

      • isEmpty

        protected boolean isEmpty()
      • getOrderingBRefs

        protected java.util.LinkedHashSet<java.lang.String> getOrderingBRefs()
      • getFullSelectListBRefs

        public java.util.LinkedHashSet<java.lang.String> getFullSelectListBRefs()
      • getUserSelectListBRefs

        protected java.util.LinkedHashSet<java.lang.String> getUserSelectListBRefs()
      • getWrsCOnlySelectListBRefs

        protected java.util.LinkedList<WrsBindingItem> getWrsCOnlySelectListBRefs()
      • getFilterNode

        protected org.w3c.dom.Element getFilterNode()
                                             throws javax.xml.xpath.XPathExpressionException
        Throws:
        javax.xml.xpath.XPathExpressionException
      • getGroupingNode

        protected org.w3c.dom.Element getGroupingNode()
                                               throws javax.xml.xpath.XPathExpressionException
        Throws:
        javax.xml.xpath.XPathExpressionException
      • getHavingNode

        protected org.w3c.dom.Element getHavingNode()
                                             throws javax.xml.xpath.XPathExpressionException
        Throws:
        javax.xml.xpath.XPathExpressionException
      • initMetaData

        protected void initMetaData()
                             throws java.lang.Exception
        Initializes internal data structures for s single wrq:Select
        Throws:
        java.lang.Exception
      • selectAllBindingItems

        protected void selectAllBindingItems()
                                      throws BindingException
        No binding items are explicitly given in select clause, collect here all the BindingSet has to offer
        Throws:
        BindingException
      • getDefaultAggr

        protected java.lang.String getDefaultAggr​(BindingItem bi)
        Usually, the aggregation is defined in the Wrq Element e for the column. There are two cases where not: It is not given (select all, no explicit select list), or the attribute is simply not set. Then we have this mechanism for default-aggregator, the returned aggregator can be trusted (i.e. no SQL injection can happen within this fkt) 1) Wrq/Columns/C/@aggr 2) BindingSet/BindingItem/@aggr 3) MAX() or SUM() depending on the BindingItems data type
        Parameters:
        bi -
        Returns:
      • getOwnerDocument

        public org.w3c.dom.Document getOwnerDocument()
      • getSelectNode

        public org.w3c.dom.Element getSelectNode()
      • getAllBRefAggrs

        public java.util.Map<java.lang.String,​WrqBindingItem> getAllBRefAggrs()
      • getAllBRefs

        public java.util.Map<java.lang.String,​WrqBindingItem> getAllBRefs()
      • getVirtualBRefs

        public java.util.Map<java.lang.String,​java.lang.String> getVirtualBRefs()
      • getAllRawBRefs

        public java.util.Set<java.lang.String> getAllRawBRefs()
      • getGroupingChildNode

        public org.w3c.dom.NodeList getGroupingChildNode()
                                                  throws javax.xml.xpath.XPathExpressionException
        Throws:
        javax.xml.xpath.XPathExpressionException
      • getTopNs

        public org.w3c.dom.NodeList getTopNs()
                                      throws javax.xml.xpath.XPathExpressionException
        Throws:
        javax.xml.xpath.XPathExpressionException
      • getNextColumnNumber

        public int getNextColumnNumber()
      • getResultingBindingSet

        public WrqBindingSet getResultingBindingSet()
      • getGroupingBRefs

        public java.util.Set<java.lang.String> getGroupingBRefs()
      • getHavingBRefs

        public java.util.Set<java.lang.String> getHavingBRefs()
      • reqHasGroupingFunction

        public boolean reqHasGroupingFunction()
      • reqHasGroupBy

        public boolean reqHasGroupBy()
      • setReqHasGroupingFunction

        public void setReqHasGroupingFunction​(java.lang.Boolean reqHasGroupingFunction)
      • getJdbcResourceName

        public java.lang.String getJdbcResourceName()
        Convenience method
        Returns:
      • getVdm

        public java.util.Map<java.lang.String,​java.util.Set<java.lang.String>> getVdm​(java.lang.String bRef)
        Return the virtual dimension members for a bRef
        Parameters:
        bRef -
        Returns: