org.synchronoss.cpo.jdbc
Class JdbcPreparedStatementFactory

java.lang.Object
  extended by org.synchronoss.cpo.CpoStatementFactory
      extended by org.synchronoss.cpo.jdbc.JdbcPreparedStatementFactory
All Implemented Interfaces:
CpoReleasible

public class JdbcPreparedStatementFactory
extends CpoStatementFactory
implements CpoReleasible

JdbcPreparedStatementFactory is the object that encapsulates the creation of the actual PreparedStatement for the JDBC driver.

Author:
david berry

Constructor Summary
JdbcPreparedStatementFactory(Connection conn, JdbcCpoAdapter jca, CpoClass criteria, CpoFunction function, T obj, Collection<CpoWhere> wheres, Collection<CpoOrderBy> orderBy, Collection<CpoNativeFunction> nativeQueries)
          Used to build the PreparedStatement that is used by CPO to create the actual JDBC PreparedStatement.
 
Method Summary
protected  Object getBindableStatement()
           
protected  CpoData getCpoData(CpoAttribute cpoAttribute, int index)
           
protected  MethodMapper getMethodMapper()
           
 PreparedStatement getPreparedStatement()
          Returns the jdbc prepared statment associated with this object
protected  int getStartingIndex()
           
protected  void setPreparedStatement(PreparedStatement ps)
           
 
Methods inherited from class org.synchronoss.cpo.CpoStatementFactory
AddReleasible, buildSql, getBindValues, getLocalLogger, release, setBindValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.synchronoss.cpo.CpoReleasible
release
 

Constructor Detail

JdbcPreparedStatementFactory

public JdbcPreparedStatementFactory(Connection conn,
                                    JdbcCpoAdapter jca,
                                    CpoClass criteria,
                                    CpoFunction function,
                                    T obj,
                                    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.

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 meta data
function - The CpoFunction that is being executed
obj - The pojo that is being acted upon
wheres - DOCUMENT ME!
orderBy - DOCUMENT ME!
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
SQLException - if a JDBC error occurs
Method Detail

getMethodMapper

protected MethodMapper getMethodMapper()
Specified by:
getMethodMapper in class CpoStatementFactory

getCpoData

protected CpoData getCpoData(CpoAttribute cpoAttribute,
                             int index)
Specified by:
getCpoData in class CpoStatementFactory

getBindableStatement

protected Object getBindableStatement()
Specified by:
getBindableStatement in class CpoStatementFactory

getStartingIndex

protected int getStartingIndex()
Specified by:
getStartingIndex in class CpoStatementFactory

getPreparedStatement

public PreparedStatement getPreparedStatement()
Returns the jdbc prepared statment associated with this object


setPreparedStatement

protected void setPreparedStatement(PreparedStatement ps)


Copyright © 2014. All Rights Reserved.