Interface FunctionEvaluationContext

  • All Known Implementing Classes:
    AlfrescoFunctionEvaluationContext, CmisFunctionEvaluationContext

    public interface FunctionEvaluationContext
    The function evaluation context for lucene query implementations. This context is used at query time and also when navigating the results to get column values.
    Author:
    andyh
    • Method Detail

      • getNodeRefs

        Map<String,​NodeRef> getNodeRefs()
        Returns:
        the matching nodes by selector (at navigation time)
      • getScores

        Map<String,​Float> getScores()
        Returns:
        the scores by selector (at navigation time)
      • getProperty

        Serializable getProperty​(NodeRef nodeRef,
                                 String propertyName)
        Get a property
        Parameters:
        nodeRef - NodeRef
        propertyName - String
        Returns:
        the property (at navigation time)
      • getNodeService

        NodeService getNodeService()
        Returns:
        the node service
      • getScore

        Float getScore()
        Returns:
        the score (at navigation time)
      • buildLuceneExists

        <Q,​S,​E extends Throwable> Q buildLuceneExists​(LuceneQueryParserAdaptor<Q,​S,​E> lqpa,
                                                                  String propertyName,
                                                                  Boolean not)
                                                           throws E extends Throwable
        Note: null and not null are not required to support functions from the spec
        Parameters:
        propertyName - String
        not - Boolean
        Returns:
        the query
        Throws:
        E
        E extends Throwable
      • buildLuceneLike

        <Q,​S,​E extends Throwable> Q buildLuceneLike​(LuceneQueryParserAdaptor<Q,​S,​E> lqpa,
                                                                String propertyName,
                                                                Serializable value,
                                                                Boolean not)
                                                         throws E extends Throwable
        Note: Like is not required to support functions from the spec
        Parameters:
        propertyName - String
        value - Serializable
        not - Boolean
        Returns:
        the query
        Throws:
        E
        E extends Throwable
      • isObjectId

        boolean isObjectId​(String propertyName)
        Parameters:
        propertyName - String
        Returns:
        - is this an object id
      • isQueryable

        boolean isQueryable​(String propertyName)
        Parameters:
        propertyName - String
        Returns:
        is this property queryable
      • isOrderable

        boolean isOrderable​(String propertyName)
        Parameters:
        propertyName - String
        Returns:
        Is this property orderable
      • getLuceneFieldName

        String getLuceneFieldName​(String propertyName)
        Parameters:
        propertyName - String
        Returns:
        the lucene field name for the property
      • getLuceneFunction

        LuceneFunction getLuceneFunction​(FunctionArgument functionArgument)
        Parameters:
        functionArgument - FunctionArgument
        Returns:
        the lucene function appropriate to a function argument
      • checkFieldApplies

        void checkFieldApplies​(Selector selector,
                               String propertyName)
        Parameters:
        selector - Selector
        propertyName - String
      • isMultiValued

        boolean isMultiValued​(String propertyName)
        Is this a multi-valued property?
        Parameters:
        propertyName - String
        Returns:
        boolean
      • getAlfrescoPropertyName

        String getAlfrescoPropertyName​(String propertyName)
      • getAlfrescoTypeName

        String getAlfrescoTypeName​(String staticValue)
        Parameters:
        staticValue - String
        Returns:
        String