|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.northgateis.reality.realsql.RealServer
Marshals all data transfers for a particular database connection.
Controls locking mechanisms for multiple thread operations using the same connection.
Constructor Summary | |
RealServer(java.util.Properties config,
int traceFlags)
Create's a new Reality SQL Server connection using the parameters supplied. |
Method Summary | |
protected void |
disconnect()
Disconnects the DDATCP stream associated with this connection. |
protected RealMessage |
execute(int accessPlan)
Commands the server to start executing a previously prepared statement. |
protected RealMessage |
fetch(int accessPlan)
Retrieves ResultSet data from the server ouptput buffer after execution of an SQL statement. |
protected RealMessage |
freeStatement(int accessPlan)
Commands the server to free resources previously allocated to a prepared statement. |
protected int |
getConnectionOption(int command)
Processes the commands AutoCommit and TxnIsolation. |
protected com.northgateis.comms.dda.DDATcp |
getDDA()
Returns the DDATCP stream associated with this connection. |
protected java.lang.String |
getDriverVersion()
Get driver version |
protected RealMessage |
getInfo(int value)
Get requested information from the database server. |
protected void |
getOutputParam(int accessPlan,
RealParamData param)
Retrieves value of specified OUTPUT parameter from the server. |
protected int |
getServerVersion()
Get server version |
protected boolean |
isClosed()
Checks if the DDATCP stream associated with this connection is closed. |
protected boolean |
isCompatible(int versionArg)
Check Reality server version compatibility. |
protected boolean |
isDataAvailable()
Checks to see if there is data available to be read from the DDA connection. |
protected RealMessage |
prepare(java.lang.String sql)
|
protected RealMessage |
prepareCatalog(java.lang.String sql)
|
protected RealMessage |
prepareOld(java.lang.String sql)
Forwards an SQL statement to the server, which is then prepared for subsequent execution. |
protected RealMessage |
putData(int accessPlan,
RealParamData param)
Transfers parameter data to the server at execution time. |
protected RealMessage |
rowCount(int accessPlan)
Get the number of rows affected by the DML commands UPDATE, INSERT or DELETE, or the number of columns affected by the DDL command CREATE TABLE. |
protected void |
setConnectionOption(int command,
int option)
Processes the commands AutoCommit and TxnIsolation. |
protected void |
setServerLog(java.util.Properties config)
Checks the driver properties to see if host logging should be set. |
protected void |
transact(int command)
Processes the transaction commands COMMIT or ROLLBACK. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RealServer(java.util.Properties config, int traceFlags) throws RealSQLException
All database access is controlled by the methods in this class.
config
- driver properties.host
- Reality network hostname.port
- network port number.dbase
- Reality database name.user
- user name on remote database.account
- Reality Account name.logLevel
- log level for debugging.Method Detail |
protected void setServerLog(java.util.Properties config) throws RealSQLException
hostOption: 0 = no host logging 1 = log input. 2 = log output. 3 = log input and output. hostItemName: sets the Reality host file itemname.
config
- properties object containing logging options.protected void disconnect()
protected boolean isClosed()
protected com.northgateis.comms.dda.DDATcp getDDA()
protected RealMessage prepareOld(java.lang.String sql) throws RealSQLException
sql
- SQL statement to be prepared.protected RealMessage prepare(java.lang.String sql) throws RealSQLException
protected RealMessage prepareCatalog(java.lang.String sql) throws RealSQLException
protected RealMessage freeStatement(int accessPlan) throws RealSQLException
accessPlan
- corresponds to a prepared statement AccessPlan on
the server.protected RealMessage execute(int accessPlan) throws RealSQLException
accessPlan
- corresponds to a prepared statement AccessPlan on
the server.protected RealMessage fetch(int accessPlan) throws RealSQLException
protected RealMessage rowCount(int accessPlan) throws RealSQLException
accessPlan
- corresponds to a prepared statement AccessPlan on
the server.protected void transact(int command) throws RealSQLException
command
- COMMIT | ROLLBACK.protected void setConnectionOption(int command, int option) throws RealSQLException
Command: AUTOCOMMIT Options: AUTOCOMMITT_OFF | AUTOCOMMITT_ON Command: TXN_ISOLATION: Options: READ_UNCOMMITTED | READ_COMMITTED | REPEATABLE_READ
command
- AUTOCOMMIT | TXN_ISOLATION.option
- see command options above.protected int getConnectionOption(int command) throws RealSQLException
Command: AUTOCOMMIT Options: AUTOCOMMITT_OFF | AUTOCOMMITT_ON Command: TXN_ISOLATION: Options: READ_UNCOMMITTED | READ_COMMITTED | REPEATABLE_READ
command
- AUTOCOMMIT | TXN_ISOLATION.option
- see command options above.protected RealMessage getInfo(int value) throws RealSQLException
value,
- key for SQLINFOprotected RealMessage putData(int accessPlan, RealParamData param) throws RealSQLException
accessPlan
- corresponds to a prepared statement AccessPlan on
the server.param
- object contains parameter information for specific
parameter value.protected void getOutputParam(int accessPlan, RealParamData param) throws RealSQLException
accessPlan
- corresponds to a prepared statement AccessPlan on the
server.param
- parameter object to be updated.protected boolean isDataAvailable() throws RealSQLException
protected java.lang.String getDriverVersion()
protected int getServerVersion()
protected boolean isCompatible(int versionArg)
versionArg
- Reality server version number.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |