com.reuters.rc.db
Interface DbFactory

All Known Implementing Classes:
AdbFactory

public interface DbFactory

DbFactory defines all the interface methods that any Adb-like client needs to implement to supply the instances of their DbXXXXXXX interface implementations. This class is the single source for object creation. Application clients can set/get their particular choice of DbFactory implementation through the static methods of the DbManager class.

Author:
Cavit Aydin

Method Summary
 DbOpcode getDeleteOpcode()
          Get an instance of a DbOpcode object that represents a Delete operation.
 DbOpcode getInsertOpcode()
          Get an instance of a DbOpcode object that represents an Insert operation.
 DbOpcode getOpcode(int opCode)
          Get the OpCode object corresponding to an integer opcode.
 DbPubMsg getPubMsg(com.tibco.tibrv.TibrvMsg rvMsg)
          Get an instance of a PubMsg object constructed from a Tibrv message.
 DbReply getReply(com.tibco.tibrv.TibrvMsg replyMsg)
          Get an instance of a DbReply object.
 DbRequest getRequest(DbRequestStmt stmt)
          Get an instance of a DbRequest object.
 DbRequest getRequest(DbRequestStmt[] stmts)
          Get an instance of a DbRequest object.
 DbRequest getRequest(DbRequestStmt[] stmts, double timeout)
          Get an instance of a DbRequest object.
 DbRequest getRequest(DbRequestStmt[] stmts, double timeout, java.lang.Object closure)
          Get an instance of a DbRequest object.
 DbRequest getRequest(DbRequestStmt stmt, double timeout)
          Get an instance of a DbRequest object.
 DbRequest getRequest(DbRequestStmt stmt, double timeout, java.lang.Object closure)
          Get an instance of a DbRequest object.
 DbRequestBind getRequestBind(int position, java.lang.Object data)
          Get an instance of a DbRequestStmt object.
 DbRequestBind getRequestBind(int position, java.lang.String column, java.lang.Object data)
          Get an instance of a DbRequestStmt object.
 DbRequestBind getRequestBind(java.lang.String column, java.lang.Object data)
          Get an instance of a DbRequestStmt object.
 DbRequestStmt getRequestStmt(java.lang.String sql)
          Get an instance of a DbRequestStmt object.
 DbRequestStmt getRequestStmt(java.lang.String sql, DbRequestBind bind)
          Get an instance of a DbRequestStmt object
 DbRequestStmt getRequestStmt(java.lang.String sql, DbRequestBind[] binds)
          Get an instance of a DbRequestStmt object
 DbRequestStmt getRequestStmt(java.lang.String sql, DbRequestBind[] binds, int maxRows)
          Get an instance of a DbRequestStmt object
 DbRequestStmt getRequestStmt(java.lang.String sql, DbRequestBind bind, int maxRows)
          Get an instance of a DbRequestStmt object
 DbRequestStmt getRequestStmt(java.lang.String sql, int maxRows)
          Get an instance of a DbRequestStmt object.
 DbOpcode getUnknownOpcode()
          Get an instance of a DbOpcode object that represents an Unknown operation.
 DbOpcode getUpdateOpcode()
          Get an instance of a DbOpcode object that represents an Update operation.
 DbOpcode getUpsertOpcode()
          Get an instance of a DbOpcode object that represents an Upsert operation.
 

Method Detail

getRequest

public DbRequest getRequest(DbRequestStmt stmt)
Get an instance of a DbRequest object.
Parameters:
stmt - request statement
Returns:
an instance of DbRequest object
See Also:
DbRequestStmt

getRequest

public DbRequest getRequest(DbRequestStmt stmt,
                            double timeout)
Get an instance of a DbRequest object.
Parameters:
stmt - Request statement.
timeout - Maximum time interval - in seconds - for which to wait for reply in request/reply mode.
See Also:
DbRequest.sendRequest(TibrvTransport, String), DbRequest.sendRequest(String), DbRequestStmt

getRequest

public DbRequest getRequest(DbRequestStmt stmt,
                            double timeout,
                            java.lang.Object closure)
Get an instance of a DbRequest object.
Parameters:
stmt - Request statement.
timeout - Maximum time interval - in seconds - for which to wait for reply in request/reply mode.
closure - Closure argument.
See Also:
DbRequest.sendRequest(TibrvTransport, String), DbRequest.sendRequest(String), DbRequestStmt

getRequest

public DbRequest getRequest(DbRequestStmt[] stmts)
Get an instance of a DbRequest object.
Parameters:
stmts - Request statements.
See Also:
DbRequestStmt

getRequest

public DbRequest getRequest(DbRequestStmt[] stmts,
                            double timeout)
Get an instance of a DbRequest object.
Parameters:
stmts - Request statements.
timeout - Maximum time interval - in seconds - for which to wait for reply in request/reply mode.
See Also:
DbRequest.sendRequest(TibrvTransport, String), DbRequest.sendRequest(String), DbRequestStmt

getRequest

public DbRequest getRequest(DbRequestStmt[] stmts,
                            double timeout,
                            java.lang.Object closure)
Get an instance of a DbRequest object.
Parameters:
stmts - Request statements.
timeout - Maximum time interval - in seconds - for which to wait for reply in request/reply mode.
closure - Closure argument.
See Also:
DbRequest.sendRequest(TibrvTransport, String), DbRequest.sendRequest(String), DbRequestStmt

getReply

public DbReply getReply(com.tibco.tibrv.TibrvMsg replyMsg)
Get an instance of a DbReply object.
Parameters:
replyMsg - Reply message from ADB.

getRequestStmt

public DbRequestStmt getRequestStmt(java.lang.String sql)
Get an instance of a DbRequestStmt object.
Parameters:
sql - The SQL statement to execute on the ADB.

getRequestStmt

public DbRequestStmt getRequestStmt(java.lang.String sql,
                                    int maxRows)
Get an instance of a DbRequestStmt object.
Parameters:
sql - The SQL statement to execute on the ADB.
maxRows - Maximum number of result rows returned from request.

getRequestStmt

public DbRequestStmt getRequestStmt(java.lang.String sql,
                                    DbRequestBind bind)
Get an instance of a DbRequestStmt object
Parameters:
sql - The SQL statement to execute on the ADB.
bind - Bind data.
See Also:
DbRequestBind

getRequestStmt

public DbRequestStmt getRequestStmt(java.lang.String sql,
                                    DbRequestBind bind,
                                    int maxRows)
Get an instance of a DbRequestStmt object
Parameters:
sql - The SQL statement to execute on the ADB.
bind - Bind data.
maxRows - Maximum number of result rows returned from request.
See Also:
DbRequestBind

getRequestStmt

public DbRequestStmt getRequestStmt(java.lang.String sql,
                                    DbRequestBind[] binds)
Get an instance of a DbRequestStmt object
Parameters:
sql - The SQL statement to execute on the ADB.
binds - Bind data.
See Also:
DbRequestBind

getRequestStmt

public DbRequestStmt getRequestStmt(java.lang.String sql,
                                    DbRequestBind[] binds,
                                    int maxRows)
Get an instance of a DbRequestStmt object
Parameters:
sql - The SQL statement to execute on the ADB.
binds - Bind data.
maxRows - Maximum number of result rows returned from request.
See Also:
DbRequestBind

getRequestBind

public DbRequestBind getRequestBind(int position,
                                    java.lang.String column,
                                    java.lang.Object data)
Get an instance of a DbRequestStmt object.
Parameters:
position - Placeholder position.
column - Column name.
data - Column data.

getRequestBind

public DbRequestBind getRequestBind(java.lang.String column,
                                    java.lang.Object data)
Get an instance of a DbRequestStmt object.
Parameters:
column - Column name.
data - Column data.

getRequestBind

public DbRequestBind getRequestBind(int position,
                                    java.lang.Object data)
Get an instance of a DbRequestStmt object.
Parameters:
position - Placeholder position.
data - Column data.

getInsertOpcode

public DbOpcode getInsertOpcode()
Get an instance of a DbOpcode object that represents an Insert operation.
Returns:
DbOpcode instance

getDeleteOpcode

public DbOpcode getDeleteOpcode()
Get an instance of a DbOpcode object that represents a Delete operation.
Returns:
DbOpcode instance

getUpdateOpcode

public DbOpcode getUpdateOpcode()
Get an instance of a DbOpcode object that represents an Update operation.
Returns:
DbOpcode instance

getUpsertOpcode

public DbOpcode getUpsertOpcode()
Get an instance of a DbOpcode object that represents an Upsert operation.
Returns:
DbOpcode instance

getUnknownOpcode

public DbOpcode getUnknownOpcode()
Get an instance of a DbOpcode object that represents an Unknown operation.
Returns:
DbOpcode instance

getOpcode

public DbOpcode getOpcode(int opCode)
Get the OpCode object corresponding to an integer opcode. Note that the integer values here are application specific. Subclasses are free to use any values they want.
Parameters:
opCode - an application specific opcode value as an integer
Returns:
DbOpcode instance

getPubMsg

public DbPubMsg getPubMsg(com.tibco.tibrv.TibrvMsg rvMsg)
Get an instance of a PubMsg object constructed from a Tibrv message.
Parameters:
rvMsg - the rvMsg that is published
Returns:
PubMsg instance


Copyright © 2002-2003 Reuters. All Rights Reserved.