Package com.tangosol.coherence.dslquery
Class ChainedExtractorBuilder
- java.lang.Object
-
- com.tangosol.coherence.dslquery.ChainedExtractorBuilder
-
- All Implemented Interfaces:
ExtractorBuilder
public class ChainedExtractorBuilder extends Object implements ExtractorBuilder
AnExtractorBuilder
implementation that delegates buildingValueExtractor
s to a chain of ExtractorBuilders and returns the result from the first ExtractorBuilder to return a non-null value from itsrealize(String, int, String)
method.- Since:
- Coherence 12.2.1
- Author:
- jk 2014.07.15
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ExtractorBuilder>
f_listBuilders
The chain ofExtractorBuilder
s to delegate to.
-
Constructor Summary
Constructors Constructor Description ChainedExtractorBuilder(ExtractorBuilder... aBuilders)
Construct a ChainedExtractorBuilder that uses the specified chain ofExtractorBuilder
s to realize instances ofValueExtractor
s.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueExtractor
realize(String sCacheName, int nTarget, String sProperties)
Call the realize(String, int, String) method on eachExtractorBuilder
in the chain returning the result of the first ExtractorBuilder to return a non-null value.
-
-
-
Field Detail
-
f_listBuilders
protected final List<ExtractorBuilder> f_listBuilders
The chain ofExtractorBuilder
s to delegate to.
-
-
Constructor Detail
-
ChainedExtractorBuilder
public ChainedExtractorBuilder(ExtractorBuilder... aBuilders)
Construct a ChainedExtractorBuilder that uses the specified chain ofExtractorBuilder
s to realize instances ofValueExtractor
s.- Parameters:
aBuilders
- the chain of ExtractorBuilder to use
-
-
Method Detail
-
realize
public ValueExtractor realize(String sCacheName, int nTarget, String sProperties)
Call the realize(String, int, String) method on eachExtractorBuilder
in the chain returning the result of the first ExtractorBuilder to return a non-null value.- Specified by:
realize
in interfaceExtractorBuilder
- Parameters:
sCacheName
- the name of the cache the ValueExtractor will be invoked againstnTarget
- the target for the ValueExtractorsProperties
- the path to the property value to extract- Returns:
- a
ValueExtractor
for the given cache name, target and properties or null if non of the ExtractorBuilder returned a non-null value
-
-