com.altair.hwm.database.sql.protocol
Class DBBatchSQLReplyPacket

java.lang.Object
  extended by com.altair.hwm.database.sql.protocol.DBBatchSQLReplyPacket

public class DBBatchSQLReplyPacket
extends java.lang.Object

Title: DBBatchSQLReplyPacket

Description: This class represents the reply packet sent to the server when more than one reply packets are present. This can be used to retrieve the auto id when data is inserted into a table.

Company: Altair Engineering, Inc.


Constructor Summary
DBBatchSQLReplyPacket()
          Constructor
 
Method Summary
 void AddReply(DBSQLReplyPacket dmReplyPck)
          Adds DBSQLReplyPacket in to the list of replies
 DBSQLReplyPacket GetReply(int nIndex)
          Get reply at an index.
 int GetSize()
          Get number of replies encapsulated.
 void ReadPacket(java.io.ObjectInputStream in)
          Reads this object from the input stream
 void RemoveReply(int nIndex)
          Removes a reply at an index.
 java.lang.String toString()
          Returns the string representation of this object
 void WritePacket(java.io.ObjectOutputStream out)
          Writes out this object to the output stream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DBBatchSQLReplyPacket

public DBBatchSQLReplyPacket()
Constructor

Method Detail

AddReply

public void AddReply(DBSQLReplyPacket dmReplyPck)
Adds DBSQLReplyPacket in to the list of replies

Parameters:
dmReplyPck - The reply packet to be added

GetReply

public DBSQLReplyPacket GetReply(int nIndex)
                          throws java.lang.Exception
Get reply at an index.

Returns:
DBSQLReplyPacket The SQL reply packet at the particular index
Throws:
java.lang.Exception - If the index is out of bounds

RemoveReply

public void RemoveReply(int nIndex)
                 throws java.lang.Exception
Removes a reply at an index.

Parameters:
nIndex - The index at which the req packet should be removed
Throws:
java.lang.Exception - If the index is out of bounds

GetSize

public int GetSize()
Get number of replies encapsulated.

Returns:
int The number of replies in this packet

toString

public java.lang.String toString()
Returns the string representation of this object

Overrides:
toString in class java.lang.Object

WritePacket

public void WritePacket(java.io.ObjectOutputStream out)
                 throws java.io.IOException
Writes out this object to the output stream

Parameters:
out - The output stream
Throws:
java.io.IOException

ReadPacket

public void ReadPacket(java.io.ObjectInputStream in)
                throws java.io.IOException,
                       java.lang.ClassNotFoundException
Reads this object from the input stream

Parameters:
in - The input stream
Throws:
java.io.IOException
java.lang.ClassNotFoundException