Class OracleBatchCollector
- java.lang.Object
-
- de.hybris.platform.directpersistence.impl.DefaultBatchCollector
-
- de.hybris.platform.directpersistence.impl.OracleBatchCollector
-
- All Implemented Interfaces:
BatchCollector
public class OracleBatchCollector extends DefaultBatchCollector
According to the Oracle documentation the result is not returned for batch updates see http://docs.oracle.com/cd/B19306_01/java.102/b14355/oraperf.htm#i1057545 "For a prepared statement batch, it is not possible to know the number of rows affected in the database by each individual statement in the batch. Therefore, all array elements have a value of -2." Using an Oracle batch there is a total returned but no result for individual statements. This class implements a hybrid solution. Statements with optimistic locking are executed in the preprocess phase using native oracle.jdbc.OraclePreparedStatements. All other statements are executed regularly by delegating toDefaultBatchCollector.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.platform.directpersistence.BatchCollector
BatchCollector.ResultCheck
-
-
Constructor Summary
Constructors Constructor Description OracleBatchCollector(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, int batchSize, boolean optimisticLockEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,BatchGroup>preProcess(java.util.Map<java.lang.String,BatchGroup> batchGroups)Allows to do any pre-process phase before batch groups will be processed.-
Methods inherited from class de.hybris.platform.directpersistence.impl.DefaultBatchCollector
batchUpdate, collectQuery, collectQuery, collectQuery, collectQuery, getBatchGroups
-
-
-
-
Method Detail
-
preProcess
protected java.util.Map<java.lang.String,BatchGroup> preProcess(java.util.Map<java.lang.String,BatchGroup> batchGroups)
Description copied from class:DefaultBatchCollectorAllows to do any pre-process phase before batch groups will be processed. Default implementation does not pre-process batch groups.- Overrides:
preProcessin classDefaultBatchCollector
-
-