com.metamatrix.common.actions
Class ExchangeObject

java.lang.Object
  extended by com.metamatrix.common.actions.ActionDefinition
      extended by com.metamatrix.common.actions.TargetedActionDefinition
          extended by com.metamatrix.common.actions.ExchangeObject
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ExchangeNamedObject

public class ExchangeObject
extends TargetedActionDefinition

This action definition specifies that the value of an object reference in the target should be changed from the current object to a new object.

See Also:
Serialized Form

Constructor Summary
protected ExchangeObject(ExchangeObject rhs)
           
  ExchangeObject(java.lang.Object target, AttributeDefinition attribute, java.lang.Object previousValue, java.lang.Object newValue)
           
protected ExchangeObject(java.lang.Object target, java.lang.Integer attributeCode, java.lang.Object[] args)
           
 
Method Summary
 java.lang.Object clone()
          Return a deep cloned instance of this object.
 java.lang.String getActionDescription()
          Get the description (i.e., verb) for this type of action.
 java.lang.Object getNewValue()
           
 java.lang.Object getPreviousValue()
           
 ActionDefinition getUndoActionDefinition()
          Obtain the definition of the action that undoes this action definition.
 java.lang.String toString()
          Returns a string representing the current state of the object.
 
Methods inherited from class com.metamatrix.common.actions.ActionDefinition
getArguments, getAttributeCode, getAttributeDescription, getCreationTime, getCreationTimeMillis, getTarget, hasArguments, hasAttributeCode, hasTarget
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExchangeObject

public ExchangeObject(java.lang.Object target,
                      AttributeDefinition attribute,
                      java.lang.Object previousValue,
                      java.lang.Object newValue)

ExchangeObject

protected ExchangeObject(java.lang.Object target,
                         java.lang.Integer attributeCode,
                         java.lang.Object[] args)

ExchangeObject

protected ExchangeObject(ExchangeObject rhs)
Method Detail

getPreviousValue

public java.lang.Object getPreviousValue()

getNewValue

public java.lang.Object getNewValue()

toString

public java.lang.String toString()
Returns a string representing the current state of the object.

Overrides:
toString in class ActionDefinition
Returns:
the string representation of this instance.

clone

public java.lang.Object clone()
Return a deep cloned instance of this object. Subclasses must override this method.

Specified by:
clone in class ActionDefinition
Returns:
the object that is the clone of this instance.

getUndoActionDefinition

public ActionDefinition getUndoActionDefinition()
Obtain the definition of the action that undoes this action definition. If a modification action with the returned action definition is applied to the same target (when the state is such as that left by the original modification action), the resulting target will be left in a state that is identical to the target before either action were applied.

Specified by:
getUndoActionDefinition in class ActionDefinition
Returns:
the action definition that undoes this action definition.

getActionDescription

public java.lang.String getActionDescription()
Description copied from class: ActionDefinition
Get the description (i.e., verb) for this type of action.

Specified by:
getActionDescription in class ActionDefinition
Returns:
the string description for this type of action.


Copyright © 2009. All Rights Reserved.