Class DynamicOperandImpl

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected QueryImpl query  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract boolean canRestrictSelector​(SelectorImpl s)
      Check whether the condition can be applied to a selector (to restrict the selector).
      protected org.apache.jackrabbit.oak.api.PropertyValue convertValueToType​(org.apache.jackrabbit.oak.api.PropertyValue v, org.apache.jackrabbit.oak.api.PropertyValue targetType)  
      @NotNull org.apache.jackrabbit.oak.query.ast.AstElement copyOf()  
      abstract DynamicOperandImpl createCopy()  
      abstract org.apache.jackrabbit.oak.api.PropertyValue currentProperty()  
      boolean equals​(java.lang.Object other)  
      abstract java.lang.String getFunction​(SelectorImpl s)
      Get the function of a function-based index, in Polish notation.
      protected java.lang.String getLocalPath​(java.lang.String path)
      Calculate the session local path (the path excluding the workspace name) if possible.
      abstract org.apache.jackrabbit.oak.spi.query.QueryIndex.OrderEntry getOrderEntry​(SelectorImpl s, OrderingImpl o)
      Create an entry for the "order by" list for a given filter.
      java.lang.String getOrderEntryPropertyName​(SelectorImpl s)  
      abstract PropertyExistenceImpl getPropertyExistence()
      Get the property existence condition for this operand, if this operand is used as part of a condition.
      abstract java.util.Set<SelectorImpl> getSelectors()
      Get the set of selectors for this operand.
      int hashCode()  
      protected java.lang.String normalizePath​(java.lang.String path)
      Validate and normalize the path.
      protected java.lang.String normalizePropertyName​(java.lang.String propertyName)
      Normalize the property name (including namespace remapping).
      protected java.lang.String protect​(java.lang.Object expression)  
      protected java.lang.String quote​(java.lang.String pathOrName)  
      protected java.lang.String quoteJson​(java.lang.String string)  
      abstract void restrict​(FilterImpl f, Operator operator, org.apache.jackrabbit.oak.api.PropertyValue v)
      Apply a restriction of type "this = value" to the given filter.
      abstract void restrictList​(FilterImpl f, java.util.List<org.apache.jackrabbit.oak.api.PropertyValue> list)
      Apply a restriction of type "this in (list)" to the given filter.
      void setQuery​(QueryImpl query)  
      boolean supportsRangeConditions()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DynamicOperandImpl

        public DynamicOperandImpl()
    • Method Detail

      • currentProperty

        public abstract org.apache.jackrabbit.oak.api.PropertyValue currentProperty()
      • restrict

        public abstract void restrict​(FilterImpl f,
                                      Operator operator,
                                      org.apache.jackrabbit.oak.api.PropertyValue v)
        Apply a restriction of type "this = value" to the given filter.
        Parameters:
        f - the filter where the restriction is applied.
        operator - the operator (for example "=").
        v - the value
      • restrictList

        public abstract void restrictList​(FilterImpl f,
                                          java.util.List<org.apache.jackrabbit.oak.api.PropertyValue> list)
        Apply a restriction of type "this in (list)" to the given filter.
        Parameters:
        f - the filter where the restriction is applied.
        list - the list of values
      • getFunction

        public abstract java.lang.String getFunction​(SelectorImpl s)
        Get the function of a function-based index, in Polish notation.
        Parameters:
        s - the selector
        Returns:
        the function, or null if not supported
      • canRestrictSelector

        public abstract boolean canRestrictSelector​(SelectorImpl s)
        Check whether the condition can be applied to a selector (to restrict the selector). The method may return true if the operand can be evaluated when the given selector and all previous selectors in the join can be evaluated.
        Parameters:
        s - the selector
        Returns:
        true if the condition can be applied
      • supportsRangeConditions

        public boolean supportsRangeConditions()
      • getPropertyExistence

        public abstract PropertyExistenceImpl getPropertyExistence()
        Get the property existence condition for this operand, if this operand is used as part of a condition.
        Returns:
        the property existence condition, or null if none
      • getSelectors

        public abstract java.util.Set<SelectorImpl> getSelectors()
        Get the set of selectors for this operand.
        Returns:
        the set of selectors
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getOrderEntry

        public abstract org.apache.jackrabbit.oak.spi.query.QueryIndex.OrderEntry getOrderEntry​(SelectorImpl s,
                                                                                                OrderingImpl o)
        Create an entry for the "order by" list for a given filter.
        Parameters:
        s - the selector
        o - the ordering
        Returns:
        the entry
      • getOrderEntryPropertyName

        public java.lang.String getOrderEntryPropertyName​(SelectorImpl s)
        Parameters:
        s -
        Returns:
        the property name as defined in the OrderEntry for the DynamicOperand
      • protect

        protected java.lang.String protect​(java.lang.Object expression)
      • quote

        protected java.lang.String quote​(java.lang.String pathOrName)
      • quoteJson

        protected java.lang.String quoteJson​(java.lang.String string)
      • setQuery

        public void setQuery​(QueryImpl query)
      • normalizePropertyName

        protected java.lang.String normalizePropertyName​(java.lang.String propertyName)
        Normalize the property name (including namespace remapping). Asterisks are kept.
        Parameters:
        propertyName - the property name to normalize
        Returns:
        the normalized (oak-) property name
      • normalizePath

        protected java.lang.String normalizePath​(java.lang.String path)
        Validate and normalize the path.
        Parameters:
        path - the path to validate
        Returns:
        the validated and normalized path
      • convertValueToType

        protected org.apache.jackrabbit.oak.api.PropertyValue convertValueToType​(org.apache.jackrabbit.oak.api.PropertyValue v,
                                                                                 org.apache.jackrabbit.oak.api.PropertyValue targetType)
      • getLocalPath

        protected java.lang.String getLocalPath​(java.lang.String path)
        Calculate the session local path (the path excluding the workspace name) if possible.
        Parameters:
        path - the absolute path
        Returns:
        the session local path, or null if not within this workspace
      • copyOf

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.query.ast.AstElement copyOf()
        Returns:
        a clone of self. Default implementation in AstElement returns same reference to this.