List of all members.
All extractors in the array are applied to the same target object and the result of the extraction is a List of extracted values.
Common scenarios for using the MultiExtractor involve the DistinctValues or GroupAggregator aggregators, that allow clients to collect all distinct combinations of a given set of attributes or collect and run additional aggregation against the corresponding groups of entries.
|MultiExtractor Handle definition. |
|MultiExtractor View definition. |
|MultiExtractor Holder definition. |
Public Member Functions
|virtual Object::Holder||extract (Object::Holder ohTarget) const|
|Extract the value from the passed object.|
The returned value may be NULL.
|virtual Object::Holder||extractFromEntry (Map::Entry::Holder ohEntry) const|
|Extract the value from the passed entry. |
|virtual int32_t||compareEntries (QueryMap::Entry::View vEntry1, QueryMap::Entry::View vEntry2) const|
|Compare two entries based on the rules specified by Comparator.|
If possible, use the coherence::util::QueryMap.Entry::extract() method to optimize the value extraction process.
This method is expected to be implemented by Comparator wrappers, such as ChainedComparator and InverseComparator, which simply pass on this invocation to the wrapped Comparator objects if they too implement this interface, or to invoke their default compare method passing the actual objects (not the extracted values) obtained from the extractor using the passed entries.
This interface is also expected to be implemented by ValueExtractor implementations that implement the Comparator interface. It is expected that in most cases, the Comparator wrappers will eventually terminate at (i.e. delegate to) ValueExtractors that also implement this interface.
Static Public Member Functions
|static ObjectArray::View||createExtractors (String::View vsNames)|
|Parse a comma-delimited sequence of method names and instantiate a corresponding array ValueExtractor objects. |
Protected Member Functions
|Default constructor (necessary for the PortableObject interface). |
|MultiExtractor (ObjectArray::View vaExtractor)|
|Construct a MultiExtractor. |
Extract the value from the passed entry.
The underlying extractors are applied sequentially, so a result of a previous extractor serves as a target object for a next one. A value of NULL prevents any further extractions and is returned immediately. For intrinsic types, the returned value is expected to be a standard wrapper type in the same manner that reflection works; for example, int32_t would be returned as a Integer32.
Reimplemented from AbstractExtractor.
Parse a comma-delimited sequence of method names and instantiate a corresponding array ValueExtractor objects.
|vsNames||a comma-delimited sequence of method names|