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 Details

    • 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)
    • buildLuceneEquality

      <Q, S, E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
      Parameters:
      propertyName - String
      value - Serializable
      mode - PredicateMode
      luceneFunction - LuceneFunction
      Returns:
      the query
      Throws:
      E
    • buildLuceneExists

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

      <Q, S, E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
      Parameters:
      propertyName - String
      value - Serializable
      mode - PredicateMode
      luceneFunction - LuceneFunction
      Returns:
      the query
      Throws:
      E
    • buildLuceneGreaterThanOrEquals

      <Q, S, E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
      Parameters:
      propertyName - String
      value - Serializable
      mode - PredicateMode
      luceneFunction - LuceneFunction
      Returns:
      the query
      Throws:
      E
    • buildLuceneLessThan

      <Q, S, E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
      Parameters:
      propertyName - String
      value - Serializable
      mode - PredicateMode
      luceneFunction - LuceneFunction
      Returns:
      the query
      Throws:
      E
    • buildLuceneLessThanOrEquals

      <Q, S, E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
      Parameters:
      propertyName - String
      value - Serializable
      mode - PredicateMode
      luceneFunction - LuceneFunction
      Returns:
      the query
      Throws:
      E
    • buildLuceneLike

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

      <Q, S, E extends Throwable> Q buildLuceneInequality(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E
      Parameters:
      propertyName - String
      value - Serializable
      mode - PredicateMode
      luceneFunction - LuceneFunction
      Returns:
      the query
      Throws:
      E
    • buildLuceneIn

      <Q, S, E extends Throwable> Q buildLuceneIn(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E
      Note: In is not required to support functions from the spec
      Parameters:
      propertyName - String
      not - Boolean
      mode - PredicateMode
      Returns:
      the query
      Throws:
      E
    • getLuceneSortField

      <Q, S, E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q,S,E> lqpa, String propertyName) throws E
      Parameters:
      propertyName - String
      Returns:
      the field used for sorting the given property
      Throws:
      E
    • 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