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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? sqlmapexecutordelegate.java

?? 本套系統(tǒng)采用了業(yè)界當(dāng)前最為流行的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;
  }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品1区2区3区在线观看| 国产精品99久久久| 国产午夜精品久久久久久免费视| 91黄色免费观看| 国产美女精品在线| 日韩av中文字幕一区二区三区| 中文字幕中文字幕在线一区 | 久久精品亚洲精品国产欧美| 欧美亚一区二区| 成人一级黄色片| 精品亚洲国产成人av制服丝袜 | 国产精品无人区| 日韩精品专区在线| 欧美亚洲综合久久| 99国产精品99久久久久久| 激情另类小说区图片区视频区| 亚洲精品伦理在线| 亚洲欧洲精品一区二区三区| 亚洲精品一区二区三区四区高清| 欧美视频完全免费看| 91玉足脚交白嫩脚丫在线播放| 国产乱人伦偷精品视频不卡 | 91免费看`日韩一区二区| 国内精品伊人久久久久av一坑| 日日夜夜一区二区| 亚洲va欧美va人人爽| 亚洲精品国产a| 亚洲欧洲美洲综合色网| 国产精品私人影院| 国产精品私人影院| 国产精品美女久久久久久2018| 337p日本欧洲亚洲大胆色噜噜| 欧美一区二区女人| 在线电影院国产精品| 精品1区2区3区| 91成人免费网站| 一本大道久久精品懂色aⅴ| 日韩免费观看高清完整版在线观看| 欧美性xxxxx极品少妇| 欧美一a一片一级一片| 欧美午夜精品免费| 欧美性淫爽ww久久久久无| 欧洲av一区二区嗯嗯嗯啊| 在线亚洲高清视频| 欧美三级电影网| 欧美剧情片在线观看| 欧美精品第1页| 欧美一卡二卡三卡四卡| 精品国产人成亚洲区| 久久综合五月天婷婷伊人| 久久影院电视剧免费观看| 日本一区二区三区电影| 日韩毛片精品高清免费| 亚洲一区在线电影| 日韩av电影免费观看高清完整版在线观看| 亚洲大片免费看| 麻豆精品蜜桃视频网站| 国产一区二区三区久久久| 国产.精品.日韩.另类.中文.在线.播放| 国产成人aaa| 91免费小视频| 欧美日本在线播放| 久久精品在线观看| 亚洲欧美日韩国产综合在线| 亚洲一区精品在线| 美女视频免费一区| 从欧美一区二区三区| www.亚洲色图.com| 欧美精品粉嫩高潮一区二区| 久久婷婷国产综合精品青草| 亚洲人成精品久久久久| 亚洲6080在线| 国产一区 二区| 欧美在线一二三四区| 日韩美女视频在线| 亚洲人成精品久久久久| 蜜臀av性久久久久蜜臀av麻豆| 国产成a人无v码亚洲福利| 色婷婷av一区二区三区软件| 日韩一区二区免费在线观看| 中文子幕无线码一区tr| 亚洲高清三级视频| 国产馆精品极品| 欧美日韩免费在线视频| 国产日产欧产精品推荐色| 亚洲最大成人综合| 国产麻豆精品一区二区| 欧美在线视频你懂得| 久久久五月婷婷| 午夜欧美电影在线观看| 国产ts人妖一区二区| 欧美日韩日日骚| 亚洲欧洲精品一区二区三区| 精品一区二区免费在线观看| 色综合久久综合中文综合网| 精品国产百合女同互慰| 亚洲自拍偷拍综合| 懂色av一区二区三区蜜臀| 欧美一区在线视频| 亚洲黄色小说网站| 国产成人午夜视频| 在线综合视频播放| 亚洲精品v日韩精品| 国产成人在线免费观看| 制服丝袜在线91| 亚洲国产成人午夜在线一区 | 99久久精品99国产精品 | 国产精品拍天天在线| 日韩高清一区在线| 在线观看日韩精品| 国产精品色呦呦| 国产精品自拍毛片| 精品国产三级a在线观看| 偷窥少妇高潮呻吟av久久免费| 99视频精品全部免费在线| 久久综合久久综合久久综合| 日本在线观看不卡视频| 欧美色图激情小说| 玉米视频成人免费看| 成人动漫在线一区| 久久久91精品国产一区二区精品| 免费一区二区视频| 欧美美女黄视频| 亚洲福利视频一区| 91豆麻精品91久久久久久| 亚洲三级在线播放| 97精品国产97久久久久久久久久久久| 国产午夜精品福利| 国产不卡一区视频| 亚洲国产电影在线观看| 福利视频网站一区二区三区| 久久综合九色综合欧美亚洲| 久久精品72免费观看| 日韩欧美在线不卡| 精品一区二区在线看| 日韩精品一区二区三区四区视频| 日韩成人免费在线| 91精品综合久久久久久| 日产欧产美韩系列久久99| 在线播放日韩导航| 日本欧美在线观看| 日韩免费观看高清完整版| 久久99精品久久久久久| 精品久久久久久久人人人人传媒 | 欧美三级一区二区| 三级亚洲高清视频| 欧美一二三区精品| 国产一区二区三区美女| 国产精品国产馆在线真实露脸| 99久久99久久精品免费观看| 夜夜亚洲天天久久| 欧美高清视频在线高清观看mv色露露十八| 五月天国产精品| 精品对白一区国产伦| 成人午夜激情片| 亚洲一区中文日韩| 日韩午夜av一区| 国产1区2区3区精品美女| 亚洲精品免费视频| 欧美一二区视频| 成人av免费网站| 亚洲韩国精品一区| 精品国产乱码久久久久久免费| 国产精品538一区二区在线| 亚洲乱码国产乱码精品精98午夜| 欧美色图在线观看| 裸体一区二区三区| 26uuu国产日韩综合| 色哟哟国产精品免费观看| 亚洲激情在线播放| 精品亚洲成a人| 亚洲色图视频免费播放| 欧美综合在线视频| 日韩国产精品久久久久久亚洲| 国产欧美精品在线观看| 91视频www| 亚洲成人av一区二区三区| 欧美精品一区二区三| 波多野结衣在线一区| 亚洲制服丝袜一区| 日韩欧美在线网站| 91老师片黄在线观看| 一卡二卡欧美日韩| 99久久精品免费看| 午夜精品久久一牛影视| 26uuuu精品一区二区| av激情综合网| 日韩成人一区二区三区在线观看| 精品国产91乱码一区二区三区| 精品影院一区二区久久久| 亚洲精品国产a| 久久综合久久99| 色噜噜狠狠成人网p站| 国产乱人伦偷精品视频免下载| 亚洲免费资源在线播放| 日韩午夜三级在线| 成人一区二区在线观看| 日韩电影在线免费观看| 中文字幕日韩一区| 精品福利视频一区二区三区|