Class OracleBatchCollector
java.lang.Object
de.hybris.platform.directpersistence.impl.DefaultBatchCollector
de.hybris.platform.directpersistence.impl.OracleBatchCollector
- All Implemented Interfaces:
BatchCollector
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 to
DefaultBatchCollector.-
Nested Class Summary
Nested classes/interfaces inherited from interface de.hybris.platform.directpersistence.BatchCollector
BatchCollector.ResultCheck -
Constructor Summary
ConstructorsConstructorDescriptionOracleBatchCollector(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, int batchSize, boolean optimisticLockEnabled) -
Method Summary
Modifier and TypeMethodDescriptionprotected Map<String,BatchGroup> preProcess(Map<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
-
Constructor Details
-
OracleBatchCollector
public OracleBatchCollector(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, int batchSize, boolean optimisticLockEnabled)
-
-
Method Details
-
preProcess
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
-