atg.svc.agent.environment
Class EnvironmentChangeDetail

java.lang.Object
  extended by atg.svc.agent.environment.EnvironmentChangeDetail

public class EnvironmentChangeDetail
extends java.lang.Object

This class represents a detected change to an environment object. Environment change monitors generate these in response to requested changes to the agent's environment.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  boolean mCreateNewObject
           
protected  java.lang.Object mNewObject
           
protected  java.lang.String mNewObjectId
           
protected  java.lang.String mObjectName
           
protected  java.lang.Object mOldObject
           
protected  java.lang.String mOldObjectId
           
 
Constructor Summary
EnvironmentChangeDetail()
           
EnvironmentChangeDetail(java.lang.String pObjectName, java.lang.Object pOldObject, java.lang.String pOldObjectId, java.lang.String pNewObjectId, java.lang.Object pNewObject, boolean pCreateNewObject)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Extends equality by comparing all property values.
 java.lang.Object getNewObject()
          Returns the object that will replace the old object when the change is applied.
 java.lang.String getNewObjectId()
          Returns the id of the new object represented by this change detail.
 java.lang.String getObjectName()
           
 java.lang.Object getOldObject()
           
 java.lang.String getOldObjectId()
           
 int hashCode()
           
 boolean isCreateNewObject()
           
 void setCreateNewObject(boolean pCreateNewObject)
           
 void setNewObject(java.lang.Object newObject)
           
 void setNewObjectId(java.lang.String pNewObjectId)
           
 void setObjectName(java.lang.String pObjectName)
           
 void setOldObject(java.lang.Object pOldObject)
           
 void setOldObjectId(java.lang.String pOldObjectId)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

mObjectName

protected java.lang.String mObjectName

mOldObject

protected java.lang.Object mOldObject

mOldObjectId

protected java.lang.String mOldObjectId

mNewObjectId

protected java.lang.String mNewObjectId

mNewObject

protected java.lang.Object mNewObject

mCreateNewObject

protected boolean mCreateNewObject
Constructor Detail

EnvironmentChangeDetail

public EnvironmentChangeDetail()

EnvironmentChangeDetail

public EnvironmentChangeDetail(java.lang.String pObjectName,
                               java.lang.Object pOldObject,
                               java.lang.String pOldObjectId,
                               java.lang.String pNewObjectId,
                               java.lang.Object pNewObject,
                               boolean pCreateNewObject)
Method Detail

getObjectName

public java.lang.String getObjectName()
Returns:
the name of the environment object represented by this change detail

setObjectName

public void setObjectName(java.lang.String pObjectName)

getNewObjectId

public java.lang.String getNewObjectId()
Returns the id of the new object represented by this change detail.

Note that this property can be valued when creating new objects, if the new object is to be instantiated with a specific id.

Returns:
id of the new object represented by this change detail

setNewObjectId

public void setNewObjectId(java.lang.String pNewObjectId)

isCreateNewObject

public boolean isCreateNewObject()
Returns:
true if the change of object means a new object will be instantiated.

setCreateNewObject

public void setCreateNewObject(boolean pCreateNewObject)

getOldObject

public java.lang.Object getOldObject()
Returns:
a reference to the current environment object (i.e. before the change is applied)

setOldObject

public void setOldObject(java.lang.Object pOldObject)

getOldObjectId

public java.lang.String getOldObjectId()
Returns:
the id of the oldObject

setOldObjectId

public void setOldObjectId(java.lang.String pOldObjectId)

getNewObject

public java.lang.Object getNewObject()
Returns the object that will replace the old object when the change is applied.

For changes that will create new objects (createNewObject = true), this property may return null.

Returns:
the object that will replace the old object when the change is applied. This property can return null for a change that will create new a object

setNewObject

public void setNewObject(java.lang.Object newObject)

equals

public boolean equals(java.lang.Object obj)
Extends equality by comparing all property values. If they all are equal to one another, the objects are considered equal.

This extension is necessary because this method is used to detect duplication and conflicts between two changes mapped to the same object name.

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object