亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sqlmapexecutordelegate.java

?? 本套系統采用了業界當前最為流行的beanAction組件
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
    }
    return generatedKey;
  }

  /**
   * Execute an update statement
   *
   * @param session - the session scope
   * @param id      - the statement ID
   * @param param   - the parameter object
   * @return - the number of rows updated
   * @throws SQLException - if the update fails
   */
  public int update(SessionScope session, String id, Object param) throws SQLException {
    int rows = 0;

    MappedStatement ms = getMappedStatement(id);
    Transaction trans = getTransaction(session);
    boolean autoStart = trans == null;

    try {
      trans = autoStartTransaction(session, autoStart, trans);

      RequestScope request = popRequest(session, ms);
      try {
        rows = ms.executeUpdate(request, trans, param);
      } finally {
        pushRequest(request);
      }

      autoCommitTransaction(session, autoStart);
    } finally {
      autoEndTransaction(session, autoStart);
    }

    return rows;
  }

  /**
   * Execute a delete statement
   *
   * @param session - the session scope
   * @param id      - the statement ID
   * @param param   - the parameter object
   * @return - the number of rows deleted
   * @throws SQLException - if the delete fails
   */
  public int delete(SessionScope session, String id, Object param) throws SQLException {
    return update(session, id, param);
  }

  /**
   * Execute a select for a single object
   *
   * @param session     - the session scope
   * @param id          - the statement ID
   * @param paramObject - the parameter object
   * @return - the result of the query
   * @throws SQLException - if the query fails
   */
  public Object queryForObject(SessionScope session, String id, Object paramObject) throws SQLException {
    return queryForObject(session, id, paramObject, null);
  }

  /**
   * Execute a select for a single object
   *
   * @param session      - the session scope
   * @param id           - the statement ID
   * @param paramObject  - the parameter object
   * @param resultObject - the result object (if not supplied or null, a new object will be created)
   * @return - the result of the query
   * @throws SQLException - if the query fails
   */
  public Object queryForObject(SessionScope session, String id, Object paramObject, Object resultObject) throws SQLException {
    Object object = null;

    MappedStatement ms = getMappedStatement(id);
    Transaction trans = getTransaction(session);
    boolean autoStart = trans == null;

    try {
      trans = autoStartTransaction(session, autoStart, trans);

      RequestScope request = popRequest(session, ms);
      try {
        object = ms.executeQueryForObject(request, trans, paramObject, resultObject);
      } finally {
        pushRequest(request);
      }

      autoCommitTransaction(session, autoStart);
    } finally {
      autoEndTransaction(session, autoStart);
    }

    return object;
  }

  /**
   * Execute a query for a list
   *
   * @param session     - the session scope
   * @param id          - the statement ID
   * @param paramObject - the parameter object
   * @return - the data list
   * @throws SQLException - if the query fails
   */
  public List queryForList(SessionScope session, String id, Object paramObject) throws SQLException {
    return queryForList(session, id, paramObject, SqlExecutor.NO_SKIPPED_RESULTS, SqlExecutor.NO_MAXIMUM_RESULTS);
  }

  /**
   * Execute a query for a list
   *
   * @param session     - the session scope
   * @param id          - the statement ID
   * @param paramObject - the parameter object
   * @param skip        - the number of rows to skip
   * @param max         - the maximum number of rows to return
   * @return - the data list
   * @throws SQLException - if the query fails
   */
  public List queryForList(SessionScope session, String id, Object paramObject, int skip, int max) throws SQLException {
    List list = null;

    MappedStatement ms = getMappedStatement(id);
    Transaction trans = getTransaction(session);
    boolean autoStart = trans == null;

    try {
      trans = autoStartTransaction(session, autoStart, trans);

      RequestScope request = popRequest(session, ms);
      try {
        list = ms.executeQueryForList(request, trans, paramObject, skip, max);
      } finally {
        pushRequest(request);
      }

      autoCommitTransaction(session, autoStart);
    } finally {
      autoEndTransaction(session, autoStart);
    }

    return list;
  }

  /**
   * Execute a query with a row handler.
   * The row handler is called once per row in the query results.
   *
   * @param session     - the session scope
   * @param id          - the statement ID
   * @param paramObject - the parameter object
   * @param rowHandler  - the row handler
   * @throws SQLException - if the query fails
   */
  public void queryWithRowHandler(SessionScope session, String id, Object paramObject, RowHandler rowHandler) throws SQLException {

    MappedStatement ms = getMappedStatement(id);
    Transaction trans = getTransaction(session);
    boolean autoStart = trans == null;

    try {
      trans = autoStartTransaction(session, autoStart, trans);

      RequestScope request = popRequest(session, ms);
      try {
        ms.executeQueryWithRowHandler(request, trans, paramObject, rowHandler);
      } finally {
        pushRequest(request);
      }

      autoCommitTransaction(session, autoStart);
    } finally {
      autoEndTransaction(session, autoStart);
    }

  }

  /**
   * Execute a query and return a paginated list
   *
   * @param session     - the session scope
   * @param id          - the statement ID
   * @param paramObject - the parameter object
   * @param pageSize    - the page size
   * @return - the data list
   * @throws SQLException - if the query fails
   * @deprecated All paginated list features have been deprecated
   */
  public PaginatedList queryForPaginatedList(SessionScope session, String id, Object paramObject, int pageSize) throws SQLException {
    return new PaginatedDataList(session.getSqlMapExecutor(), id, paramObject, pageSize);
  }

  /**
   * Execute a query for a map.
   * The map has the table key as the key, and the results as the map data
   *
   * @param session     - the session scope
   * @param id          - the statement ID
   * @param paramObject - the parameter object
   * @param keyProp     - the key property (from the results for the map)
   * @return - the Map
   * @throws SQLException - if the query fails
   */
  public Map queryForMap(SessionScope session, String id, Object paramObject, String keyProp) throws SQLException {
    return queryForMap(session, id, paramObject, keyProp, null);
  }

  /**
   * Execute a query for a map.
   * The map has the table key as the key, and a property from the results as the map data
   *
   * @param session     - the session scope
   * @param id          - the statement ID
   * @param paramObject - the parameter object
   * @param keyProp     - the property for the map key
   * @param valueProp   - the property for the map data
   * @return - the Map
   * @throws SQLException - if the query fails
   */
  public Map queryForMap(SessionScope session, String id, Object paramObject, String keyProp, String valueProp) throws SQLException {
    Map map = new HashMap();

    List list = queryForList(session, id, paramObject);

    for (int i = 0, n = list.size(); i < n; i++) {
      Object object = list.get(i);
      Object key = PROBE.getObject(object, keyProp);
      Object value = null;
      if (valueProp == null) {
        value = object;
      } else {
        value = PROBE.getObject(object, valueProp);
      }
      map.put(key, value);
    }

    return map;
  }

  // -- Transaction Control Methods
  /**
   * Start a transaction on the session
   *
   * @param session - the session
   * @throws SQLException - if the transaction could not be started
   */
  public void startTransaction(SessionScope session) throws SQLException {
    try {
      txManager.begin(session);
    } catch (TransactionException e) {
      throw new NestedSQLException("Could not start transaction.  Cause: " + e, e);
    }
  }

  /**
   * Start a transaction on the session with the specified isolation level.
   *
   * @param session - the session
   * @throws SQLException - if the transaction could not be started
   */
  public void startTransaction(SessionScope session, int transactionIsolation) throws SQLException {
    try {
      txManager.begin(session, transactionIsolation);
    } catch (TransactionException e) {
      throw new NestedSQLException("Could not start transaction.  Cause: " + e, e);
    }
  }

  /**
   * Commit the transaction on a session
   *
   * @param session - the session
   * @throws SQLException - if the transaction could not be committed
   */
  public void commitTransaction(SessionScope session) throws SQLException {
    try {
      // Auto batch execution
      if (session.isInBatch()) {
        executeBatch(session);
      }
      sqlExecutor.cleanup(session);
      txManager.commit(session);
    } catch (TransactionException e) {
      throw new NestedSQLException("Could not commit transaction.  Cause: " + e, e);
    }
  }

  /**
   * End the transaction on a session
   *
   * @param session - the session
   * @throws SQLException - if the transaction could not be ended
   */
  public void endTransaction(SessionScope session) throws SQLException {
    try {
      try {
        sqlExecutor.cleanup(session);
      } finally {
        txManager.end(session);
      }
    } catch (TransactionException e) {
      throw new NestedSQLException("Error while ending transaction.  Cause: " + e, e);
    }
  }

  /**
   * Start a batch for a session
   *
   * @param session - the session
   */
  public void startBatch(SessionScope session) {
    session.setInBatch(true);
  }

  /**
   * Execute a batch for a session
   *
   * @param session - the session
   * @return - the number of rows impacted by the batch
   * @throws SQLException - if the batch fails
   */
  public int executeBatch(SessionScope session) throws SQLException {
    session.setInBatch(false);
    return sqlExecutor.executeBatch(session);
  }

  /**
   * Execute a batch for a session
   *
   * @param session - the session
   * @return - a List of BatchResult objects (may be null if no batch
   *  has been initiated).  There will be one BatchResult object in the
   *  list for each sub-batch executed
   * @throws SQLException if a database access error occurs, or the drive
   *   does not support batch statements
   * @throws BatchException if the driver throws BatchUpdateException
   */
  public List executeBatchDetailed(SessionScope session) throws SQLException, BatchException {
    session.setInBatch(false);
    return sqlExecutor.executeBatchDetailed(session);
  }
  
  /**
   * Use a user-provided transaction for a session
   *
   * @param session        - the session scope
   * @param userConnection - the user supplied connection
   */
  public void setUserProvidedTransaction(SessionScope session, Connection userConnection) {
    if (session.getTransactionState() == TransactionState.STATE_USER_PROVIDED) {
      session.recallTransactionState();
    }
    if (userConnection != null) {
      Connection conn = userConnection;
      session.saveTransactionState();
      session.setTransaction(new UserProvidedTransaction(conn));
      session.setTransactionState(TransactionState.STATE_USER_PROVIDED);
    } else {
      session.setTransaction(null);
      session.closePreparedStatements();
      session.reset(); // used to be pushSession, which is probably incorrect.
    }
  }
  /**
   * Get the DataSource for the session
   *
   * @return - the DataSource
   */
  public DataSource getDataSource() {
    DataSource ds = null;
    if (txManager != null) {
      ds = txManager.getDataSource();
    }
    return ds;
  }

  /**
   * Getter for the SqlExecutor
   *
   * @return the SqlExecutor
   */
  public SqlExecutor getSqlExecutor() {
    return sqlExecutor;
  }

  /**
   * Get a transaction for the session
   *
   * @param session - the session
   * @return - the transaction
   */
  public Transaction getTransaction(SessionScope session) {
    return session.getTransaction();
  }

  // -- Protected Methods

  protected void autoEndTransaction(SessionScope session, boolean autoStart) throws SQLException {
    if (autoStart) {
      session.getSqlMapTxMgr().endTransaction();
    }
  }

  protected void autoCommitTransaction(SessionScope session, boolean autoStart) throws SQLException {
    if (autoStart) {
      session.getSqlMapTxMgr().commitTransaction();
    }
  }

  protected Transaction autoStartTransaction(SessionScope session, boolean autoStart, Transaction trans) throws SQLException {
    Transaction transaction = trans;
    if (autoStart) {
      session.getSqlMapTxMgr().startTransaction();
      transaction = getTransaction(session);
    }
    return transaction;
  }

  public boolean equals(Object obj) {
    return this == obj;
  }

  public int hashCode() {
    CacheKey key = new CacheKey();
    if (txManager != null) {
      key.update(txManager);
      if (txManager.getDataSource() != null) {
        key.update(txManager.getDataSource());
      }
    }
    key.update(System.identityHashCode(this));
    return key.hashCode();
  }

  protected RequestScope popRequest(SessionScope session, MappedStatement mappedStatement) {
    RequestScope request = (RequestScope) requestPool.pop();
    session.incrementRequestStackDepth();
    request.setSession(session);
    mappedStatement.initRequest(request);
    return request;
  }

  protected void pushRequest(RequestScope request) {
    request.getSession().decrementRequestStackDepth();
    request.reset();
    requestPool.push(request);
  }

  protected SessionScope popSession() {
    return (SessionScope) sessionPool.pop();
  }

  protected void pushSession(SessionScope session) {
    session.reset();
    sessionPool.push(session);
  }

  public ResultObjectFactory getResultObjectFactory() {
    return resultObjectFactory;
  }

  public void setResultObjectFactory(ResultObjectFactory resultObjectFactory) {
    this.resultObjectFactory = resultObjectFactory;
  }

  public boolean isStatementCacheEnabled() {
    return statementCacheEnabled;
  }

  public void setStatementCacheEnabled(boolean statementCacheEnabled) {
    this.statementCacheEnabled = statementCacheEnabled;
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美激情一区二区三区全黄| 亚洲chinese男男1069| 亚洲国产视频一区| 国产在线不卡一区| 欧美在线色视频| 国产日韩三级在线| 毛片av一区二区| 在线一区二区三区四区| 国产女同互慰高潮91漫画| 日本少妇一区二区| 欧美日韩午夜影院| 亚洲精品欧美综合四区| 丁香婷婷综合五月| 精品国产91九色蝌蚪| 天天影视色香欲综合网老头| 色综合天天视频在线观看| 久久久99久久精品欧美| 日本伊人午夜精品| 欧美性感一区二区三区| 亚洲激情校园春色| 色中色一区二区| 亚洲欧美一区二区三区久本道91| 国产一区二区视频在线| 亚洲精品一区二区三区在线观看| 视频一区二区三区入口| 欧美日韩一区二区在线观看 | 国产精品午夜免费| 狠狠色狠狠色综合日日91app| 欧美一级一区二区| 日韩精品久久久久久| 制服丝袜亚洲色图| 日韩高清一区二区| 日韩午夜激情电影| 麻豆成人久久精品二区三区红 | 麻豆成人91精品二区三区| 欧美福利一区二区| 日本中文字幕不卡| 久久亚洲春色中文字幕久久久| 精品一区二区在线免费观看| 日韩欧美一区中文| 经典三级在线一区| 国产亚洲福利社区一区| 不卡免费追剧大全电视剧网站| 中文字幕av一区二区三区| 成人av电影在线观看| 亚洲精选视频在线| 欧美性猛交一区二区三区精品| 亚洲成国产人片在线观看| 欧美日韩成人高清| 精品在线一区二区三区| 久久久亚洲综合| 99久久777色| 午夜精品久久久久影视| 精品国产伦理网| 99久久综合精品| 天天av天天翘天天综合网| 精品久久久久99| 97久久超碰精品国产| 无吗不卡中文字幕| 国产欧美在线观看一区| 欧美三区免费完整视频在线观看| 美国十次了思思久久精品导航| 国产亚洲欧洲一区高清在线观看| 一本大道av一区二区在线播放| 亚洲第四色夜色| 久久亚洲精品小早川怜子| 在线观看欧美黄色| 久久91精品国产91久久小草| 亚洲欧美在线高清| 日韩欧美你懂的| 一本一本久久a久久精品综合麻豆| 日韩av一区二区三区| 欧美国产成人精品| 日韩一区二区在线播放| 99国产精品久久久| 精品在线一区二区| 亚洲国产精品精华液网站| 26uuu国产在线精品一区二区| 色综合天天视频在线观看| 国产在线日韩欧美| 亚洲bdsm女犯bdsm网站| 日本一区二区三区高清不卡| 69久久夜色精品国产69蝌蚪网| 国产91精品一区二区麻豆网站 | 91原创在线视频| 狠狠色综合播放一区二区| 午夜精品成人在线视频| 最近日韩中文字幕| 久久久久久97三级| 欧美一级片在线| 欧美熟乱第一页| 99国产精品久久久| 成人黄页毛片网站| 国产一区二区在线电影| 美女www一区二区| 婷婷一区二区三区| 亚洲精选视频在线| 亚洲人成在线播放网站岛国| 国产精品网站在线观看| 久久久久久免费| 欧美zozo另类异族| 日韩视频一区二区| 欧美成人精品福利| 日韩一区二区三区高清免费看看| 欧美色男人天堂| 欧美亚洲国产一区二区三区| 91丨porny丨国产入口| 成人综合婷婷国产精品久久蜜臀 | 美国毛片一区二区| 蜜乳av一区二区三区| 免费在线观看一区二区三区| 日韩精品国产欧美| 麻豆成人久久精品二区三区小说| 日本成人超碰在线观看| 男女男精品视频网| 精品一区二区三区视频| 九九视频精品免费| 国产老女人精品毛片久久| 国产老肥熟一区二区三区| 国产精品一区一区| 成人自拍视频在线观看| 色综合天天在线| 欧美日韩久久一区二区| 91精品国模一区二区三区| 欧美一级一级性生活免费录像| 精品国产乱码久久久久久图片| 精品国产91乱码一区二区三区 | 成人精品小蝌蚪| 色婷婷久久综合| 欧美日韩高清不卡| 日韩免费观看高清完整版在线观看| 日韩欧美国产不卡| 国产片一区二区| 亚洲人成网站精品片在线观看| 亚洲黄色av一区| 午夜日韩在线观看| 韩国在线一区二区| 91麻豆文化传媒在线观看| 欧美性xxxxx极品少妇| 欧美一区二区三区小说| 国产欧美va欧美不卡在线| 亚洲精品国产精品乱码不99| 日韩电影网1区2区| 国产成人综合视频| 欧洲一区在线观看| 欧美精品一区二区三区蜜桃| 亚洲欧洲成人自拍| 日韩电影免费在线观看网站| 国产精品一区二区三区网站| 欧美亚洲一区三区| 国产色产综合色产在线视频| 亚洲午夜精品在线| 国产精品1区二区.| 欧洲一区二区三区免费视频| xnxx国产精品| 亚洲第一电影网| 成人黄色免费短视频| 日韩一区二区三区av| 亚洲丝袜精品丝袜在线| 另类的小说在线视频另类成人小视频在线| 国产一区二区精品久久| 欧美专区日韩专区| 久久先锋影音av鲁色资源网| 亚洲福利一二三区| 丁香激情综合国产| 日韩免费视频一区二区| 亚洲狠狠爱一区二区三区| 懂色一区二区三区免费观看| 日韩一区二区三区三四区视频在线观看| 国产精品高潮呻吟| 久久精工是国产品牌吗| 欧美在线短视频| 中文字幕亚洲不卡| 国产乱对白刺激视频不卡| 欧美一区二区三区色| 一区二区三区成人在线视频| 成人avav影音| 久久久91精品国产一区二区三区| 奇米一区二区三区| 欧美视频在线观看一区| 亚洲欧美日韩中文字幕一区二区三区| 国产一区二区三区av电影 | 国产精品123| 日韩一卡二卡三卡四卡| 亚洲成人黄色影院| 91久久人澡人人添人人爽欧美| 中文一区二区完整视频在线观看| 九色porny丨国产精品| 在线综合视频播放| 丝袜美腿亚洲综合| 欧美精品v国产精品v日韩精品 | 日韩一级高清毛片| 日本不卡视频在线观看| 欧美日韩一区二区在线观看视频| 一区二区三区四区av| 欧美在线高清视频| 亚洲chinese男男1069| 欧美电影在哪看比较好| 午夜精品在线视频一区| 欧美日本一区二区|