Class CompositeUpdater
An IValueUpdater implementation based on an extractor-updater pair.
Inherited Members
Namespace: Tangosol.Util.Extractor
Assembly: Coherence.dll
Syntax
public class CompositeUpdater : IValueUpdater, IPortableObject
Constructors
CompositeUpdater()
Default constructor.
Declaration
public CompositeUpdater()
CompositeUpdater(string)
Construct a CompositeUpdater for a specified method name sequence.
Declaration
public CompositeUpdater(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | 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. |
Remarks
For example: "Address.Zip" property will indicate that the "Address" property should be used to extract an Address object, which will then be used by the "Zip" call.
CompositeUpdater(IValueExtractor, IValueUpdater)
Construct a CompositeUpdater based on the specified extractor and updater.
Declaration
public CompositeUpdater(IValueExtractor extractor, IValueUpdater updater)
Parameters
Type | Name | Description |
---|---|---|
IValueExtractor | extractor | The IValueExtractor. |
IValueUpdater | updater | The IValueUpdater. |
Remarks
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.
Fields
m_extractor
The IValueExtractor part.
Declaration
protected IValueExtractor m_extractor
Field Value
Type | Description |
---|---|
IValueExtractor |
m_updater
The IValueUpdater part.
Declaration
protected IValueUpdater m_updater
Field Value
Type | Description |
---|---|
IValueUpdater |
Properties
Extractor
The IValueExtractor part.
Declaration
public virtual IValueExtractor Extractor { get; }
Property Value
Type | Description |
---|---|
IValueExtractor | The IValueExtractor part. |
Updater
The IValueUpdater part.
Declaration
public virtual IValueUpdater Updater { get; }
Property Value
Type | Description |
---|---|
IValueUpdater | The IValueUpdater part. |
Methods
Equals(object)
Compare the IValueUpdater with another object to determine equality.
Declaration
public override bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
object | o | The object to compare with. |
Returns
Type | Description |
---|---|
bool | true iff this IValueUpdater and the passed object are quivalent IValueUpdaters. |
Overrides
GetHashCode()
Determine a hash value for the IValueUpdater object according to the general object.GetHashCode contract.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | An integer hash value for this IValueUpdater object. |
Overrides
ReadExternal(IPofReader)
Restore the contents of a user type instance by reading its state using the specified IPofReader object.
Declaration
public virtual void ReadExternal(IPofReader reader)
Parameters
Type | Name | Description |
---|---|---|
IPofReader | reader | The IPofReader from which to read the object's state. |
Exceptions
Type | Condition |
---|---|
IOException | If an I/O error occurs. |
ToString()
Return a human-readable description for this CompositeUpdater.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A String description of the CompositeUpdater. |
Overrides
Update(object, object)
Update the state of the passed target object using the passed value.
Declaration
public virtual void Update(object target, object value)
Parameters
Type | Name | Description |
---|---|---|
object | target | The object to update the state of. |
object | value | The new value to update the state with. |
Exceptions
Type | Condition |
---|---|
InvalidCastException | If this IValueUpdater 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. |
ArgumentException | If this IValueUpdater cannot handle the passed target object or value for any other reason; an implementor should include a descriptive message. |
WriteExternal(IPofWriter)
Save the contents of a POF user type instance by writing its state using the specified IPofWriter object.
Declaration
public virtual void WriteExternal(IPofWriter writer)
Parameters
Type | Name | Description |
---|---|---|
IPofWriter | writer | The IPofWriter to which to write the object's state. |
Exceptions
Type | Condition |
---|---|
IOException | If an I/O error occurs. |