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) |
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 |
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) |
protected void |
writeExternalImpl(ObjectOutput out) |
equals, getExpectedValue, toString
preparePredicate, requiresCacheManagerForExecution, setCacheManagerForExecution
readExternal, writeExternal
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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)
protected boolean match(Object actual, Object expected)
match
in class ScalarSpacePredicate
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 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.