Package com.avaje.ebeaninternal.server.persist

Examples of com.avaje.ebeaninternal.server.persist.BatchedPstmtHolder


   * Return a prepared statement taking into account batch requirements.
   */
  protected PreparedStatement getPstmt(SpiTransaction t, String sql, PersistRequestBean<?> request,
      boolean genKeys) throws SQLException {

    BatchedPstmtHolder batch = t.getBatchControl().getPstmtHolder();
    PreparedStatement stmt = batch.getStmt(sql, request);

    if (stmt != null) {
      return stmt;
    }

    stmt = getPstmt(t, sql, genKeys);

    PstmtBatch pstmtBatch = request.getPstmtBatch();
    if (pstmtBatch != null) {
      pstmtBatch.setBatchSize(stmt, t.getBatchControl().getBatchSize());
    }

    BatchedPstmt bs = new BatchedPstmt(stmt, genKeys, sql, request.getPstmtBatch(), true);
    batch.addStmt(bs, request);
    return stmt;
  }
View Full Code Here

TOP

Related Classes of com.avaje.ebeaninternal.server.persist.BatchedPstmtHolder

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.