public class ContainsPredicate extends ScalarSpacePredicate
Modifier and Type | Field and Description |
---|---|
protected short[] |
_containsIndexes |
protected String |
_fieldPath |
protected SpacePropertyInfo[] |
_propertyInfo |
protected ISpacePredicate |
_spacePredicate |
protected short |
_templateMatchCode |
protected String[] |
_tokens |
_convertedValueWrapper, _expectedValue, functionCallDescription
Constructor and Description |
---|
ContainsPredicate()
Default constructor for Externalizable.
|
ContainsPredicate(Object expectedValue,
FunctionCallDescription functionCallDescription,
String fieldPath,
short templateMatchCode) |
ContainsPredicate(Object expectedValue,
FunctionCallDescription functionCallDescription,
String fieldPath,
short templateMatchCode,
String relation,
String typeName) |
Modifier and Type | Method and Description |
---|---|
boolean |
execute(Object target)
Iterate through the the field's path tokens and when reached to a collection, iterate through
its items for property matching (collection[*].property = ?) or call match for regular
contains (collection[*] = ?).
|
protected boolean |
executePredicate(Object valueToMatch)
Performs a single value matching.
|
protected short[] |
getContainsIndexes() |
protected String |
getContainsPath() |
protected String |
getFieldPath() |
protected String |
getOperatorName() |
protected Object |
getPreparedExpectedValue(Object target)
Since we don't know the generic type of the collection we try to get it from the first
matching attempt target.
|
protected SpacePropertyInfo[] |
getPropertyInfo() |
protected String[] |
getTokens() |
protected void |
initialize() |
protected boolean |
match(Object actual,
Object expected) |
protected boolean |
performMatching(Object value,
int tokenIndex,
int currentContainsIndex) |
protected void |
readExternalImpl(ObjectInput in) |
void |
setCacheManagerForExecution(CacheManager cacheManager) |
protected void |
writeExternalImpl(ObjectOutput out) |
equals, getExpectedValue, toString
preparePredicate, requiresCacheManagerForExecution
readExternal, writeExternal
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
enabledSmartExternalizableWithReference
readExternal, writeExternal
protected String[] _tokens
protected SpacePropertyInfo[] _propertyInfo
protected ISpacePredicate _spacePredicate
protected String _fieldPath
protected short[] _containsIndexes
protected short _templateMatchCode
public ContainsPredicate()
public ContainsPredicate(Object expectedValue, FunctionCallDescription functionCallDescription, String fieldPath, short templateMatchCode)
public ContainsPredicate(Object expectedValue, FunctionCallDescription functionCallDescription, String fieldPath, short templateMatchCode, String relation, String typeName)
protected boolean match(Object actual, Object expected)
match
in class ScalarSpacePredicate
public void setCacheManagerForExecution(CacheManager cacheManager)
setCacheManagerForExecution
in interface ISpacePredicate
setCacheManagerForExecution
in class AbstractSpacePredicate
protected String getOperatorName()
getOperatorName
in class ScalarSpacePredicate
protected Object getPreparedExpectedValue(Object target)
getPreparedExpectedValue
in class ScalarSpacePredicate
public boolean execute(Object target)
execute
in interface ISpacePredicate
execute
in class ScalarSpacePredicate
protected void initialize()
protected boolean performMatching(Object value, int tokenIndex, int currentContainsIndex)
protected boolean executePredicate(Object valueToMatch)
protected String getFieldPath()
protected String[] getTokens()
protected short[] getContainsIndexes()
protected SpacePropertyInfo[] getPropertyInfo()
protected String getContainsPath()
protected void readExternalImpl(ObjectInput in) throws IOException, ClassNotFoundException
readExternalImpl
in class ScalarSpacePredicate
IOException
ClassNotFoundException
protected void writeExternalImpl(ObjectOutput out) throws IOException
writeExternalImpl
in class ScalarSpacePredicate
IOException
Copyright © GigaSpaces.