Class DataElement
java.lang.Object
com.sun.ts.tests.common.connector.whitebox.DataElement
A DataElement in the Enterprise Information System(TSeis).
- Version:
- 1.0, 06/06/02
- Author:
- Binod P.G
- 
Constructor SummaryConstructorsConstructorDescriptionDataElement(String key) If only key is inserted, this constructor will be used to construct theDataElementobject.DataElement(String key, String data) If key and value is inserted, this constructor will be used to construct theDataElementobject.
- 
Method SummaryModifier and TypeMethodDescriptiongetKey()Get the key of theDataElementobject.Get the prepared data in theDataElementobject.intGet the status of the element.getValue()Get the data in theDataElementobject.intGet the version of the data.getXid()Get the xid used to do the prepare.voidprepare(DataElement value, Xid xid) Prepare the value for 2PC commit.voidsetStatus(int status) Sets the status of the object to the value provided.voidSet the value ofDataElementobject.voidUpdates the version of the element.
- 
Constructor Details- 
DataElementIf key and value is inserted, this constructor will be used to construct theDataElementobject.- Parameters:
- key- Key of the- DataElementobject.
- data- Value of the- DataElementobject.
 
- 
DataElementIf only key is inserted, this constructor will be used to construct theDataElementobject.- Parameters:
- key- Key of the- DataElementobject.
 
 
- 
- 
Method Details- 
setStatuspublic void setStatus(int status) Sets the status of the object to the value provided.- Parameters:
- status- Status to be set.
 
- 
getStatuspublic int getStatus()Get the status of the element.- Returns:
- Current status of the DataElementobject.
 
- 
getKeyGet the key of theDataElementobject.
- 
getValueGet the data in theDataElementobject.
- 
setValueSet the value ofDataElementobject.- Parameters:
- value- Value.
 
- 
preparePrepare the value for 2PC commit.- Parameters:
- value- Value to be prepared.
 
- 
getPreparedValueGet the prepared data in theDataElementobject.
- 
getVersionpublic int getVersion()Get the version of the data.- Returns:
- version.
 
- 
updateVersionpublic void updateVersion()Updates the version of the element.
- 
getXidGet the xid used to do the prepare.- Returns:
- Xid.
 
 
-