com.tivoli.twg.engine
Class TWGDbReply

java.lang.Object
  extended bycom.tivoli.twg.engine.TWGDbReply
All Implemented Interfaces:
java.io.Serializable

public class TWGDbReply
extends java.lang.Object
implements java.io.Serializable

A TWGDbReply instance is sent as output parameter 0 in the response to a database store rows command. It contains information about the number of rows and commands processed.

See Also:
Serialized Form

Constructor Summary
TWGDbReply()
          Constructor for the reply
TWGDbReply(byte[] buf)
          This method is public as an implementation side effect.
TWGDbReply(int changes, int commands)
          This method is public as an implementation side effect.
 
Method Summary
 int getCommandsProcessed()
          Get number of commands successfully processed.
protected  int getIntelByteBufferSize()
          This method is protected as an implementation side effect.
 int getRowsChanged()
          Get number of rows that were changed in the database
 void setCommandsProcessed(int commands)
          This method is public as an implementation side effect.
 void setIntelByteBufferParms(Command cmd)
          This method is public as an implementation side effect.
 void setRowsChanged(int changes)
          This method is public as an implementation side effect.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWGDbReply

public TWGDbReply(int changes,
                  int commands)
This method is public as an implementation side effect. Do not call or change. Its interface may be changed in a later release.

Constructor for the reply

Parameters:
changes - - number of database rows changed
commands - - number of database commands successfully processed.

TWGDbReply

public TWGDbReply()
Constructor for the reply


TWGDbReply

public TWGDbReply(byte[] buf)
           throws TWGDbException
This method is public as an implementation side effect. Do not call or change. Its interface may be changed in a later release.

Constructor for the building the row from an IntelByteBuffer format of the command

Parameters:
buf - - the reply in IntelByteBufferFormat
Throws:
- - TWGDbException thrown for parameter or version errors
TWGDbException
Method Detail

setRowsChanged

public void setRowsChanged(int changes)
This method is public as an implementation side effect. Do not call or change. Its interface may be changed in a later release. Set number of rows that were changed in the database

Parameters:
changes - - number of database rows changed

setCommandsProcessed

public void setCommandsProcessed(int commands)
This method is public as an implementation side effect. Do not call or change. Its interface may be changed in a later release. Set number of commands successfully processed

Parameters:
commands - - number of commands completed successfully.

getCommandsProcessed

public int getCommandsProcessed()
Get number of commands successfully processed. If the database updates were issued as a transaction, this value will be zero if any update fails. If the updates were not issued as a transaction, this value will contain the number of the last successful command. Once one update fails, no further row updates are issued.


getRowsChanged

public int getRowsChanged()
Get number of rows that were changed in the database


setIntelByteBufferParms

public void setIntelByteBufferParms(Command cmd)
This method is public as an implementation side effect. Do not call or change. Its interface may be changed in a later release. Build IntelByteBuffer parms version of this command and add them to the IPC command

Parameters:
cmd - - the IPC command whose input parameters will be set by this method
Throws:
- - TWGDbException thrown for parameter or version errors

getIntelByteBufferSize

protected int getIntelByteBufferSize()
This method is protected as an implementation side effect. Do not call or change. Its interface may be changed in a later release. Determines the IntelByteBuffer size for this object

Returns:
- size of buffer needed