public class MapBasedQueryWalker extends QueryHelper.WalkerCallbackAdapter
InvalidArgumentException
is thrown unless the method
MapBasedQueryWalker.handleUnmatchedComparison(int, String, String)
returns true (default
implementation returns false).Modifier and Type | Class and Description |
---|---|
class |
MapBasedQueryWalker.QueryVariableHolder |
Constructor and Description |
---|
MapBasedQueryWalker(java.util.Set supportedEqualsParameters,
java.util.Set supportedMatchesParameters) |
Modifier and Type | Method and Description |
---|---|
void |
and()
Called any time an AND is encountered.
|
void |
comparison(int type,
java.lang.String propertyName,
java.lang.String propertyValue)
One of EQUALS LESSTHAN GREATERTHAN LESSTHANOREQUALS GREATERTHANOREQUALS;
|
void |
enableVariablesSupport(org.alfresco.service.namespace.NamespaceService namespaceService,
org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
java.lang.String |
getProperty(java.lang.String propertyName,
int type) |
java.lang.Object |
getProperty(java.lang.String propertyName,
int type,
java.lang.Class returnType)
Get the property value, converted to the requested type.
|
java.util.List |
getVariableProperties() |
protected boolean |
handleUnmatchedComparison(int type,
java.lang.String propertyName,
java.lang.String propertyValue)
Called when unsupported property is encountered or comparison operator
other than equals.
|
void |
matches(java.lang.String property,
java.lang.String value,
boolean negated)
Called any time a MATCHES clause is encountered.
|
protected void |
processVariable(java.lang.String propertyName,
java.lang.String propertyValue,
int type) |
void |
setSupportedGreaterThanOrEqualParameters(java.util.Set supportedGreaterThanOrEqualParameters) |
void |
setSupportedGreaterThanParameters(java.util.Set supportedGreaterThanParameters) |
void |
setSupportedLessThanOrEqualParameters(java.util.Set supportedLessThanOrEqualParameters) |
void |
setSupportedLessThanParameters(java.util.Set supportedLessThanParameters) |
between, exists, in, or
public MapBasedQueryWalker(java.util.Set supportedEqualsParameters, java.util.Set supportedMatchesParameters)
public void setSupportedGreaterThanParameters(java.util.Set supportedGreaterThanParameters)
public void setSupportedGreaterThanOrEqualParameters(java.util.Set supportedGreaterThanOrEqualParameters)
public void setSupportedLessThanParameters(java.util.Set supportedLessThanParameters)
public void setSupportedLessThanOrEqualParameters(java.util.Set supportedLessThanOrEqualParameters)
public void enableVariablesSupport(org.alfresco.service.namespace.NamespaceService namespaceService, org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public java.util.List getVariableProperties()
public void matches(java.lang.String property, java.lang.String value, boolean negated)
QueryHelper.WalkerCallback
matches
in interface QueryHelper.WalkerCallback
matches
in class QueryHelper.WalkerCallbackAdapter
negated
- returns true if "NOT MATCHES" was usedpublic void comparison(int type, java.lang.String propertyName, java.lang.String propertyValue)
QueryHelper.WalkerCallback
comparison
in interface QueryHelper.WalkerCallback
comparison
in class QueryHelper.WalkerCallbackAdapter
public java.lang.String getProperty(java.lang.String propertyName, int type)
public java.lang.Object getProperty(java.lang.String propertyName, int type, java.lang.Class returnType)
parameters
- used to extract parameter value frompropertyName
- name of the parameterreturnType
- type of object to returnjava.lang.IllegalArgumentException
- 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 void processVariable(java.lang.String propertyName, java.lang.String propertyValue, int type)
protected boolean handleUnmatchedComparison(int type, java.lang.String propertyName, java.lang.String propertyValue)
Copyright © 2005 - 2013 Alfresco Software, Inc. All Rights Reserved.