|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.util.extractor.AbstractExtractor
com.tangosol.util.extractor.AbstractCompositeExtractor
com.tangosol.util.extractor.MultiExtractor
public class MultiExtractor
Composite ValueExtractor implementation based on an array of extractors.
All extractors in the array are applied to the same target object and the
result of the extraction is a List
of extracted
values.
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.
Field Summary |
---|
Fields inherited from class com.tangosol.util.extractor.AbstractCompositeExtractor |
---|
m_aExtractor |
Constructor Summary | |
---|---|
MultiExtractor()
Default constructor (necessary for the ExternalizableLite interface). |
|
MultiExtractor(String sNames)
Construct a MultiExtractor for a specified method name list. |
|
MultiExtractor(ValueExtractor[] aExtractor)
Construct a MultiExtractor. |
Method Summary | |
---|---|
int |
compareEntries(QueryMap.Entry entry1,
QueryMap.Entry entry2)
Compare two entries based on the rules specified by Comparator .
If possible, use the 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 ValueExtractor[] |
createExtractors(String sNames)
Parse a comma-delimited sequence of method names and instantiate a corresponding array of ValueExtractor objects. |
Object |
extract(Object oTarget)
Extract a collection of values from the passed object using the underlying array of ValueExtractor objects. |
Methods inherited from class com.tangosol.util.extractor.AbstractCompositeExtractor |
---|
equals, getExtractors, hashCode, readExternal, readExternal, toString, writeExternal, writeExternal |
Methods inherited from class com.tangosol.util.extractor.AbstractExtractor |
---|
compare |
Constructor Detail |
---|
public MultiExtractor()
public MultiExtractor(ValueExtractor[] aExtractor)
aExtractor
- the ValueExtractor arraypublic MultiExtractor(String sNames)
sNames
- a comma-delimited sequence of method names which results
in a MultiExtractor that is based on a corresponding
array of ValueExtractor
objects; individual
array elements will be either ReflectionExtractor
or ChainedExtractor
objectsMethod Detail |
---|
public Object extract(Object oTarget)
extract
in interface ValueExtractor
extract
in class AbstractExtractor
oTarget
- an Object to retrieve the collection of values from
List
containing the extracted values
or null if the target object itself is nullpublic int compareEntries(QueryMap.Entry entry1, QueryMap.Entry entry2)
Comparator
.
If possible, use the 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.
compareEntries
in interface QueryMapComparator
compareEntries
in class AbstractExtractor
entry1
- the first entry to compare values from; read-onlyentry2
- the second entry to compare values from; read-only
public static ValueExtractor[] createExtractors(String sNames)
ValueExtractor
objects. Individual
array elements will be either ReflectionExtractor
or
ChainedExtractor
objects.
sNames
- a comma-delimited sequence of method names
ValueExtractor
objects
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |