org.apache.openjpa.jdbc.kernel
Class BatchingConstraintUpdateManager

java.lang.Object
  extended by org.apache.openjpa.jdbc.kernel.AbstractUpdateManager
      extended by org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager
          extended by org.apache.openjpa.jdbc.kernel.BatchingConstraintUpdateManager
All Implemented Interfaces:
UpdateManager, Configurable

public class BatchingConstraintUpdateManager
extends ConstraintUpdateManager

Batch update manager that writes the SQL in object-level operation order. This update manager initiates a BatchPreparedStatementManagerImpl which will utilize the JDBC addBatch() and executeBatch() APIs to batch the statements for performance improvement.

This is the default plug-in class for UpdateManager to support statement batching. You can plug-in your own statement batch implementation through the following property:

   < property name="openjpa.jdbc.UpdateManager" 
     value="org.apache.openjpa.jdbc.kernel.YourOperationOrderUpdateManager" />   
 

Author:
Teresa Kan

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.kernel.AbstractUpdateManager
AbstractUpdateManager.CustomMapping
 
Field Summary
 
Fields inherited from class org.apache.openjpa.jdbc.kernel.AbstractUpdateManager
conf, dict
 
Constructor Summary
BatchingConstraintUpdateManager()
           
 
Method Summary
protected  Collection flush(RowManager rowMgr, PreparedStatementManager psMgr, Collection exceps)
          Flush all rows of the given row manager.
protected  PreparedStatementManager newPreparedStatementManager(JDBCStore store, Connection conn)
          Return a new PreparedStatementManager.
 
Methods inherited from class org.apache.openjpa.jdbc.kernel.ConstraintUpdateManager
flush, flushGraph, newDepthFirstAnalysis, newRowManager, orderDirty
 
Methods inherited from class org.apache.openjpa.jdbc.kernel.AbstractUpdateManager
addException, delete, endConfiguration, flush, insert, populateRowManager, setConfiguration, startConfiguration, update, updateIndicators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchingConstraintUpdateManager

public BatchingConstraintUpdateManager()
Method Detail

newPreparedStatementManager

protected PreparedStatementManager newPreparedStatementManager(JDBCStore store,
                                                               Connection conn)
Description copied from class: AbstractUpdateManager
Return a new PreparedStatementManager.

Overrides:
newPreparedStatementManager in class ConstraintUpdateManager

flush

protected Collection flush(RowManager rowMgr,
                           PreparedStatementManager psMgr,
                           Collection exceps)
Description copied from class: AbstractUpdateManager
Flush all rows of the given row manager. Add exceptions to exceps (which may start as null) using AbstractUpdateManager.addException(java.util.Collection, java.lang.Exception). Return exceps.

Overrides:
flush in class ConstraintUpdateManager


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.