com.orindasoft.pub
Class DmlStatement

java.lang.Object
  extended by com.orindasoft.pub.StatementParameters2
      extended by com.orindasoft.pub.DmlStatement
All Implemented Interfaces:
OracleResourceUser
Direct Known Subclasses:
QueryStatement

public abstract class DmlStatement
extends StatementParameters2
implements OracleResourceUser

A parameterized SQL statement that continues to exist even if the connection it uses is withdrawn.

Under normal circumstances OrindaBuild users will have no reason to use this class directly - the generated code will use it.


(c) Copyright 2003 - 2012 Orinda Software Ltd

Version:
6.0
Author:
Orinda Software

Constructor Summary
DmlStatement(java.lang.String statementSqlText, LogInterface theLog)
          Create a DML Statement object.
DmlStatement(java.lang.String statementSqlText, LogInterface theLog, java.sql.Connection theConnection)
          Create a DML Statement object and give it a connection
 
Method Summary
 boolean connectionIsUsable()
          Check if our connection is usable
 void freeConnection()
          Release the current connection
 java.sql.Statement getUnderlyingStatement()
          Return underlying java.sql.Statement Object.
 boolean hasResources()
          Used to tell if the object is using Oracle resources.
 boolean releaseResources()
          Used to tell an object to release its Oracle resources.
 void setConnection(java.sql.Connection theConnection)
          Provide a connection
 
Methods inherited from class com.orindasoft.pub.StatementParameters2
bindParameters, checkBuild, checkSet, clearParameters, getParam, getParamCount, getParameters, getSignature, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setParam, setPlSqlTableArrayParam
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DmlStatement

public DmlStatement(java.lang.String statementSqlText,
                    LogInterface theLog,
                    java.sql.Connection theConnection)
Create a DML Statement object and give it a connection


DmlStatement

public DmlStatement(java.lang.String statementSqlText,
                    LogInterface theLog)
Create a DML Statement object.

Method Detail

setConnection

public void setConnection(java.sql.Connection theConnection)
Provide a connection

Parameters:
Connection - theConnection

freeConnection

public void freeConnection()
Release the current connection

The prepared Statement will be closed and nullified.


connectionIsUsable

public boolean connectionIsUsable()
Check if our connection is usable

Returns:
true if our connecion is usable

hasResources

public boolean hasResources()
Used to tell if the object is using Oracle resources.

Specified by:
hasResources in interface OracleResourceUser
Returns:
true if the object holds a resource.

releaseResources

public boolean releaseResources()
Used to tell an object to release its Oracle resources. This method never throws an exception. If releasing the resource will create problems they should be dealt with by the implementing class, not escalated to the calling class.

Specified by:
releaseResources in interface OracleResourceUser
Returns:
true if the objects held an open PreparedStatement, ResultSet or similer resource.

getUnderlyingStatement

public java.sql.Statement getUnderlyingStatement()
                                          throws CSDBException
Return underlying java.sql.Statement Object. This method exists so that users can call the various methods such as 'setQueryTimeout' that are defined in the java.sql.Statement interface. Do not use it to replace the Statement object.

Returns:
java.sql.Statement
Throws:
CSDBException - If we had to try to create the Statement before we could return it and something went wrong.
Since:
5.0.2267 Retuens Statement Object.


Copyright © Orinda Software Ltd 2012Logo