Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.mdm.index.ops
Class TransactionLog

    java.lang.Object
      com.sun.mdm.index.ops.TransactionLog

All Implemented Interfaces:
  java.io.Externalizable, java.io.Serializable

public final class TransactionLog
extends java.lang.Object
implements java.io.Externalizable

See Also:
  Serialized Form

Field Summary
`static int` | `FUNCTION_ADD` int value indicates ADD function
`static int` | `FUNCTION_REMOVE` int value indicates REMOVE function
`static int` | `FUNCTION_UPDATE` int value indicates UPDATE function
`(package private) static long` | `serialVersionUID`
`static int` | `version`

Constructor Summary
`TransactionLog()` default constructor
`TransactionLog(java.lang.String path, int function, java.lang.Object value)` Constructor

Method Summary
`static EnterpriseObject` | `applyDelta(EnterpriseObject eo, java.lang.Object delta)` apply delta to enterprise object
`boolean` | `equals(java.lang.Object log)` Checks if another TransactionLog instance equals this instance.
`boolean` | `equals(java.lang.String path1, java.lang.String path2)` Checks if the last elements of two paths are identical.
`static TransactionLog[]` | `fromBlob(java.lang.String blob)` Retreves an array of TransactionLog(s) from a blob.
`int` | `getFunction()` Getter for mFunction attribute
`static java.util.ArrayList` | `getLogs(java.lang.String context, ObjectNode node)` Consolidates changes logs carried inside ObjectNode by its context.
`java.lang.String` | `getPath()` Getter for mPath attribute.
`java.lang.Object` | `getValue()` Getter for Value attribute
`int` | `hashCode()` Hash code.
`void` | `readExternal(java.io.ObjectInput in)`
`void` | `setFunction(int function)` Setter for mFunction attribute.
`void` | `setPath(java.lang.String path)` Setter for Path attribute.
`void` | `setValue(java.lang.Object value)` Setter for mValue attribute.
`static java.lang.String` | `toBlob(TransactionLog[] logs)` Serializes an array of TransactionLog(s) to a String.
`java.lang.String` | `toString()` prints Transactionlog to String for output
`void` | `writeExternal(java.io.ObjectOutput out)`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### FUNCTION_ADD

    public static final int FUNCTION_ADD

  int value indicates ADD function

  See Also:
    Constant Field Values

### FUNCTION_REMOVE

    public static final int FUNCTION_REMOVE

  int value indicates REMOVE function

  See Also:
    Constant Field Values

### FUNCTION_UPDATE

    public static final int FUNCTION_UPDATE

  int value indicates UPDATE function

  See Also:
    Constant Field Values

### serialVersionUID

    static final long serialVersionUID

See Also:
  Constant Field Values

### version

    public static final int version

See Also:
  Constant Field Values

Constructor Detail

### TransactionLog

    public TransactionLog()

  default constructor

### TransactionLog

    public TransactionLog(java.lang.String path,
                          int function,
                          java.lang.Object value)

  Constructor

  Parameters:
    `path` - String for object path.
    `function` - Type of change.
    `value` - Existing value needs to be logged.

Method Detail

### applyDelta

    public static EnterpriseObject applyDelta(EnterpriseObject eo,
                                              java.lang.Object delta)
                                       throws ObjectException,
                                              EPathException

  apply delta to enterprise object

  Parameters:
    `eo` - enterprise object
    `delta` - delta object
  Returns:
    EnterpriseObject enterprise object
  Throws:
    `ObjectException`
    `EPathException`

### equals

    public boolean equals(java.lang.Object log)

  Checks if another TransactionLog instance equals this instance.

  Parameters:
    `log` - TransactionLog object to check.
  Returns:
    boolean whether the two objects are considered same.

### equals

    public boolean equals(java.lang.String path1,
                          java.lang.String path2)

  Checks if the last elements of two paths are identical.

  Parameters:
    `path1` - First path to check.
    `path2` - Second path to check.

### fromBlob

    public static TransactionLog[] fromBlob(java.lang.String blob)
                                     throws OPSException

  Retreves an array of TransactionLog(s) from a blob.

  Parameters:
    `blob` - Blob containing TransactionLog objects.
  Returns:
    array of TransactionLog objects.
  Throws:
    `OPSException` - if an error occurred.

### getFunction

    public int getFunction()

  Getter for mFunction attribute

  Returns:
    Value for the mFunction attribute.

### getLogs

    public static java.util.ArrayList getLogs(java.lang.String context,
                                              ObjectNode node)

  Consolidates changes logs carried inside ObjectNode by its context.

  Parameters:
    `context` - The context.
    `node` - ObjectNode from which to retrieve the logs.
  Returns:
    an ArrayList of TransactionLogs found inside node parameter.

### getPath

    public java.lang.String getPath()

  Getter for mPath attribute.

  Returns:
    Value for the mPath attribute..

### getValue

    public java.lang.Object getValue()

  Getter for Value attribute

  Returns:
    Value for the mValue attribute.

### hashCode

    public int hashCode()

  Hash code.

  Returns:
    hash code.

### readExternal

    public void readExternal(java.io.ObjectInput in)
                      throws java.io.IOException,
                             java.lang.ClassNotFoundException

  Specified by:
    `readExternal` in interface `java.io.Externalizable`
  Throws:
    `java.io.IOException`
    `java.lang.ClassNotFoundException`

### setFunction

    public void setFunction(int function)

  Setter for mFunction attribute.

  Parameters:
    `function` - Value to set for the mFunction attribute.

### setPath

    public void setPath(java.lang.String path)

  Setter for Path attribute.

  Parameters:
    `path` - Value to set for the mPath attribute.

### setValue

    public void setValue(java.lang.Object value)

  Setter for mValue attribute.

  Parameters:
    `value` - Value to set for the mValue attribute.

### toBlob

    public static java.lang.String toBlob(TransactionLog[] logs)
                                   throws OPSException

  Serializes an array of TransactionLog(s) to a String.

  Parameters:
    `logs` - Array of TransactionLog objects.
  Returns:
    resulting blob string for the TransactionLog set.
  Throws:
    `OPSException` - if an error occurred.

### toString

    public java.lang.String toString()

  prints Transactionlog to String for output

  Returns:
    String

### writeExternal

    public void writeExternal(java.io.ObjectOutput out)
                       throws java.io.IOException

  Specified by:
    `writeExternal` in interface `java.io.Externalizable`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Sun Microsystems, Inc.