Class DataElement

java.lang.Object
com.sun.ts.tests.common.connector.whitebox.DataElement

public class DataElement extends Object
A DataElement in the Enterprise Information System(TSeis).
Version:
1.0, 06/06/02
Author:
Binod P.G
  • Constructor Details

    • DataElement

      public DataElement(String key, String data)
      If key and value is inserted, this constructor will be used to construct the DataElement object.
      Parameters:
      key - Key of the DataElement object.
      data - Value of the DataElement object.
    • DataElement

      public DataElement(String key)
      If only key is inserted, this constructor will be used to construct the DataElement object.
      Parameters:
      key - Key of the DataElement object.
  • Method Details

    • setStatus

      public void setStatus(int status)
      Sets the status of the object to the value provided.
      Parameters:
      status - Status to be set.
    • getStatus

      public int getStatus()
      Get the status of the element.
      Returns:
      Current status of the DataElement object.
    • getKey

      public String getKey()
      Get the key of the DataElement object.
    • getValue

      public String getValue()
      Get the data in the DataElement object.
    • setValue

      public void setValue(String value)
      Set the value of DataElement object.
      Parameters:
      value - Value.
    • prepare

      public void prepare(DataElement value, Xid xid)
      Prepare the value for 2PC commit.
      Parameters:
      value - Value to be prepared.
    • getPreparedValue

      public DataElement getPreparedValue()
      Get the prepared data in the DataElement object.
    • getVersion

      public int getVersion()
      Get the version of the data.
      Returns:
      version.
    • updateVersion

      public void updateVersion()
      Updates the version of the element.
    • getXid

      public Xid getXid()
      Get the xid used to do the prepare.
      Returns:
      Xid.