Class JdbcPreparedStatementFactory

java.lang.Object
org.synchronoss.cpo.core.CpoStatementFactory
org.synchronoss.cpo.jdbc.JdbcPreparedStatementFactory
All Implemented Interfaces:
CpoReleasable

public class JdbcPreparedStatementFactory extends CpoStatementFactory implements CpoReleasable
JdbcPreparedStatementFactory is the object that encapsulates the creation of the actual PreparedStatement for the JDBC driver.
Author:
david berry
  • Constructor Details

    • JdbcPreparedStatementFactory

      public JdbcPreparedStatementFactory(Connection conn, JdbcCpoAdapter jca, CpoClass criteria, CpoFunction function, T bean, Collection<CpoWhere> wheres, Collection<CpoOrderBy> orderBy, Collection<CpoNativeFunction> nativeQueries) throws CpoException
      Used to build the PreparedStatement that is used by CPO to create the actual JDBC PreparedStatement.

      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.

      Type Parameters:
      T - The cpo object being prepared to create a named logger
      Parameters:
      conn - The actual jdbc connection that will be used to create the callable statement.
      jca - The JdbcCpoAdapter that is controlling this transaction
      criteria - The object that will be used to look up the cpo metadata
      function - The CpoFunction that is being executed
      bean - The bean that is being acted upon
      wheres - A collection of where clauses to be embedded into the CpoFunction sql
      orderBy - A collection of order-by clauses to be embedded into the CpoFunction sql
      nativeQueries - Additional sql to be embedded into the CpoFunction sql that is used to create the actual JDBC PreparedStatement
      Throws:
      CpoException - if a CPO error occurs
  • Method Details

    • getPreparedStatement

      public PreparedStatement getPreparedStatement()
      Returns the jdbc prepared statement associated with this object
      Returns:
      A PreparedStatement