Class DefaultBatchCollector
- java.lang.Object
-
- de.hybris.platform.directpersistence.impl.DefaultBatchCollector
-
- All Implemented Interfaces:
BatchCollector
- Direct Known Subclasses:
OracleBatchCollector
public class DefaultBatchCollector extends java.lang.Object implements BatchCollector
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.platform.directpersistence.BatchCollector
BatchCollector.ResultCheck
-
-
Constructor Summary
Constructors Constructor Description DefaultBatchCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbatchUpdate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)Executes batch update using all collected batch groups.voidcollectQuery(java.lang.String sql, java.lang.Object... params)Collects query with parameters for further batch execution.voidcollectQuery(java.lang.String sql, java.lang.Object[] params, BatchCollector.ResultCheck resultCheck)Collects query with parameters for further batch execution.voidcollectQuery(java.lang.String sql, org.springframework.jdbc.core.PreparedStatementSetter statementSetter)Collects query with statement setter for further batch execution.voidcollectQuery(java.lang.String sql, org.springframework.jdbc.core.PreparedStatementSetter statementSetter, BatchCollector.ResultCheck resultCheck)Collect query.java.util.Map<java.lang.String,BatchGroup>getBatchGroups()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.
-
-
-
Method Detail
-
collectQuery
public void collectQuery(java.lang.String sql, java.lang.Object... params)Description copied from interface:BatchCollectorCollects query with parameters for further batch execution.- Specified by:
collectQueryin interfaceBatchCollector- Parameters:
sql- defining PreparedStatement that will be reused.params- arguments for the query
-
collectQuery
public void collectQuery(java.lang.String sql, java.lang.Object[] params, BatchCollector.ResultCheck resultCheck)Description copied from interface:BatchCollectorCollects query with parameters for further batch execution.- Specified by:
collectQueryin interfaceBatchCollector- Parameters:
sql- defining PreparedStatement that will be reused.params- arguments for the queryresultCheck- the result check object
-
collectQuery
public void collectQuery(java.lang.String sql, org.springframework.jdbc.core.PreparedStatementSetter statementSetter)Description copied from interface:BatchCollectorCollects query with statement setter for further batch execution.- Specified by:
collectQueryin interfaceBatchCollector- Parameters:
sql- defining PreparedStatement that will be reused.statementSetter- object to set parameters on the PreparedStatement created by this method
-
collectQuery
public void collectQuery(java.lang.String sql, org.springframework.jdbc.core.PreparedStatementSetter statementSetter, BatchCollector.ResultCheck resultCheck)Description copied from interface:BatchCollectorCollect query.- Specified by:
collectQueryin interfaceBatchCollector- Parameters:
sql- defining PreparedStatement that will be reused.statementSetter- object to set parameters on the PreparedStatement created by this methodresultCheck- the result check object
-
getBatchGroups
public java.util.Map<java.lang.String,BatchGroup> getBatchGroups()
-
batchUpdate
public void batchUpdate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
Description copied from interface:BatchCollectorExecutes batch update using all collected batch groups.- Specified by:
batchUpdatein interfaceBatchCollector
-
preProcess
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. Default implementation does not pre-process batch groups.
-
-