Examples of addBatch()


Examples of com.avaje.ebeaninternal.server.core.PstmtBatch.addBatch()

   * Add this for batch execution.
   */
  public void addBatch() throws SQLException {
    PstmtBatch pstmtBatch = persistRequest.getPstmtBatch();
    if (pstmtBatch != null) {
      pstmtBatch.addBatch(dataBind.getPstmt());
    } else {
      dataBind.getPstmt().addBatch();
    }
  }

View Full Code Here

Examples of com.exedosoft.plat.bo.DOService.addBatch()

        String[] paras = aLine.split("=");
        if (paras != null && paras.length > 1) {
          Map map = new HashMap();
          map.put("l10n_en", paras[0].toLowerCase());
          map.put("l10n_china", paras[1]);
          theService.addBatch(map);
        }
      }
      theService.endBatch();
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of java.sql.CallableStatement.addBatch()

        stat = conn.createStatement();
        stat.execute("CREATE ALIAS updatePrices FOR \"" + getClass().getName() + ".updatePrices\"");
        CallableStatement call = conn.prepareCall("{call updatePrices(?, ?)}");
        call.setString(1, "Hello");
        call.setFloat(2, 1.4f);
        call.addBatch();
        call.setString(1, "World");
        call.setFloat(2, 3.2f);
        call.addBatch();
        int[] updateCounts = call.executeBatch();
        int total = 0;
View Full Code Here

Examples of java.sql.CallableStatement.addBatch()

        call.setString(1, "Hello");
        call.setFloat(2, 1.4f);
        call.addBatch();
        call.setString(1, "World");
        call.setFloat(2, 3.2f);
        call.addBatch();
        int[] updateCounts = call.executeBatch();
        int total = 0;
        for (int t : updateCounts) {
            total += t;
        }
View Full Code Here

Examples of java.sql.CallableStatement.addBatch()

      conn = dataSource.getConnection();
      cStmt = conn.prepareCall("{call addImportFolder(?,?)};");     
      for(Folder folder : folders){
        cStmt.setInt(1,subscription.getId());
        cStmt.setInt(2,folder.getId());       
        cStmt.addBatch();       
      }     
      int result[] = cStmt.executeBatch();
      for(int i = 0; i < result.length; i++){
        if(result[i] >= 0 ){
          numUpdated++;
View Full Code Here

Examples of java.sql.CallableStatement.addBatch()

      cstmt = conn.prepareCall("call removeImportFolder(?,?)");
      int feedId = subscription.getId();   
      for(Folder folder : folders){
        cstmt.setInt(1,feedId);
        cstmt.setInt(2,folder.getId());       
        cstmt.addBatch();
      }
      int result[] = cstmt.executeBatch();
      for(int i = 0; i < result.length; i++){
        if(result[i] > 0){
          numUpdated++;         
View Full Code Here

Examples of java.sql.CallableStatement.addBatch()

      conn = dataSource.getConnection();
      stmt = conn.prepareCall("call deleteForUserById(?,?)");
      for(int id : ids){
        stmt.setInt(1,user.getId());
        stmt.setInt(2,id);
        stmt.addBatch();
      }
      stmt.executeBatch();
      return true;
    } catch (SQLException e) {
      logger.fatal(e);
View Full Code Here

Examples of java.sql.CallableStatement.addBatch()

      Timestamp tsmp = new Timestamp(timestamp.getTime());
      for(Bookmark bm : bookmarks){
        cStmt.setInt(1,folder.getId());
        cStmt.setInt(2,bm.getId());
        cStmt.setTimestamp(3,tsmp);
        cStmt.addBatch();       
      }     
      int result[] = cStmt.executeBatch();
      for(int i = 0; i < result.length; i++){
        if(result[i] >= 0 ){
          opOkay[i] = true;
View Full Code Here

Examples of java.sql.CallableStatement.addBatch()

      cstmt = conn.prepareCall("call removeBookmarkFromFolder(?,?)");
      int folderId = folder.getId();   
      for(Bookmark bm : bookmarks){
        cstmt.setInt(1,folderId);
        cstmt.setInt(2,bm.getId());       
        cstmt.addBatch();
      }
      int result[] = cstmt.executeBatch();
      for(int i = 0; i < result.length; i++){
        if(result[i] >= 0){
          opOkay[i] = true;
View Full Code Here

Examples of java.sql.CallableStatement.addBatch()

      for(Tag tag : tags){
        stmt.setInt(1,tag.getId());
        stmt.setInt(2,user.getId());
        stmt.setInt(3,link.getId());
        stmt.setInt(4,bookmark.getId());
        stmt.addBatch();
      }
      int result[] = stmt.executeBatch();
      for(int i = 0; i < result.length; i++){
        if(result[i] >= 0){
          opOkay[i] = true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.