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

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

?? sessionscope.java

?? 本套系統采用了業界當前最為流行的beanAction組件
?? JAVA
字號:
/*
 *  Copyright 2004 Clinton Begin
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.ibatis.sqlmap.engine.scope;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapException;
import com.ibatis.sqlmap.client.SqlMapExecutor;
import com.ibatis.sqlmap.client.SqlMapTransactionManager;
import com.ibatis.sqlmap.engine.transaction.Transaction;
import com.ibatis.sqlmap.engine.transaction.TransactionState;
import com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate;

import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import java.util.Iterator;

/**
 * A Session based implementation of the Scope interface
 */
public class SessionScope extends BaseScope {
  private static long nextId;
  private long id;
  // Used by Any
  private SqlMapClient sqlMapClient;
  private SqlMapExecutor sqlMapExecutor;
  private SqlMapTransactionManager sqlMapTxMgr;
  private int requestStackDepth;
  // Used by TransactionManager
  private Transaction transaction;
  private TransactionState transactionState;
  // Used by SqlMapExecutorDelegate.setUserProvidedTransaction()
  private TransactionState savedTransactionState;
  // Used by StandardSqlMapClient and GeneralStatement
  private boolean inBatch;
  // Used by SqlExecutor
  private Object batch;
  private boolean commitRequired;
  private Map preparedStatements;

  /**
   * Default constructor
   */
  public SessionScope() {
    preparedStatements = new HashMap();
    reset();
  }

  /**
   * Get the SqlMapClient for the session
   *
   * @return - the SqlMapClient
   */
  public SqlMapClient getSqlMapClient() {
    return sqlMapClient;
  }

  /**
   * Set the SqlMapClient for the session
   *
   * @param sqlMapClient - the SqlMapClient
   */
  public void setSqlMapClient(SqlMapClient sqlMapClient) {
    this.sqlMapClient = sqlMapClient;
  }

  /**
   * Get the SQL executor for the session
   *
   * @return - the SQL executor
   */
  public SqlMapExecutor getSqlMapExecutor() {
    return sqlMapExecutor;
  }

  /**
   * Get the SQL executor for the session
   *
   * @param sqlMapExecutor - the SQL executor
   */
  public void setSqlMapExecutor(SqlMapExecutor sqlMapExecutor) {
    this.sqlMapExecutor = sqlMapExecutor;
  }

  /**
   * Get the transaction manager
   *
   * @return - the transaction manager
   */
  public SqlMapTransactionManager getSqlMapTxMgr() {
    return sqlMapTxMgr;
  }

  /**
   * Set the transaction manager
   *
   * @param sqlMapTxMgr - the transaction manager
   */
  public void setSqlMapTxMgr(SqlMapTransactionManager sqlMapTxMgr) {
    this.sqlMapTxMgr = sqlMapTxMgr;
  }

  /**
   * Tells us if we are in batch mode or not
   *
   * @return - true if we are working with a batch
   */
  public boolean isInBatch() {
    return inBatch;
  }

  /**
   * Turn batch mode on or off
   *
   * @param inBatch - the switch
   */
  public void setInBatch(boolean inBatch) {
    this.inBatch = inBatch;
  }

  /**
   * Getter for the session transaction
   *
   * @return - the transaction
   */
  public Transaction getTransaction() {
    return transaction;
  }

  /**
   * Setter for the session transaction
   *
   * @param transaction - the transaction
   */
  public void setTransaction(Transaction transaction) {
    this.transaction = transaction;
  }

  /**
   * Getter for the transaction state of the session
   *
   * @return - the state
   */
  public TransactionState getTransactionState() {
    return transactionState;
  }

  /**
   * Setter for the transaction state of the session
   *
   * @param transactionState - the new transaction state
   */
  public void setTransactionState(TransactionState transactionState) {
    this.transactionState = transactionState;
  }

  /**
   * Getter for the batch of the session
   *
   * @return - the batch
   */
  public Object getBatch() {
    return batch;
  }

  /**
   * Stter for the batch of the session
   *
   * @param batch the new batch
   */
  public void setBatch(Object batch) {
    this.batch = batch;
  }

  /**
   * Get the request stack depth
   *
   * @return - the stack depth
   */
  public int getRequestStackDepth() {
    return requestStackDepth;
  }

  /**
   * Increment the stack depth by one.
   */
  public void incrementRequestStackDepth() {
    requestStackDepth++;
  }

  /**
   * Decrement the stack depth by one.
   */
  public void decrementRequestStackDepth() {
    requestStackDepth--;
  }

  /**
   * Getter to tell if a commit is required for the session
   *
   * @return - true if a commit is required
   */
  public boolean isCommitRequired() {
    return commitRequired;
  }

  /**
   * Setter to tell the session that a commit is required for the session
   *
   * @param commitRequired - the flag
   */
  public void setCommitRequired(boolean commitRequired) {
    this.commitRequired = commitRequired;
  }

  public boolean hasPreparedStatementFor(String sql) {
    return preparedStatements.containsKey(sql);
  }

  public boolean hasPreparedStatement(PreparedStatement ps) {
    return preparedStatements.containsValue(ps);
  }

  public PreparedStatement getPreparedStatement(String sql) throws SQLException {
    if (!hasPreparedStatementFor(sql))
      throw new SqlMapException("Could not get prepared statement.  This is likely a bug.");
    PreparedStatement ps = (PreparedStatement) preparedStatements.get(sql);
    return ps;
  }

  public void putPreparedStatement(SqlMapExecutorDelegate delegate, String sql, PreparedStatement ps) {
    if (delegate.isStatementCacheEnabled()) {
      if (!isInBatch()) {
        if (hasPreparedStatementFor(sql))
          throw new SqlMapException("Duplicate prepared statement found.  This is likely a bug.");
        preparedStatements.put(sql, ps);
      }
    }
  }

  public void closePreparedStatements() {
    Iterator keys = preparedStatements.keySet().iterator();
    while (keys.hasNext()) {
      PreparedStatement ps = (PreparedStatement) preparedStatements.get(keys.next());
      try {
        ps.close();
      } catch (Exception e) {
        // ignore -- we don't care if this fails at this point.
      }
    }
    preparedStatements.clear();
  }

  public void reset() {
    super.reset();
    this.batch = null;
    sqlMapExecutor = null;
    sqlMapTxMgr = null;
    inBatch = false;
    transaction = null;
    transactionState = null;
    batch = null;
    requestStackDepth = 0;
    id = getNextId();
    closePreparedStatements();
    preparedStatements.clear();
  }

  public boolean equals(Object parameterObject) {
    if (this == parameterObject) return true;
    if (!(parameterObject instanceof SessionScope)) return false;
    final SessionScope sessionScope = (SessionScope) parameterObject;
    if (id != sessionScope.id) return false;
    return true;
  }

  public int hashCode() {
    return (int) (id ^ (id >>> 32));
  }

  /**
   * Method to get a unique ID
   *
   * @return - the new ID
   */
  public synchronized static long getNextId() {
    return nextId++;
  }

  /**
   * Saves the current transaction state
   */
  public void saveTransactionState() {
    savedTransactionState = transactionState;
  }

  /**
   * Restores the previously saved transaction state
   */
  public void recallTransactionState() {
    transactionState = savedTransactionState;
  }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
菠萝蜜视频在线观看一区| 国产盗摄一区二区三区| 中文字幕在线不卡国产视频| 欧美不卡在线视频| 欧美亚日韩国产aⅴ精品中极品| 福利一区在线观看| 成人h版在线观看| 国产精品66部| av欧美精品.com| gogo大胆日本视频一区| 色综合久久久久综合体桃花网| 一本色道久久综合狠狠躁的推荐| 色哟哟精品一区| 欧美亚洲日本国产| 日韩一级二级三级精品视频| 91精品国产一区二区三区香蕉| 欧美一区二视频| 国产亚洲一区二区三区四区| 国产精品久久久久一区二区三区| 亚洲视频一二区| 午夜电影网一区| 久久国产日韩欧美精品| 国产成人aaa| 在线视频国内自拍亚洲视频| 欧美片网站yy| 国产清纯白嫩初高生在线观看91| 国产精品九色蝌蚪自拍| 亚洲第一av色| 国产一区二区免费视频| 色婷婷av一区二区三区软件| 这里只有精品99re| 久久综合久久综合久久综合| 亚洲乱码国产乱码精品精可以看| 亚洲aⅴ怡春院| 成人黄动漫网站免费app| 欧美日韩一区二区不卡| 亚洲精品一区二区三区影院 | 欧美伊人久久久久久久久影院| 精品视频一区二区三区免费| 2024国产精品| 亚洲一区二区三区不卡国产欧美| 激情久久久久久久久久久久久久久久| 国产一区二区三区不卡在线观看| 91免费观看视频在线| 精品三级av在线| 亚洲主播在线播放| 成人网在线播放| www国产亚洲精品久久麻豆| 亚洲资源中文字幕| 成人毛片视频在线观看| 日韩欧美国产午夜精品| 一区二区三区四区蜜桃| 国产成人小视频| 欧美精品日韩一本| 亚洲欧美另类久久久精品2019| 九九久久精品视频| 欧美三区免费完整视频在线观看| 亚洲国产电影在线观看| 激情欧美一区二区| 日韩一区二区三区四区| 亚洲bdsm女犯bdsm网站| 欧美在线一区二区| 中文字幕一区三区| 国产精品 日产精品 欧美精品| 制服丝袜国产精品| 日本中文字幕一区二区视频| 欧美丝袜丝nylons| 亚洲综合久久av| 欧美性视频一区二区三区| **欧美大码日韩| 国产成人免费视频网站| 亚洲精品一区二区三区精华液| 秋霞av亚洲一区二区三| 69堂精品视频| 午夜久久电影网| 欧美日韩精品三区| 亚洲不卡在线观看| 欧美美女一区二区| 午夜久久久久久久久久一区二区| 欧美日韩一区小说| 亚洲gay无套男同| 欧美一区二区三区在线| 午夜精品福利视频网站| 91精品国产综合久久精品麻豆 | 精品国产乱码久久久久久1区2区| 日本亚洲三级在线| 欧美成人精品高清在线播放| 久久99精品久久久久婷婷| 久久免费视频一区| 国产成人在线视频网址| 综合在线观看色| 欧美日韩在线电影| 国产综合一区二区| 中文在线一区二区| 欧美亚洲高清一区| 蜜臀久久久99精品久久久久久| 久久影院视频免费| 99久久综合国产精品| 亚洲精品自拍动漫在线| 欧美高清视频不卡网| 美国欧美日韩国产在线播放| 久久久久亚洲蜜桃| 国产91丝袜在线18| 亚洲一区二区精品久久av| 欧美一级二级在线观看| 高清不卡在线观看| 亚洲在线免费播放| 亚洲精品在线免费观看视频| av一区二区三区| 午夜精品久久久久久久蜜桃app| 日韩一区和二区| 99re在线视频这里只有精品| 三级久久三级久久| 国产精品丝袜在线| 欧美日韩国产一级| 国产大陆亚洲精品国产| 亚洲一区在线观看视频| 久久一区二区三区四区| 欧美亚洲综合色| 国产精品一区在线观看乱码 | 3751色影院一区二区三区| 国产精品88av| 天天色天天操综合| 亚洲欧美综合另类在线卡通| 88在线观看91蜜桃国自产| 99视频热这里只有精品免费| 另类人妖一区二区av| 亚洲一区二区三区小说| 国产无遮挡一区二区三区毛片日本| 色屁屁一区二区| 国产成人免费xxxxxxxx| 免费成人结看片| 夜夜精品浪潮av一区二区三区| 国产精品无遮挡| 日韩精品一区二区三区蜜臀| 欧美日韩国产一区| 在线欧美日韩国产| 成人avav影音| 粉嫩久久99精品久久久久久夜| 无码av免费一区二区三区试看| 成人免费视频在线观看| 欧美国产一区视频在线观看| 日韩免费观看高清完整版在线观看| 91久久精品一区二区三区| 高清在线不卡av| 国产一区欧美日韩| 美女爽到高潮91| 日本欧美久久久久免费播放网| 亚洲成人你懂的| 亚洲精品久久7777| 一区二区成人在线视频| 亚洲欧美综合另类在线卡通| 亚洲欧美自拍偷拍色图| 国产精品久久夜| 国产区在线观看成人精品| 久久精品亚洲精品国产欧美kt∨| 日韩欧美成人激情| 欧美大肚乱孕交hd孕妇| 精品日韩一区二区三区免费视频| 欧美一级免费观看| 91精品国产高清一区二区三区| 7777精品伊人久久久大香线蕉 | 久久99国产乱子伦精品免费| 蜜臀a∨国产成人精品| 免费欧美在线视频| 精品中文字幕一区二区| 精品一区二区三区免费播放| 韩国女主播一区| 国产精品一区二区视频| 国产电影一区二区三区| 成人国产精品免费观看视频| 99精品欧美一区二区三区小说| 91福利社在线观看| 91精品久久久久久久91蜜桃| 欧美tickle裸体挠脚心vk| 久久精品一区四区| 中文字幕日韩欧美一区二区三区| 亚洲人成影院在线观看| 亚洲gay无套男同| 韩国精品在线观看| 91丨porny丨首页| 欧美日韩免费观看一区三区| 日韩美女在线视频| 亚洲欧美在线观看| 免费成人在线观看视频| 成人午夜视频在线观看| 欧美视频一区二区三区四区| 日韩午夜电影在线观看| 中文字幕第一区综合| 亚洲va欧美va天堂v国产综合| 经典三级在线一区| 色婷婷香蕉在线一区二区| 精品少妇一区二区三区在线播放 | 色老头久久综合| 精品福利在线导航| 亚洲天堂成人在线观看| 免费成人性网站| 91麻豆免费在线观看| 日韩欧美在线一区二区三区| 亚洲欧美日韩中文播放|