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 java.lang.Throwable>
QbuildLuceneEquality(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
<Q,S,E extends java.lang.Throwable>
QbuildLuceneExists(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.lang.Boolean not)
Note: null and not null are not required to support functions from the spec<Q,S,E extends java.lang.Throwable>
QbuildLuceneGreaterThan(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
<Q,S,E extends java.lang.Throwable>
QbuildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
<Q,S,E extends java.lang.Throwable>
QbuildLuceneIn(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.util.Collection<java.io.Serializable> values, java.lang.Boolean not, PredicateMode mode)
Note: In is not required to support functions from the spec<Q,S,E extends java.lang.Throwable>
QbuildLuceneInequality(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
<Q,S,E extends java.lang.Throwable>
QbuildLuceneLessThan(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
<Q,S,E extends java.lang.Throwable>
QbuildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction)
<Q,S,E extends java.lang.Throwable>
QbuildLuceneLike(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, java.lang.Boolean not)
Note: Like is not required to support functions from the specvoid
checkFieldApplies(Selector selector, java.lang.String propertyName)
java.lang.String
getAlfrescoPropertyName(java.lang.String propertyName)
java.lang.String
getAlfrescoTypeName(java.lang.String staticValue)
java.lang.String
getLuceneFieldName(java.lang.String propertyName)
LuceneFunction
getLuceneFunction(FunctionArgument functionArgument)
<Q,S,E extends java.lang.Throwable>
java.lang.StringgetLuceneSortField(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName)
java.util.Map<java.lang.String,NodeRef>
getNodeRefs()
NodeService
getNodeService()
java.io.Serializable
getProperty(NodeRef nodeRef, java.lang.String propertyName)
Get a propertyjava.lang.Float
getScore()
java.util.Map<java.lang.String,java.lang.Float>
getScores()
boolean
isMultiValued(java.lang.String propertyName)
Is this a multi-valued property?boolean
isObjectId(java.lang.String propertyName)
boolean
isOrderable(java.lang.String propertyName)
boolean
isQueryable(java.lang.String propertyName)
-
-
-
Method Detail
-
getNodeRefs
java.util.Map<java.lang.String,NodeRef> getNodeRefs()
- Returns:
- the matching nodes by selector (at navigation time)
-
getScores
java.util.Map<java.lang.String,java.lang.Float> getScores()
- Returns:
- the scores by selector (at navigation time)
-
getProperty
java.io.Serializable getProperty(NodeRef nodeRef, java.lang.String propertyName)
Get a property- Parameters:
nodeRef
- NodeRefpropertyName
- String- Returns:
- the property (at navigation time)
-
getNodeService
NodeService getNodeService()
- Returns:
- the node service
-
getScore
java.lang.Float getScore()
- Returns:
- the score (at navigation time)
-
buildLuceneEquality
<Q,S,E extends java.lang.Throwable> Q buildLuceneEquality(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends java.lang.Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends java.lang.Throwable
-
buildLuceneExists
<Q,S,E extends java.lang.Throwable> Q buildLuceneExists(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.lang.Boolean not) throws E extends java.lang.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 java.lang.Throwable
-
buildLuceneGreaterThan
<Q,S,E extends java.lang.Throwable> Q buildLuceneGreaterThan(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends java.lang.Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends java.lang.Throwable
-
buildLuceneGreaterThanOrEquals
<Q,S,E extends java.lang.Throwable> Q buildLuceneGreaterThanOrEquals(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends java.lang.Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends java.lang.Throwable
-
buildLuceneLessThan
<Q,S,E extends java.lang.Throwable> Q buildLuceneLessThan(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends java.lang.Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends java.lang.Throwable
-
buildLuceneLessThanOrEquals
<Q,S,E extends java.lang.Throwable> Q buildLuceneLessThanOrEquals(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends java.lang.Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends java.lang.Throwable
-
buildLuceneLike
<Q,S,E extends java.lang.Throwable> Q buildLuceneLike(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, java.lang.Boolean not) throws E extends java.lang.Throwable
Note: Like is not required to support functions from the spec- Parameters:
propertyName
- Stringvalue
- Serializablenot
- Boolean- Returns:
- the query
- Throws:
E
E extends java.lang.Throwable
-
buildLuceneInequality
<Q,S,E extends java.lang.Throwable> Q buildLuceneInequality(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.io.Serializable value, PredicateMode mode, LuceneFunction luceneFunction) throws E extends java.lang.Throwable
- Parameters:
propertyName
- Stringvalue
- Serializablemode
- PredicateModeluceneFunction
- LuceneFunction- Returns:
- the query
- Throws:
E
E extends java.lang.Throwable
-
buildLuceneIn
<Q,S,E extends java.lang.Throwable> Q buildLuceneIn(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName, java.util.Collection<java.io.Serializable> values, java.lang.Boolean not, PredicateMode mode) throws E extends java.lang.Throwable
Note: In is not required to support functions from the spec- Parameters:
propertyName
- Stringnot
- Booleanmode
- PredicateMode- Returns:
- the query
- Throws:
E
E extends java.lang.Throwable
-
getLuceneSortField
<Q,S,E extends java.lang.Throwable> java.lang.String getLuceneSortField(LuceneQueryParserAdaptor<Q,S,E> lqpa, java.lang.String propertyName) throws E extends java.lang.Throwable
- Parameters:
propertyName
- String- Returns:
- the field used for sorting the given property
- Throws:
E
E extends java.lang.Throwable
-
isObjectId
boolean isObjectId(java.lang.String propertyName)
- Parameters:
propertyName
- String- Returns:
- - is this an object id
-
isQueryable
boolean isQueryable(java.lang.String propertyName)
- Parameters:
propertyName
- String- Returns:
- is this property queryable
-
isOrderable
boolean isOrderable(java.lang.String propertyName)
- Parameters:
propertyName
- String- Returns:
- Is this property orderable
-
getLuceneFieldName
java.lang.String getLuceneFieldName(java.lang.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, java.lang.String propertyName)
- Parameters:
selector
- SelectorpropertyName
- String
-
isMultiValued
boolean isMultiValued(java.lang.String propertyName)
Is this a multi-valued property?- Parameters:
propertyName
- String- Returns:
- boolean
-
getAlfrescoPropertyName
java.lang.String getAlfrescoPropertyName(java.lang.String propertyName)
-
getAlfrescoTypeName
java.lang.String getAlfrescoTypeName(java.lang.String staticValue)
- Parameters:
staticValue
- String- Returns:
- String
-
-