com.reuters.rc.db.adb
Class AdbReply

java.lang.Object
  |
  +--com.reuters.rc.db.adb.AdbReply
All Implemented Interfaces:
DbReply

public class AdbReply
extends java.lang.Object
implements DbReply

This class represents the reply sent by ADB in response to a request. Each response contains zero or more result sets, and each result set contains zero or more result rows.

Author:
Jawaid Hakim.
See Also:
AdbRequest

Constructor Summary
AdbReply(com.tibco.tibrv.TibrvMsg replyMsg)
          Constructor.
 
Method Summary
 java.lang.Object getClosure()
          Get the closure argument.
 java.lang.String getError()
          Get a description of the error.
 com.tibco.tibrv.TibrvMsg getResultRow(int index)
          Get a row from the first result set.
 com.tibco.tibrv.TibrvMsg getResultRow(int resultSet, int index)
          Get a row from the specified result set.
 int getResultRowCount()
          Get the number of rows in the first result set.
 int getResultRowCount(int resultSet)
          Get the number of rows in the specified result set.
 int getResultSetCount()
          Get the number of result sets.
 java.lang.String getSql()
          Get the sql that caused the error.
 int getStatus()
          Get the reply status.
 boolean isValid()
          Check if the instance contains a valid result set.
 java.lang.String toPrettyPrintString()
          Pretty Print the reply message.
 java.lang.String toString()
          Override toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdbReply

public AdbReply(com.tibco.tibrv.TibrvMsg replyMsg)
Constructor.
Parameters:
replyMsg - Reply message from ADB.
Method Detail

isValid

public final boolean isValid()
Check if the instance contains a valid result set.
Specified by:
isValid in interface DbReply
Returns:
true if the object contains a valid result set. Returns false if the instance does not contain a valid result set.
See Also:
getStatus()

toString

public java.lang.String toString()
Override toString().
Overrides:
toString in class java.lang.Object
Returns:
String representation of self.

toPrettyPrintString

public final java.lang.String toPrettyPrintString()
                                           throws AdbBusinessException,
                                                  AdbSystemException
Pretty Print the reply message.
Specified by:
toPrettyPrintString in interface DbReply
Returns:
Pretty Printed value.

getStatus

public final int getStatus()
                    throws AdbBusinessException,
                           AdbSystemException
Get the reply status.
Specified by:
getStatus in interface DbReply
Returns:
Reply status. 0 indicates success. A non-zero status indicates ADB error.
See Also:
getError()

getSql

public final java.lang.String getSql()
                              throws AdbBusinessException,
                                     AdbSystemException
Get the sql that caused the error.
Specified by:
getSql in interface DbReply
Returns:
Sql statement that caused the error. null is returned if there is no error.
See Also:
getStatus(), isValid(), getError()

getError

public final java.lang.String getError()
                                throws AdbBusinessException,
                                       AdbSystemException
Get a description of the error.
Specified by:
getError in interface DbReply
Returns:
Description of error.
See Also:
getStatus(), getSql()

getClosure

public final java.lang.Object getClosure()
                                  throws AdbBusinessException,
                                         AdbSystemException
Get the closure argument.
Specified by:
getClosure in interface DbReply
Returns:
Closure argument. TibrvException is thrown if there is no closure.

getResultSetCount

public final int getResultSetCount()
                            throws AdbBusinessException,
                                   AdbSystemException
Get the number of result sets.
Specified by:
getResultSetCount in interface DbReply
Returns:
Number of result sets.

getResultRowCount

public final int getResultRowCount()
                            throws AdbBusinessException,
                                   AdbSystemException
Get the number of rows in the first result set.
Specified by:
getResultRowCount in interface DbReply
Returns:
Number of rows in the first set.
See Also:
getResultSetCount()

getResultRowCount

public final int getResultRowCount(int resultSet)
                            throws AdbBusinessException,
                                   AdbSystemException
Get the number of rows in the specified result set.
Specified by:
getResultRowCount in interface DbReply
Parameters:
resultSet - Result set number starting at 1.
Returns:
Number of rows in the specified set.
See Also:
getResultSetCount()

getResultRow

public final com.tibco.tibrv.TibrvMsg getResultRow(int index)
                                            throws AdbBusinessException,
                                                   AdbSystemException
Get a row from the first result set.
Specified by:
getResultRow in interface DbReply
Parameters:
index - Result set row number. Row numbers start at 0.
Returns:
Requested result row from the first result set. null is returned if the requested row is not found in the first result set.

getResultRow

public final com.tibco.tibrv.TibrvMsg getResultRow(int resultSet,
                                                   int index)
                                            throws AdbBusinessException,
                                                   AdbSystemException
Get a row from the specified result set. Result set numbers start at 1.
Specified by:
getResultRow in interface DbReply
Parameters:
resultSet - Result set number. Result set numbers start at 1.
index - Result set row number. Row numbers start at 0.
Returns:
Requested result row from the first result set. null is returned if the requested row is not found in the specified result set.
See Also:
getResultSetCount()


Copyright © 2002-2003 Reuters. All Rights Reserved.