Interface FunctionEvaluationContext
-
- All Known Implementing Classes:
AlfrescoFunctionEvaluationContext,CmisFunctionEvaluationContext
public interface FunctionEvaluationContextThe 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 specvoidcheckFieldApplies(Selector selector, String propertyName)StringgetAlfrescoPropertyName(String propertyName)StringgetAlfrescoTypeName(String staticValue)StringgetLuceneFieldName(String propertyName)LuceneFunctiongetLuceneFunction(FunctionArgument functionArgument)<Q,S,E extends Throwable>
StringgetLuceneSortField(QueryParserAdaptor<Q,S,E> lqpa, String propertyName)Map<String,NodeRef>getNodeRefs()NodeServicegetNodeService()SerializablegetProperty(NodeRef nodeRef, String propertyName)Get a propertyFloatgetScore()Map<String,Float>getScores()booleanisMultiValued(String propertyName)Is this a multi-valued property?booleanisObjectId(String propertyName)booleanisOrderable(String propertyName)booleanisQueryable(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:
EE 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:
EE 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:
EE 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:
EE 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:
EE 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:
EE 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:
EE 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:
EE 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:
EE 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:
EE 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
-
-