Oracle® Fusion Middleware .NET API Reference for Oracle Coherence
12c (12.2.1.4.0)
E90869-02
The KeyExtractor is a special purpose IValueExtractor implementation that serves as an indicator that a query should be run against the key objects rather than the values.

Namespace: Tangosol.Util.Extractor
Assembly: Coherence (in Coherence.dll) Version: 12.2.1.4014 (12.2.1.4014)

Syntax

C#
public class KeyExtractor : AbstractExtractor, 
	IPortableObject

Remarks

The major difference between the KeyExtractor and a standard ReflectionExtractor is that when used in various IFilter implementations it forces the evaluation of entry keys rather than entry values.

For example, consider a key object that consists of two properties: "FirstName" and "LastName". To retrieve all keys that have a value of the "LastName" property equal to "Smith", the following query could be used:

            IValueExtractor extractor = new KeyExtractor("LastName");
            ICollection keys = cache.GetKeys(new EqualsFilter(extractor, "Smith"));
            
As of Coherence 3.5, the same effect can be achieved for subclasses of the AbstractExtractor, for example:
            IValueExtractor extractor = new ReflectionExtractor("LastName", 
            null,AbstractExtractor.KEY);
            ICollection keys = cache.GetKeys(new EqualsFilter(extractor, "Smith"));
            

Inheritance Hierarchy

System..::..Object
  Tangosol.Util.Extractor..::..AbstractExtractor
    Tangosol.Util.Extractor..::..KeyExtractor

See Also