Package com.avaje.ebeaninternal.api

Examples of com.avaje.ebeaninternal.api.SpiSqlUpdate


    }
 
 
    private PreparedStatement bindStmt(PersistRequestUpdateSql request, boolean batchThisRequest) throws SQLException {
       
      SpiSqlUpdate updateSql = request.getUpdateSql();
      SpiTransaction t = request.getTransaction();
     
      String sql = updateSql.getSql();
     
      BindParams bindParams = updateSql.getBindParams();
       
      // process named parameters if required
      sql = BindParamsParser.parse(bindParams, sql);
       
      boolean logSql = request.isLogSql();
     
      PreparedStatement pstmt;
      if (batchThisRequest){
        pstmt = pstmtFactory.getPstmt(t, logSql, sql, request);
        if (pstmtBatch != null){
          // oracle specific JDBC setting batch size ahead of time
          int batchSize = t.getBatchSize();
          if (batchSize < 1){
            batchSize = defaultBatchSize;
          }
          pstmtBatch.setBatchSize(pstmt, batchSize);
        }
       
      } else {
          if (logSql){
              t.logSql(sql);
          }
        pstmt = pstmtFactory.getPstmt(t, sql);
      }
     
      if (updateSql.getTimeout() > 0){
        pstmt.setQueryTimeout(updateSql.getTimeout());
      }
     
        String bindLog = null;
        if (!bindParams.isEmpty()){        
          bindLog = binder.bind(bindParams, new DataBind(pstmt));
View Full Code Here

TOP

Related Classes of com.avaje.ebeaninternal.api.SpiSqlUpdate

Copyright © 2018 www.massapicom. 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.