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

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

?? jdoaccessor.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * Copyright 2002-2006 the original author or authors.
 *
 * 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 org.springframework.orm.jdo;

import javax.jdo.JDOException;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.dao.DataAccessException;

/**
 * Base class for JdoTemplate and JdoInterceptor, defining common
 * properties such as PersistenceManagerFactory and flushing behavior.
 *
 * <p>Note: With JDO, modifications to persistent objects are just possible
 * within a transaction (in contrast to Hibernate). Therefore, eager flushing
 * will just get applied when in a transaction. Furthermore, there is no
 * explicit notion of flushing never, as this would not imply a performance
 * gain due to JDO's field interception mechanism (which doesn't involve
 * the overhead of snapshot comparisons).
 *
 * <p>Eager flushing is just available for specific JDO providers.
 * You need to a corresponding JdoDialect to make eager flushing work.
 *
 * <p>Not intended to be used directly. See JdoTemplate and JdoInterceptor.
 *
 * @author Juergen Hoeller
 * @since 02.11.2003
 * @see JdoTemplate
 * @see JdoInterceptor
 * @see #setFlushEager
 */
public abstract class JdoAccessor implements InitializingBean {

	/** Logger available to subclasses */
	protected final Log logger = LogFactory.getLog(getClass());

	private PersistenceManagerFactory persistenceManagerFactory;

	private JdoDialect jdoDialect;

	private boolean flushEager = false;


	/**
	 * Set the JDO PersistenceManagerFactory that should be used to create
	 * PersistenceManagers.
	 */
	public void setPersistenceManagerFactory(PersistenceManagerFactory pmf) {
		this.persistenceManagerFactory = pmf;
	}

	/**
	 * Return the JDO PersistenceManagerFactory that should be used to create
	 * PersistenceManagers.
	 */
	public PersistenceManagerFactory getPersistenceManagerFactory() {
		return persistenceManagerFactory;
	}

	/**
	 * Set the JDO dialect to use for this accessor.
	 * <p>The dialect object can be used to retrieve the underlying JDBC
	 * connection and to eagerly flush changes to the database.
	 * <p>Default is a DefaultJdoDialect based on the PersistenceManagerFactory's
	 * underlying DataSource, if any.
	 */
	public void setJdoDialect(JdoDialect jdoDialect) {
		this.jdoDialect = jdoDialect;
	}

	/**
	 * Return the JDO dialect to use for this accessor.
	 * <p>Creates a default one for the specified PersistenceManagerFactory if none set.
	 */
	public JdoDialect getJdoDialect() {
		if (this.jdoDialect == null) {
			this.jdoDialect = new DefaultJdoDialect();
		}
		return this.jdoDialect;
	}

	/**
	 * Set if this accessor should flush changes to the database eagerly.
	 * <p>Eager flushing leads to immediate synchronization with the database,
	 * even if in a transaction. This causes inconsistencies to show up and throw
	 * a respective exception immediately, and JDBC access code that participates
	 * in the same transaction will see the changes as the database is already
	 * aware of them then. But the drawbacks are:
	 * <ul>
	 * <li>additional communication roundtrips with the database, instead of a
	 * single batch at transaction commit;
	 * <li>the fact that an actual database rollback is needed if the JDO
	 * transaction rolls back (due to already submitted SQL statements).
	 * </ul>
	 */
	public void setFlushEager(boolean flushEager) {
		this.flushEager = flushEager;
	}

	/**
	 * Return if this accessor should flush changes to the database eagerly.
	 */
	public boolean isFlushEager() {
		return flushEager;
	}

	/**
	 * Eagerly initialize the JDO dialect, creating a default one
	 * for the specified PersistenceManagerFactory if none set.
	 */
	public void afterPropertiesSet() {
		if (getPersistenceManagerFactory() == null) {
			throw new IllegalArgumentException("persistenceManagerFactory is required");
		}
		// Build default JdoDialect if none explicitly specified.
		if (this.jdoDialect == null) {
			this.jdoDialect = new DefaultJdoDialect(getPersistenceManagerFactory().getConnectionFactory());
		}
	}


	/**
	 * Flush the given JDO persistence manager if necessary.
	 * @param pm the current JDO PersistenceManager
	 * @param existingTransaction if executing within an existing transaction
	 * (within an existing JDO PersistenceManager that won't be closed immediately)
	 * @throws JDOException in case of JDO flushing errors
	 */
	protected void flushIfNecessary(PersistenceManager pm, boolean existingTransaction) throws JDOException {
		if (isFlushEager()) {
			logger.debug("Eagerly flushing JDO persistence manager");
			getJdoDialect().flush(pm);
		}
	}

	/**
	 * Convert the given JDOException to an appropriate exception from the
	 * <code>org.springframework.dao</code> hierarchy.
	 * <p>Default implementation delegates to the JdoDialect.
	 * May be overridden in subclasses.
	 * @param ex JDOException that occured
	 * @return the corresponding DataAccessException instance
	 * @see JdoDialect#translateException
	 */
	public DataAccessException convertJdoAccessException(JDOException ex) {
		return getJdoDialect().translateException(ex);
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩精品一区| 欧美亚洲综合另类| 中文字幕av一区 二区| 欧美一区二区三区视频免费播放| 亚洲一区二区三区小说| 欧亚洲嫩模精品一区三区| 亚洲123区在线观看| 欧美一级淫片007| 国产一区二区精品久久99| 中文av一区二区| 在线免费观看日韩欧美| 三级欧美韩日大片在线看| 日韩免费高清av| 成人手机在线视频| 天堂午夜影视日韩欧美一区二区| 精品久久99ma| 一本久道中文字幕精品亚洲嫩| 亚洲电影视频在线| 久久久久久久av麻豆果冻| 91麻豆免费看片| 久久超碰97人人做人人爱| 国产精品嫩草99a| 欧美一区二区三区的| 丁香婷婷综合五月| 三级亚洲高清视频| 国产精品美女久久福利网站 | 久久精品72免费观看| 欧美激情一二三区| 欧美一区二区视频免费观看| 国产精品99久久久久久似苏梦涵 | 一区二区三区中文字幕电影| 欧美一级一级性生活免费录像| 99精品一区二区三区| 日韩国产欧美三级| 亚洲视频在线一区二区| 日韩视频一区在线观看| 欧美在线视频全部完| 国产成人高清视频| 捆绑调教美女网站视频一区| 综合激情成人伊人| 久久精品人人做人人爽人人| 欧美另类videos死尸| 成人动漫精品一区二区| 极品少妇xxxx精品少妇偷拍| 亚洲综合视频网| 中文字幕一区二区三| 久久蜜臀精品av| 日韩精品一区二区三区swag| 欧美日韩一区二区三区免费看 | 精品久久五月天| 欧美日韩一区二区三区高清| 99久久婷婷国产| 国产一区999| 麻豆专区一区二区三区四区五区| 亚洲影院在线观看| 国产欧美久久久精品影院| 欧美久久久久久久久中文字幕| av中文字幕亚洲| 国产夫妻精品视频| 极品瑜伽女神91| 捆绑紧缚一区二区三区视频| 日韩精品色哟哟| 日韩av不卡在线观看| 亚洲第一综合色| 亚洲18色成人| 日韩国产欧美在线播放| 亚洲第一福利一区| 亚洲第四色夜色| 亚洲国产视频直播| 亚洲国产欧美另类丝袜| 亚洲一区国产视频| 亚洲va欧美va天堂v国产综合| 亚洲精品菠萝久久久久久久| 亚洲日本va在线观看| 亚洲欧洲www| 亚洲欧美国产毛片在线| 《视频一区视频二区| 国产精品久久99| 亚洲美女屁股眼交3| 夜夜爽夜夜爽精品视频| 性久久久久久久| 日韩1区2区3区| 久久91精品国产91久久小草| 精品写真视频在线观看| 国产精品白丝av| 99精品黄色片免费大全| 欧美在线观看一区| 欧美丰满少妇xxxxx高潮对白| 日韩一级片在线播放| 欧美成人a∨高清免费观看| 久久久噜噜噜久久人人看| 亚洲国产精品成人综合| 亚洲欧美aⅴ...| 午夜精品久久久久久久久久| 视频一区视频二区中文| 乱一区二区av| 不卡电影一区二区三区| 日本高清不卡视频| 欧美精品久久99久久在免费线| 日韩欧美亚洲另类制服综合在线| 欧美精品一区二区三区四区| 国产精品成人免费在线| 亚洲影院在线观看| 精品一区二区av| 色综合天天综合网国产成人综合天| 在线观看日韩国产| 欧美精品一区在线观看| 亚洲三级在线免费观看| 老司机精品视频线观看86| 成人18视频日本| 欧美一卡2卡三卡4卡5免费| 国产亚洲成aⅴ人片在线观看| 一区二区三区四区蜜桃| 久久不见久久见免费视频1| av电影在线观看一区| 日韩一区二区在线免费观看| 国产欧美一区二区三区网站| 亚洲一区av在线| 国产精一品亚洲二区在线视频| 色综合天天性综合| 精品乱码亚洲一区二区不卡| 1024成人网| 国产大片一区二区| 91精品国产欧美一区二区成人| 国产日韩欧美麻豆| 亚洲动漫第一页| 成人手机电影网| 日韩精品中文字幕一区| 亚洲欧洲一区二区三区| 精品午夜久久福利影院| 欧美日韩国产大片| 中文字幕一区二区三区av| 精品亚洲免费视频| 911精品国产一区二区在线| 中文字幕一区二区三中文字幕| 久久99久国产精品黄毛片色诱| 一本大道av一区二区在线播放| 久久久影视传媒| 久久国产婷婷国产香蕉| 欧美系列一区二区| 国产精品不卡一区| 国产福利精品导航| 久久免费电影网| 久久国产精品露脸对白| 7777精品伊人久久久大香线蕉超级流畅| ㊣最新国产の精品bt伙计久久| 国模冰冰炮一区二区| 日韩欧美国产wwwww| 五月婷婷色综合| 精品视频在线看| 一区二区三区在线播放| 色噜噜狠狠色综合欧洲selulu| 国产精品免费网站在线观看| 国产精品91xxx| 久久婷婷国产综合精品青草 | 美女在线观看视频一区二区| 欧洲亚洲精品在线| 一区二区三区免费在线观看| 成人高清视频免费观看| 中文av字幕一区| 99久久久久久| 亚洲日本在线视频观看| 91在线精品一区二区| 综合中文字幕亚洲| 91蝌蚪porny九色| 亚洲一区二区三区四区五区中文| 色成人在线视频| 午夜免费久久看| 精品少妇一区二区三区视频免付费| 开心九九激情九九欧美日韩精美视频电影 | 欧美丰满少妇xxxxx高潮对白| 亚洲va天堂va国产va久| 91精品在线一区二区| 久久精品噜噜噜成人av农村| 欧美电影免费观看高清完整版在| 久久精品国产**网站演员| 久久久久久久精| 99精品久久久久久| 亚洲午夜国产一区99re久久| 欧美日韩国产综合视频在线观看| 天堂久久久久va久久久久| 欧美精品在线观看播放| 蜜桃久久av一区| 中文字幕 久热精品 视频在线 | 成人免费毛片片v| 亚洲人吸女人奶水| 欧美午夜影院一区| 久久精品久久综合| 中文字幕一区二区三区不卡在线| 91九色最新地址| 理论电影国产精品| 国产精品毛片久久久久久久| 在线精品视频免费观看| 久久国产免费看| 亚洲日本在线天堂| 欧美成人一区二区三区| www.日本不卡| 青青草成人在线观看| 亚洲国产成人自拍| 欧美一区二区三区系列电影|