Oracle Fusion Middleware C++ API Reference for Oracle Coherence
12c (12.1.2)

E26041-01

CompositeUpdater Class Reference

#include <coherence/util/extractor/CompositeUpdater.hpp>

Inherits Object, ValueUpdater, and PortableObject.

List of all members.


Detailed Description

A ValueManipulator implementation based on an extractor-updater pair.

Author:
djl 2008.04.09
See also:
CompositeUpdater

Public Types

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

Public Member Functions

virtual void update (Object::Handle hTarget, Object::Holder ohValue) const
 Update the state of the passed target object using the passed value.

Parameters:
hTarget the Object to update the state of
ohValue the new value to update the state with
Exceptions:
ClassCastException if this ValueUpdater is incompatible with the passed target object or the value and the implementation requires the passed object or the value to be of a certain type
Exception if this ValueUpdater encounters a checked exception in the course of updating the target object
IllegalArgumentException if this ValueUpdater cannot handle the passed target object or value for any other reason; an implementor should include a descriptive message

virtual void readExternal (PofReader::Handle hIn)
 
virtual void writeExternal (PofWriter::Handle hOut) const
 
virtual void toStream (std::ostream &out) const
 Output a human-readable description of this Object to the given stream.

coherence::lang::operator<<(std::ostream, Object::View) is defined and will call into the toStream method, to output Objects. If a managed String object is desired, the COH_TO_STRING macro can be used to build up a String from streamable contents.

 Object::View vKey   = ...
 Object::View vValue = ...
 std::cout << vKey << " = " << vValue << std::endl;

 String::Handle hs = COH_TO_STRING(vKey << " = " << vValue);

Parameters:
out the stream used to output the description

virtual
ValueExtractor::View 
getExtractor () const
 Retreive the ValueExtractor part.
virtual
ValueUpdater::View 
getUpdater () const
 Retreive the ValueUpdator part.

Protected Member Functions

 CompositeUpdater ()
 Construct an empty CompositeUpdater (necessary for the PortableObject interface).
 CompositeUpdater (String::View vsName)
 Construct a CompositeUpdater for a specified method name sequence.
 CompositeUpdater (ValueExtractor::View vExtractor, ValueUpdater::View vUpdater)
 Construct a CompositeUpdater based on the specified extractor and updater.

Protected Attributes

FinalView
< ValueExtractor
f_vExtractor
 The ValueExtractor part.
FinalView< ValueUpdaterf_vUpdater
 The ValueUpdaterr part.

Constructor & Destructor Documentation

CompositeUpdater ( String::View  vsName  )  [protected]

Construct a CompositeUpdater for a specified method name sequence.

For example: "getAddress. setZip" method name will indicate that the "getAddress()" method should be used to extract an Address object, which will then be used by the "setZip(String)" call.

Parameters:
vsName a dot-delimited sequence of N method names which results in a CompositeUpdater that is based on an chain of (N-1) ReflectionExtractor objects and a single ReflectionUpdater.

CompositeUpdater ( ValueExtractor::View  vExtractor,
ValueUpdater::View  vUpdater 
) [protected]

Construct a CompositeUpdater based on the specified extractor and updater.

Note: the extractor and updater here are not symmetrical in nature: the extractor is used to "drill-down" to the target object, while the updater will operate on that extracted object.

Parameters:
vExtractor the ValueExtractor
vUpdater the ValueUpdater


Member Function Documentation

virtual ValueExtractor::View getExtractor (  )  const [virtual]

Retreive the ValueExtractor part.

Returns:
the ValueExtractor

virtual ValueUpdater::View getUpdater (  )  const [virtual]

Retreive the ValueUpdator part.

Returns:
the ValueUpdater


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