public class MapBasedQueryWalker extends QueryHelper.WalkerCallbackAdapter
InvalidArgumentException
is thrown unless the method
handleUnmatchedComparison(int, String, String)
returns true (default
implementation returns false).Modifier and Type | Class and Description |
---|---|
class |
MapBasedQueryWalker.QueryVariableHolder |
UNSUPPORTED
Constructor and Description |
---|
MapBasedQueryWalker(Set<String> supportedEqualsParameters,
Set<String> supportedMatchesParameters) |
Modifier and Type | Method and Description |
---|---|
void |
and()
Called any time an AND is encountered.
|
void |
comparison(int type,
String propertyName,
String propertyValue,
boolean negated)
One of EQUALS LESSTHAN GREATERTHAN LESSTHANOREQUALS GREATERTHANOREQUALS;
|
void |
enableVariablesSupport(org.alfresco.service.namespace.NamespaceService namespaceService,
org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
String |
getProperty(String propertyName,
int type) |
<T> T |
getProperty(String propertyName,
int type,
Class<T> returnType)
Get the property value, converted to the requested type.
|
List<MapBasedQueryWalker.QueryVariableHolder> |
getVariableProperties() |
protected boolean |
handleUnmatchedComparison(int type,
String propertyName,
String propertyValue)
Called when unsupported property is encountered or comparison operator
other than equals.
|
void |
matches(String property,
String value,
boolean negated)
Called any time a MATCHES clause is encountered.
|
protected void |
processVariable(String propertyName,
String propertyValue,
int type) |
void |
setSupportedGreaterThanOrEqualParameters(Set<String> supportedGreaterThanOrEqualParameters) |
void |
setSupportedGreaterThanParameters(Set<String> supportedGreaterThanParameters) |
void |
setSupportedLessThanOrEqualParameters(Set<String> supportedLessThanOrEqualParameters) |
void |
setSupportedLessThanParameters(Set<String> supportedLessThanParameters) |
between, exists, in, or
public void setSupportedGreaterThanParameters(Set<String> supportedGreaterThanParameters)
public void setSupportedGreaterThanOrEqualParameters(Set<String> supportedGreaterThanOrEqualParameters)
public void setSupportedLessThanParameters(Set<String> supportedLessThanParameters)
public void setSupportedLessThanOrEqualParameters(Set<String> supportedLessThanOrEqualParameters)
public void enableVariablesSupport(org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public List<MapBasedQueryWalker.QueryVariableHolder> getVariableProperties()
public void matches(String property, String value, boolean negated)
QueryHelper.WalkerCallback
matches
in interface QueryHelper.WalkerCallback
matches
in class QueryHelper.WalkerCallbackAdapter
property
- Name of the propertyvalue
- Stringnegated
- returns true if "NOT MATCHES" was usedpublic void comparison(int type, String propertyName, String propertyValue, boolean negated)
QueryHelper.WalkerCallback
comparison
in interface QueryHelper.WalkerCallback
comparison
in class QueryHelper.WalkerCallbackAdapter
public <T> T getProperty(String propertyName, int type, Class<T> returnType)
propertyName
- name of the parametertype
- intreturnType
- type of object to returnIllegalArgumentException
- when no conversion for the given
returnType is available or if returnType is null.InvalidArgumentException
- when conversion to the given type was
not possible due to an error while convertingpublic void and()
QueryHelper.WalkerCallback
and
in interface QueryHelper.WalkerCallback
and
in class QueryHelper.WalkerCallbackAdapter
protected boolean handleUnmatchedComparison(int type, String propertyName, String propertyValue)
Copyright © 2005–2017 Alfresco Software. All rights reserved.