Oracle Coherence for C++ API


ValueExtractor Class Reference

#include <coherence/util/ValueExtractor.hpp>

Inherits Object.

Inherited by AbstractExtractor [virtual], IndexAwareExtractor [virtual], and NullImplementation::NullValueExtractor [virtual].

List of all members.

Detailed Description

ValueExtractor is used to both extract values (for example, for sorting or filtering) from an object, and to provide an identity for that extraction.

Important Note: all classes that implement the ValueExtractor interface must explicitly implement the Object::hashCode() and Object::equals methods in a way that is based solely on the object's serializable state.

jh 2008.02.26

Public Types

typedef spec::Handle  Handle
  ValueExtractor Handle definition.
typedef spec::View  View
  ValueExtractor View definition.
typedef spec::Holder  Holder
  ValueExtractor Holder definition.

Public Member Functions

virtual Object::Holder  extract (Object::Holder ohTarget) const =0
  Extract the value from the passed object.

Member Function Documentation

virtual Object::Holder extract ( Object::Holder  ohTarget  )  const [pure virtual]

Extract the value from the passed object.

The returned value may be NULL.

ohTarget  an Object to retrieve the value from
the extracted value; NULL is an acceptable value
ClassCastException  if this ValueExtractor is incompatible with the passed object to extract a value from and the implementation requires the passed object to be of a certain type
Exception  if this ValueExtractor encounters an exception in the course of extracting the value
IllegalArgumentException  if this ValueExtractor cannot handle the passed object for any other reason; an implementor should include a descriptive message

Implemented in AbstractExtractor, ChainedExtractor, ComparisonValueExtractor, ConditionalExtractor, IdentityExtractor, KeyExtractor, MultiExtractor, ReflectionExtractor, TypedExtractor, and TypedExtractor< RH::ValueType::BoxedType, C, M, coherence::lang::BoxHandle< RH::ValueType >, OH >.

The documentation for this class was generated from the following file:
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.