com.reuters.rc.db
Interface DbReply

All Known Implementing Classes:
AdbReply

public interface DbReply

The DB reply interface that abstracts out a clients interaction with any ADB-like server.

Author:
Jawaid Hakim, Cavit Aydin (converted to an interface)

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 object contains a valid result set.
 java.lang.String toPrettyPrintString()
          Pretty Print the reply message.
 

Method Detail

isValid

public boolean isValid()
Check if the object contains a valid result set.
Returns:
true if the object contains a valid result set. Returns false if the object does not contain a valid result set.
See Also:
getStatus()

toPrettyPrintString

public java.lang.String toPrettyPrintString()
                                     throws DbBusinessException,
                                            DbSystemException
Pretty Print the reply message.
Returns:
Pretty Printed value.

getStatus

public int getStatus()
              throws DbBusinessException,
                     DbSystemException
Get the reply status.
Returns:
Reply status. 0 indicates success. A non-zero status indicates ADB error.
See Also:
getError()

getSql

public java.lang.String getSql()
                        throws DbBusinessException,
                               DbSystemException
Get the sql that caused the error.
Returns:
Sql statement that caused the error. null is returned if there is no error.
See Also:
getStatus(), isValid(), getError()

getError

public java.lang.String getError()
                          throws DbBusinessException,
                                 DbSystemException
Get a description of the error.
Returns:
Description of error.
See Also:
getStatus(), getSql()

getClosure

public java.lang.Object getClosure()
                            throws DbBusinessException,
                                   DbSystemException
Get the closure argument.
Returns:
Closure argument. TibrvException is thrown if there is no closure.

getResultSetCount

public int getResultSetCount()
                      throws DbBusinessException,
                             DbSystemException
Get the number of result sets.
Returns:
Number of result sets.

getResultRowCount

public int getResultRowCount()
                      throws DbBusinessException,
                             DbSystemException
Get the number of rows in the first result set.
Returns:
Number of rows in the first set.
See Also:
getResultSetCount()

getResultRowCount

public int getResultRowCount(int resultSet)
                      throws DbBusinessException,
                             DbSystemException
Get the number of rows in the specified result set.
Parameters:
resultSet - Result set number starting at 1.
Returns:
Number of rows in the specified set.
See Also:
getResultSetCount()

getResultRow

public com.tibco.tibrv.TibrvMsg getResultRow(int index)
                                      throws DbBusinessException,
                                             DbSystemException
Get a row from the first result set.
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.
See Also:
TibrvMsg

getResultRow

public com.tibco.tibrv.TibrvMsg getResultRow(int resultSet,
                                             int index)
                                      throws DbBusinessException,
                                             DbSystemException
Get a row from the specified result set. Result set numbers start at 1.
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(), TibrvMsg


Copyright © 2002-2003 Reuters. All Rights Reserved.