Class DefaultBatchCollector

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void batchUpdate​(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
      Executes batch update using all collected batch groups.
      void collectQuery​(java.lang.String sql, java.lang.Object... params)
      Collects query with parameters for further batch execution.
      void collectQuery​(java.lang.String sql, java.lang.Object[] params, BatchCollector.ResultCheck resultCheck)
      Collects query with parameters for further batch execution.
      void collectQuery​(java.lang.String sql, org.springframework.jdbc.core.PreparedStatementSetter statementSetter)
      Collects query with statement setter for further batch execution.
      void collectQuery​(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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultBatchCollector

        public DefaultBatchCollector()
    • Method Detail

      • collectQuery

        public void collectQuery​(java.lang.String sql,
                                 java.lang.Object... params)
        Description copied from interface: BatchCollector
        Collects query with parameters for further batch execution.
        Specified by:
        collectQuery in interface BatchCollector
        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: BatchCollector
        Collects query with parameters for further batch execution.
        Specified by:
        collectQuery in interface BatchCollector
        Parameters:
        sql - defining PreparedStatement that will be reused.
        params - arguments for the query
        resultCheck - the result check object
      • collectQuery

        public void collectQuery​(java.lang.String sql,
                                 org.springframework.jdbc.core.PreparedStatementSetter statementSetter)
        Description copied from interface: BatchCollector
        Collects query with statement setter for further batch execution.
        Specified by:
        collectQuery in interface BatchCollector
        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: BatchCollector
        Collect query.
        Specified by:
        collectQuery in interface BatchCollector
        Parameters:
        sql - defining PreparedStatement that will be reused.
        statementSetter - object to set parameters on the PreparedStatement created by this method
        resultCheck - 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: BatchCollector
        Executes batch update using all collected batch groups.
        Specified by:
        batchUpdate in interface BatchCollector
      • 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.