Class ChainedExtractorBuilder

java.lang.Object
com.tangosol.coherence.dslquery.ChainedExtractorBuilder
All Implemented Interfaces:
ExtractorBuilder

public class ChainedExtractorBuilder extends Object implements ExtractorBuilder
An ExtractorBuilder implementation that delegates building ValueExtractors to a chain of ExtractorBuilders and returns the result from the first ExtractorBuilder to return a non-null value from its realize(String, int, String) method.
Since:
Coherence 12.2.1
Author:
jk 2014.07.15
  • Field Details

  • Constructor Details

    • ChainedExtractorBuilder

      public ChainedExtractorBuilder(ExtractorBuilder... aBuilders)
      Construct a ChainedExtractorBuilder that uses the specified chain of ExtractorBuilders to realize instances of ValueExtractors.
      Parameters:
      aBuilders - the chain of ExtractorBuilder to use
  • Method Details

    • realize

      public ValueExtractor realize(String sCacheName, int nTarget, String sProperties)
      Call the realize(String, int, String) method on each ExtractorBuilder in the chain returning the result of the first ExtractorBuilder to return a non-null value.
      Specified by:
      realize in interface ExtractorBuilder
      Parameters:
      sCacheName - the name of the cache the ValueExtractor will be invoked against
      nTarget - the target for the ValueExtractor
      sProperties - 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