|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.websphere.objectgrid.continuousquery.filter.AbstractCQFilter<KeyType,ValueType,AttributeType,MatchType> com.ibm.websphere.objectgrid.continuousquery.filter.CompareFilter<KeyType,ValueType,AttributeType,MatchType>
KeyType
- Type of the key object for the map being queriedValueType
- Type of the value object for the map being queriedAttributeType
- Type of the attribute referenced by the attribute pathMatchType
- Type of the object being compared topublic abstract class CompareFilter<KeyType,ValueType,AttributeType,MatchType>
This is a base class for filters comparing an attribute with a scalar.
Field Summary | |
---|---|
protected String |
attributePath
|
protected MatchType |
objectToCompare
|
Fields inherited from class com.ibm.websphere.objectgrid.continuousquery.filter.AbstractCQFilter |
---|
version |
Fields inherited from interface com.ibm.websphere.objectgrid.continuousquery.ContinuousQueryFilter |
---|
POJO_ADDRESSABLEKEYNAME, POJO_PATHSEPARATOR |
Constructor Summary | |
---|---|
CompareFilter()
|
|
CompareFilter(String attributePath,
MatchType object)
Construct a filter for comparing an arbitrary object with the filtering criteria. |
Method Summary | |
---|---|
protected String |
createString(String operator)
Composes a string representation of the compare filter using the operator. |
Methods inherited from class com.ibm.websphere.objectgrid.continuousquery.filter.AbstractCQFilter |
---|
createString, equals, getAttribute, hashCode, isKeyFilter, toString, validateAttributePath |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.websphere.objectgrid.continuousquery.ContinuousQueryFilter |
---|
filter |
Field Detail |
---|
protected String attributePath
protected MatchType objectToCompare
Constructor Detail |
---|
public CompareFilter()
public CompareFilter(String attributePath, MatchType object)
POJO maps
For POJO maps which use traditional java serialization, or a custom ObjectTransformer
, attributes are accessed using reflection. The field name and property name are defined by the
JavaBeans specification, or the method name defined in the class.
By default paths are assumed to reference attributes on the value object associated with the cache entry.
The path delimiter is ".", which is specified in ContinuousQueryFilter.POJO_PATHSEPARATOR
.
A key object attribute is specified by including the "key" path prefix, which is specified in ContinuousQueryFilter.POJO_ADDRESSABLEKEYNAME
.
To specify a method invocation, append "()" to the method name.
If null or an empty string is specified, the entire value object is used as the attribute value.
If ContinuousQueryFilter.POJO_ADDRESSABLEKEYNAME
is specified by itself, the entire key object is used as the attribute value.
POJO attribute path grammar:
<attributePath> ::= NULL | "" | "key" | <repeatableSegment> | "key" <pathSeparator> <repeatableSegment> <repeatableSegment> ::= <segment> | <segment> <pathSeparator> <repeatableSegment> <segment> ::= <attributeName> | <methodName> "()" <attributeName> ::= a valid field name on the POJO <methodName> ::= a no argument public method on the POJOPOJO attribute path examples:
name
- The "name" attribute in the value object.
key.ssn
- The "ssn" attribute in the key object.
employee.store.totalSales()
- The result of the "totalSales" method from the "store" embedded type from the "employee" embedded type in the value object.
MapSerializerPlugin maps
For maps that use a MapSerializerPlugin, the attribute path is passed directly
to the DataSerializer.DataAttributeInflatable.getAttributeContexts(String...) method
and the attribute values are fetched using the
DataSerializer.DataAttributeInflatable.inflateDataObjectAttributes(DataObjectContext, XsDataInputStream, Object)
method. The attribute path is a path to an attribute within the key or value.
A key attribute is specified by including the "key" path prefix, or the prefix specified by the MapDataDescriptor.getAddressableKeyName()
method.
The path delimiter is specified in the DataDescriptor.getPathSeparator()
for the DataDescriptor for each KeyDataSerializer or ValueSerializer.
If null or an empty string is specified, the entire value object is used as the attribute value.
If MapDataDescriptor.getAddressableKeyName()
is specified by itself, the entire key object is used as the attribute value.
Serializer attribute path grammar:
<attributePath> ::= NULL | "" | <addressableKeyName> | <repeatableSegment> | <addressableKeyName> <pathSeparator> <repeatableSegment> <repeatableSegment> ::= <attributeName> | <attributeName> <pathSeparator> <repeatableSegment> <attributeName> ::= a valid field name on the POJO <addressableKeyName> ::= "key" or the key identifier defined inMapSerializerPlugin attribute path examples:MapDataDescriptor.getAddressableKeyName()
<pathSeparator> ::= the path separator defined inDataDescriptor.getPathSeparator()
name
- Indexes the "name" attribute in the value object.
key.ssn
- Indexes the "ssn" attribute in the key object.
employee.store
- The "store" attribute from the "employee" embedded type in the value.
eXtreme Data Format maps
For maps using the eXtreme Data Format (XDF), the attribute path is passed directly
to the XDF component which will extract the attribute. The attribute path is a path to an attribute within the key or value.
A key attribute is specified by including the "key" path prefix, or the prefix specified by the MapDataDescriptor.getAddressableKeyName()
method.
The path delimiter is specified in the DataDescriptor.DEFAULT_PATHSEPARATOR
.
If null or an empty string is specified, the entire value object is used as the attribute value.
If MapDataDescriptor.getAddressableKeyName()
is specified by itself, the entire key object is used as the attribute value.
XDF attribute path grammar:
<attributePath> ::= NULL | "" | <addressableKeyName> | <repeatableSegment> | <addressableKeyName> <pathSeparator> <repeatableSegment> <repeatableSegment> ::= <attributeName> | <attributeName> <pathSeparator> <repeatableSegment> <attributeName> ::= a valid field name on the POJO <addressableKeyName> ::= "key" or the key identifier defined inXDF attribute path examples:MapDataDescriptor.getAddressableKeyName()
<pathSeparator> ::= the path separator defined inDataDescriptor.DEFAULT_PATHSEPARATOR
name
- Indexes the "name" attribute in the value object.
key.ssn
- Indexes the "ssn" attribute in the key object.
employee.store
- The "store" attribute from the "employee" embedded type in the value.
attributePath
- The path for retrieving a value for the object to be filtered.
If the value object should be compared without any manipulation, use null.
If the key object should be compared without any manipulation, use the addressible key name.object
- The value to be compared withMethod Detail |
---|
protected String createString(String operator)
operator
- the symbol that represents the operation