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 Summary
Modifier and TypeMethodDescription<Q,
S, E extends Throwable>
QbuildLuceneEquality
(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,
S, E extends Throwable>
QbuildLuceneExists
(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Boolean not) Note: null and not null are not required to support functions from the spec<Q,
S, E extends Throwable>
QbuildLuceneGreaterThan
(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,
S, E extends Throwable>
QbuildLuceneGreaterThanOrEquals
(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,
S, E extends Throwable>
QbuildLuceneIn
(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) Note: In is not required to support functions from the spec<Q,
S, E extends Throwable>
QbuildLuceneInequality
(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,
S, E extends Throwable>
QbuildLuceneLessThan
(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,
S, E extends Throwable>
QbuildLuceneLessThanOrEquals
(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) <Q,
S, E extends Throwable>
QbuildLuceneLike
(QueryParserAdaptor<Q, S, E> lqpa, String propertyName, Serializable value, Boolean not) Note: Like is not required to support functions from the specvoid
checkFieldApplies
(Selector selector, String propertyName) getAlfrescoPropertyName
(String propertyName) getAlfrescoTypeName
(String staticValue) getLuceneFieldName
(String propertyName) getLuceneFunction
(FunctionArgument functionArgument) getLuceneSortField
(QueryParserAdaptor<Q, S, E> lqpa, String propertyName) getProperty
(NodeRef nodeRef, String propertyName) Get a propertygetScore()
boolean
isMultiValued
(String propertyName) Is this a multi-valued property?boolean
isObjectId
(String propertyName) boolean
isOrderable
(String propertyName) boolean
isQueryable
(String propertyName)
-
Method Details
-
getNodeRefs
- Returns:
- the matching nodes by selector (at navigation time)
-
getScores
- Returns:
- the scores by selector (at navigation time)
-
getProperty
Get a property- Parameters:
nodeRef
- NodeRefpropertyName
- 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, Q buildLuceneEqualityE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneExists
<Q,S, Q buildLuceneExistsE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Boolean not) Note: null and not null are not required to support functions from the spec- Parameters:
propertyName
- Stringnot
- Boolean- Returns:
- the query
- Throws:
E
-
buildLuceneGreaterThan
<Q,S, Q buildLuceneGreaterThanE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneGreaterThanOrEquals
<Q,S, Q buildLuceneGreaterThanOrEqualsE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneLessThan
<Q,S, Q buildLuceneLessThanE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneLessThanOrEquals
<Q,S, Q buildLuceneLessThanOrEqualsE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneLike
<Q,S, Q buildLuceneLikeE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, Boolean not) Note: Like is not required to support functions from the spec- Parameters:
propertyName
- Stringvalue
- Serializablenot
- Boolean- Returns:
- the query
- Throws:
E
-
buildLuceneInequality
<Q,S, Q buildLuceneInequalityE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) - Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
-
buildLuceneIn
<Q,S, Q buildLuceneInE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) Note: In is not required to support functions from the spec- Parameters:
propertyName
- Stringnot
- Booleanmode
- PredicateMode- Returns:
- the query
- Throws:
E
-
getLuceneSortField
<Q,S, String getLuceneSortFieldE extends Throwable> (QueryParserAdaptor<Q, S, throws EE> lqpa, String propertyName) - Parameters:
propertyName
- String- Returns:
- the field used for sorting the given property
- Throws:
E
-
isObjectId
- Parameters:
propertyName
- String- Returns:
- - is this an object id
-
isQueryable
- Parameters:
propertyName
- String- Returns:
- is this property queryable
-
isOrderable
- Parameters:
propertyName
- String- Returns:
- Is this property orderable
-
getLuceneFieldName
- Parameters:
propertyName
- String- Returns:
- the lucene field name for the property
-
getLuceneFunction
- Parameters:
functionArgument
- FunctionArgument- Returns:
- the lucene function appropriate to a function argument
-
checkFieldApplies
- Parameters:
selector
- SelectorpropertyName
- String
-
isMultiValued
Is this a multi-valued property?- Parameters:
propertyName
- String- Returns:
- boolean
-
getAlfrescoPropertyName
-
getAlfrescoTypeName
- Parameters:
staticValue
- String- Returns:
- String
-