Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

oracle.javatools.data
Class ChangeInfo

java.lang.Object
  extended by oracle.javatools.data.ChangeInfo

public final class ChangeInfo
extends java.lang.Object

An instance of this class identifies a single change that has been applied to a HashStructure or ListStructure.


Field Summary
static int HASH_STRUCTURE
          Structure type returned from getParentStructureType() indicating that the parent structure was a HashStructure.
static int LIST_STRUCTURE
          Structure type returned from getParentStructureType() indicating that the parent structure was a ListStructure.
static int PLACEHOLDER_VALUE_ADDED
          Change type returned from getChangeType() indicating that a placeholder value was added.
static int UNKNOWN_STRUCTURE
          Structure type returned from getParentStructureType() indicating that the parent structure was an unknown structure.
static int VALUE_ADDED
          Change type returned from getChangeType() indicating that a persistent value was added.
static int VALUE_MODIFIED
          Change type returned from getChangeType() indicating that a persistent value was modified.
static int VALUE_REMOVED
          Change type returned from getChangeType() indicating that a value was removed.
 
Method Summary
 int getChangeType()
          Returns the type of change represented by this ChangeInfo.
 java.lang.Object getNewValue()
          Returns the new value as an Object.
 java.lang.Boolean getNewValueAsBoolean()
          Returns the new value as a boolean.
 double getNewValueAsDouble()
          Returns the new value as a double.
 float getNewValueAsFloat()
          Returns the new value as a float.
 HashStructure getNewValueAsHashStructure()
          Returns the new value as a HashStructure.
 int getNewValueAsInt()
          Returns the new value as an int.
 ListStructure getNewValueAsListStructure()
          Returns the new value as a ListStructure.
 long getNewValueAsLong()
          Returns the new value as a long.
 java.lang.String getNewValueAsString()
          Returns the new value as a String.
 java.net.URL getNewValueAsURL()
          Returns the new value as an URL.
 java.lang.Object getOldValue()
          Returns the old value as an object.
 java.lang.Boolean getOldValueAsBoolean()
          Returns the old value as a boolean.
 double getOldValueAsDouble()
          Returns the old value as a double.
 float getOldValueAsFloat()
          Returns the old value as a float.
 HashStructure getOldValueAsHashStructure()
          Returns the old value as a HashStructure.
 int getOldValueAsInt()
          Returns the old value as an int.
 ListStructure getOldValueAsListStructure()
          Returns the old value as a ListStructure.
 long getOldValueAsLong()
          Returns the old value as a long.
 java.lang.String getOldValueAsString()
          Returns the old value as a String.
 java.net.URL getOldValueAsURL()
          Returns the old value as an URL.
 HashStructure getParentAsHashStructure()
          Returns the parent as a HashStructure.
 ListStructure getParentAsListStructure()
          Returns the parent as a ListStructure.
 int getParentStructureType()
          Returns the type of parent structure on which this ChangeInfo applies.
 java.lang.String getPropertyLocalName()
          Returns the short, unqualified name of the property for which this ChangeInfo applies.
 java.lang.String getPropertyName()
          Returns the fully qualified (slash-delimited) name of the property for which this ChangeInfo applies.
 boolean isEventForList(java.lang.String listStructureName)
          Convenience method for determining whether this ChangeInfo represents a change event that occurred within a ListStructure with the specified fully-qualified listStructureName.
 java.lang.String toString()
          Converts the ChangeInfo into a string that can be used for debugging or logging change events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE_MODIFIED

public static final int VALUE_MODIFIED
Change type returned from getChangeType() indicating that a persistent value was modified.

See Also:
Constant Field Values

VALUE_ADDED

public static final int VALUE_ADDED
Change type returned from getChangeType() indicating that a persistent value was added.

See Also:
Constant Field Values

PLACEHOLDER_VALUE_ADDED

public static final int PLACEHOLDER_VALUE_ADDED
Change type returned from getChangeType() indicating that a placeholder value was added.

See Also:
Constant Field Values

VALUE_REMOVED

public static final int VALUE_REMOVED
Change type returned from getChangeType() indicating that a value was removed. The removed value may have been persistent or placeholder.

See Also:
Constant Field Values

HASH_STRUCTURE

public static final int HASH_STRUCTURE
Structure type returned from getParentStructureType() indicating that the parent structure was a HashStructure.

See Also:
Constant Field Values

LIST_STRUCTURE

public static final int LIST_STRUCTURE
Structure type returned from getParentStructureType() indicating that the parent structure was a ListStructure.

See Also:
Constant Field Values

UNKNOWN_STRUCTURE

public static final int UNKNOWN_STRUCTURE
Structure type returned from getParentStructureType() indicating that the parent structure was an unknown structure. This probably reflects an internal error of some kind.

See Also:
Constant Field Values
Method Detail

getChangeType

public int getChangeType()
Returns the type of change represented by this ChangeInfo. Possible return values are VALUE_MODIFIED, VALUE_ADDED, PLACEHOLDER_VALUE_ADDED, and VALUE_REMOVED.


getParentStructureType

public int getParentStructureType()
Returns the type of parent structure on which this ChangeInfo applies. Possible return values are HASH_STRUCTURE or LIST_STRUCTURE.


getPropertyName

public java.lang.String getPropertyName()
Returns the fully qualified (slash-delimited) name of the property for which this ChangeInfo applies. If the property involves an item within a ListStructure, the property name will include a numerical index to indicate which item in the ListStructure was changed.


getPropertyLocalName

public java.lang.String getPropertyLocalName()
Returns the short, unqualified name of the property for which this ChangeInfo applies. For example, if getPropertyName() returns "foo/bar/someFlag", getPropertyLocalName will return "someFlag".


isEventForList

public boolean isEventForList(java.lang.String listStructureName)
Convenience method for determining whether this ChangeInfo represents a change event that occurred within a ListStructure with the specified fully-qualified listStructureName. Returns true if this ChangeInfo occurred within the specified list; false otherwise.


getParentAsHashStructure

public HashStructure getParentAsHashStructure()
Returns the parent as a HashStructure. Returns null if the parent is not a HashStructure.


getParentAsListStructure

public ListStructure getParentAsListStructure()
Returns the parent as a ListStructure. Returns null if the parent is not a ListStructure.


getOldValue

public java.lang.Object getOldValue()
Returns the old value as an object.

Returns:
Since:
11.0

getOldValueAsBoolean

public java.lang.Boolean getOldValueAsBoolean()
Returns the old value as a boolean.

Returns:
Since:
11.0

getOldValueAsString

public java.lang.String getOldValueAsString()
Returns the old value as a String.


getOldValueAsInt

public int getOldValueAsInt()
Returns the old value as an int.

Throws:
java.lang.NumberFormatException - if the value cannot be converted to an int.

getOldValueAsLong

public long getOldValueAsLong()
Returns the old value as a long.

Throws:
java.lang.NumberFormatException - if the value cannot be converted to a long.

getOldValueAsFloat

public float getOldValueAsFloat()
Returns the old value as a float.

Throws:
java.lang.NumberFormatException - if the value cannot be converted to a float.

getOldValueAsDouble

public double getOldValueAsDouble()
Returns the old value as a double.

Throws:
java.lang.NumberFormatException - if the value cannot be converted to a double.

getOldValueAsURL

public java.net.URL getOldValueAsURL()
Returns the old value as an URL. Returns null if the old value is not an URL.


getOldValueAsHashStructure

public HashStructure getOldValueAsHashStructure()
Returns the old value as a HashStructure. Returns null if the old value is not a HashStructure.


getOldValueAsListStructure

public ListStructure getOldValueAsListStructure()
Returns the old value as a ListStructure. Returns null if the old value is not a ListStructure.


getNewValueAsString

public java.lang.String getNewValueAsString()
Returns the new value as a String.


getNewValue

public java.lang.Object getNewValue()
Returns the new value as an Object.


getNewValueAsInt

public int getNewValueAsInt()
Returns the new value as an int.

Throws:
java.lang.NumberFormatException - if the value cannot be converted to an int.

getNewValueAsLong

public long getNewValueAsLong()
Returns the new value as a long.

Throws:
java.lang.NumberFormatException - if the value cannot be converted to a long.

getNewValueAsFloat

public float getNewValueAsFloat()
Returns the new value as a float.

Throws:
java.lang.NumberFormatException - if the value cannot be converted to a float.

getNewValueAsDouble

public double getNewValueAsDouble()
Returns the new value as a double.

Throws:
java.lang.NumberFormatException - if the value cannot be converted to a double.

getNewValueAsBoolean

public java.lang.Boolean getNewValueAsBoolean()
Returns the new value as a boolean.

Returns:
Since:
11.0

getNewValueAsURL

public java.net.URL getNewValueAsURL()
Returns the new value as an URL. Returns null if the old value is not an URL.


getNewValueAsHashStructure

public HashStructure getNewValueAsHashStructure()
Returns the new value as a HashStructure. Returns null if the new value is not a HashStructure.


getNewValueAsListStructure

public ListStructure getNewValueAsListStructure()
Returns the new value as a ListStructure. Returns null if the new value is not a ListStructure.


toString

public java.lang.String toString()
Converts the ChangeInfo into a string that can be used for debugging or logging change events.

Overrides:
toString in class java.lang.Object

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.6.0)

E13403-07

Copyright © 1997, 2011, Oracle. All rights reserved.