Package org.synchronoss.cpo.jdbc
Class JdbcCallableStatementFactory
java.lang.Object
org.synchronoss.cpo.jdbc.JdbcCallableStatementFactory
- All Implemented Interfaces:
CpoReleasable
JdbcCallableStatementFactory is the object that encapsulates the creation of the actual
CallableStatement for the JDBC driver.
- Author:
- david berry
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcCallableStatementFactory(Connection conn, JdbcCpoAdapter jca, CpoFunction function, Object criteria, CpoClass resultClass) Used to build the CallableStatement that is used by CPO to create the actual JDBC CallableStatement. -
Method Summary
Modifier and TypeMethodDescriptionvoidAddReleasable(CpoReleasable releasable) Adds a releasable object to this object.returns the jdbc callable statment associated with this objectreturns the Out parameters from the callable statementvoidrelease()Called by the CPO framework.
-
Constructor Details
-
JdbcCallableStatementFactory
public JdbcCallableStatementFactory(Connection conn, JdbcCpoAdapter jca, CpoFunction function, Object criteria, CpoClass resultClass) throws CpoException Used to build the CallableStatement that is used by CPO to create the actual JDBC CallableStatement. The constructor is called by the internal CPO framework. This is not to be used by users of CPO. Programmers that build Transforms may need to use this object to get access to the actual connection.- Parameters:
conn- The actual jdbc connection that will be used to create the callable statement.jca- The JdbcCpoAdapter that is controlling this transactionfunction- The CpoFunction that is being executedcriteria- The bean that is being acted uponresultClass- An instance of the result class- Throws:
CpoException- if a CPO error occurs
-
-
Method Details
-
getCallableStatement
returns the jdbc callable statment associated with this object- Returns:
- The CallableStatement
-
getOutArguments
returns the Out parameters from the callable statement- Returns:
- The out arguments from the Callable Statement
-
AddReleasable
Adds a releasable object to this object. The release method on the releasable will be called when the callableStatement is executed.- Parameters:
releasable- - A CpoReleasable object. An Object whose lifetime is associated with the lifetime of the Callable statement
-
release
Called by the CPO framework. This method calls thereleaseon all the CpoReleasable associated with this object- Specified by:
releasein interfaceCpoReleasable- Throws:
CpoException- An exception occurred
-