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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <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)
String
getAlfrescoPropertyName(String propertyName)
String
getAlfrescoTypeName(String staticValue)
String
getLuceneFieldName(String propertyName)
LuceneFunction
getLuceneFunction(FunctionArgument functionArgument)
<Q,S,E extends Throwable>
StringgetLuceneSortField(QueryParserAdaptor<Q,S,E> lqpa, String propertyName)
Map<String,NodeRef>
getNodeRefs()
NodeService
getNodeService()
Serializable
getProperty(NodeRef nodeRef, String propertyName)
Get a propertyFloat
getScore()
Map<String,Float>
getScores()
boolean
isMultiValued(String propertyName)
Is this a multi-valued property?boolean
isObjectId(String propertyName)
boolean
isOrderable(String propertyName)
boolean
isQueryable(String propertyName)
-
-
-
Method Detail
-
getNodeRefs
Map<String,NodeRef> getNodeRefs()
- Returns:
- the matching nodes by selector (at navigation time)
-
getProperty
Serializable getProperty(NodeRef nodeRef, String propertyName)
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,E extends Throwable> Q buildLuceneEquality(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends Throwable
-
buildLuceneExists
<Q,S,E extends Throwable> Q buildLuceneExists(QueryParserAdaptor<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
- Stringnot
- Boolean- Returns:
- the query
- Throws:
E
E extends Throwable
-
buildLuceneGreaterThan
<Q,S,E extends Throwable> Q buildLuceneGreaterThan(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends Throwable
-
buildLuceneGreaterThanOrEquals
<Q,S,E extends Throwable> Q buildLuceneGreaterThanOrEquals(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends Throwable
-
buildLuceneLessThan
<Q,S,E extends Throwable> Q buildLuceneLessThan(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends Throwable
-
buildLuceneLessThanOrEquals
<Q,S,E extends Throwable> Q buildLuceneLessThanOrEquals(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends Throwable
-
buildLuceneLike
<Q,S,E extends Throwable> Q buildLuceneLike(QueryParserAdaptor<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
- Stringvalue
- Serializablenot
- Boolean- Returns:
- the query
- Throws:
E
E extends Throwable
-
buildLuceneInequality
<Q,S,E extends Throwable> Q buildLuceneInequality(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends Throwable
-
buildLuceneIn
<Q,S,E extends Throwable> Q buildLuceneIn(QueryParserAdaptor<Q,S,E> lqpa, String propertyName, Collection<Serializable> values, Boolean not, PredicateMode mode) throws E extends Throwable
Note: In is not required to support functions from the spec- Parameters:
propertyName
- Stringnot
- Booleanmode
- PredicateMode- Returns:
- the query
- Throws:
E
E extends Throwable
-
getLuceneSortField
<Q,S,E extends Throwable> String getLuceneSortField(QueryParserAdaptor<Q,S,E> lqpa, String propertyName) throws E extends Throwable
- Parameters:
propertyName
- String- Returns:
- the field used for sorting the given property
- 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
- SelectorpropertyName
- String
-
isMultiValued
boolean isMultiValued(String propertyName)
Is this a multi-valued property?- Parameters:
propertyName
- String- Returns:
- boolean
-
-