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

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

?? jdodaosupport.java

?? spring framework 2.5.4源代碼
?? JAVA
字號(hào):
/*
 * Copyright 2002-2008 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.support;

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

import org.springframework.dao.DataAccessException;
import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.dao.support.DaoSupport;
import org.springframework.orm.jdo.JdoTemplate;
import org.springframework.orm.jdo.PersistenceManagerFactoryUtils;

/**
 * Convenient super class for JDO data access objects.
 *
 * <p>Requires a PersistenceManagerFactory to be set, providing a JdoTemplate
 * based on it to subclasses. Can alternatively be initialized directly with a
 * JdoTemplate, to reuse the latter's settings such as the PersistenceManagerFactory,
 * JdoDialect, flush mode, etc.
 *
 * <p>This base class is mainly intended for JdoTemplate usage but can also
 * be used when working with PersistenceManagerFactoryUtils directly, for example
 * in combination with JdoInterceptor-managed PersistenceManagers. Convenience
 * <code>getPersistenceManager</code> and <code>releasePersistenceManager</code>
 * methods are provided for that usage style.
 *
 * <p>This class will create its own JdoTemplate if only a PersistenceManagerFactory
 * is passed in. The "allowCreate" flag on that JdoTemplate will be "true" by default.
 * A custom JdoTemplate instance can be used through overriding <code>createJdoTemplate</code>.
 *
 * @author Juergen Hoeller
 * @since 28.07.2003
 * @see #setPersistenceManagerFactory
 * @see #setJdoTemplate
 * @see #createJdoTemplate
 * @see #getPersistenceManager
 * @see #releasePersistenceManager
 * @see org.springframework.orm.jdo.JdoTemplate
 * @see org.springframework.orm.jdo.JdoInterceptor
 */
public abstract class JdoDaoSupport extends DaoSupport {

	private JdoTemplate jdoTemplate;


	/**
	 * Set the JDO PersistenceManagerFactory to be used by this DAO.
	 * Will automatically create a JdoTemplate for the given PersistenceManagerFactory.
	 * @see #createJdoTemplate
	 * @see #setJdoTemplate
	 */
	public final void setPersistenceManagerFactory(PersistenceManagerFactory persistenceManagerFactory) {
		if (this.jdoTemplate == null || persistenceManagerFactory != this.jdoTemplate.getPersistenceManagerFactory()) {
	  	this.jdoTemplate = createJdoTemplate(persistenceManagerFactory);
		}
	}

	/**
	 * Create a JdoTemplate for the given PersistenceManagerFactory.
	 * Only invoked if populating the DAO with a PersistenceManagerFactory reference!
	 * <p>Can be overridden in subclasses to provide a JdoTemplate instance
	 * with different configuration, or a custom JdoTemplate subclass.
	 * @param persistenceManagerFactory the JDO PersistenceManagerFactoryto create a JdoTemplate for
	 * @return the new JdoTemplate instance
	 * @see #setPersistenceManagerFactory
	 */
	protected JdoTemplate createJdoTemplate(PersistenceManagerFactory persistenceManagerFactory) {
		return new JdoTemplate(persistenceManagerFactory);
	}

	/**
	 * Return the JDO PersistenceManagerFactory used by this DAO.
	 */
	public final PersistenceManagerFactory getPersistenceManagerFactory() {
		return (this.jdoTemplate != null ? this.jdoTemplate.getPersistenceManagerFactory() : null);
	}

	/**
	 * Set the JdoTemplate for this DAO explicitly,
	 * as an alternative to specifying a PersistenceManagerFactory.
	 * @see #setPersistenceManagerFactory
	 */
	public final void setJdoTemplate(JdoTemplate jdoTemplate) {
		this.jdoTemplate = jdoTemplate;
	}

	/**
	 * Return the JdoTemplate for this DAO, pre-initialized
	 * with the PersistenceManagerFactory or set explicitly.
	 */
	public final JdoTemplate getJdoTemplate() {
	  return jdoTemplate;
	}

	protected final void checkDaoConfig() {
		if (this.jdoTemplate == null) {
			throw new IllegalArgumentException("persistenceManagerFactory or jdoTemplate is required");
		}
	}


	/**
	 * Get a JDO PersistenceManager, either from the current transaction or
	 * a new one. The latter is only allowed if the "allowCreate" setting
	 * of this bean's JdoTemplate is true.
	 * @return the JDO PersistenceManager
	 * @throws DataAccessResourceFailureException if the PersistenceManager couldn't be created
	 * @throws IllegalStateException if no thread-bound PersistenceManager found and allowCreate false
	 * @see org.springframework.orm.jdo.PersistenceManagerFactoryUtils#getPersistenceManager
	 */
	protected final PersistenceManager getPersistenceManager() {
		return getPersistenceManager(this.jdoTemplate.isAllowCreate());
	}

	/**
	 * Get a JDO PersistenceManager, either from the current transaction or
	 * a new one. The latter is only allowed if "allowCreate" is true.
	 * @param allowCreate if a non-transactional PersistenceManager should be created
	 * when no transactional PersistenceManager can be found for the current thread
	 * @return the JDO PersistenceManager
	 * @throws DataAccessResourceFailureException if the PersistenceManager couldn't be created
	 * @throws IllegalStateException if no thread-bound PersistenceManager found and allowCreate false
	 * @see org.springframework.orm.jdo.PersistenceManagerFactoryUtils#getPersistenceManager
	 */
	protected final PersistenceManager getPersistenceManager(boolean allowCreate)
	    throws DataAccessResourceFailureException, IllegalStateException {

		return PersistenceManagerFactoryUtils.getPersistenceManager(getPersistenceManagerFactory(), allowCreate);
	}

	/**
	 * Convert the given JDOException to an appropriate exception from the
	 * org.springframework.dao hierarchy.
	 * <p>Delegates to the convertJdoAccessException method of this DAO's JdoTemplate.
	 * @param ex JDOException that occured
	 * @return the corresponding DataAccessException instance
	 * @see #setJdoTemplate
	 * @see org.springframework.orm.jdo.JdoTemplate#convertJdoAccessException
	 */
	protected final DataAccessException convertJdoAccessException(JDOException ex) {
		return this.jdoTemplate.convertJdoAccessException(ex);
	}

	/**
	 * Close the given JDO PersistenceManager, created via this DAO's
	 * PersistenceManagerFactory, if it isn't bound to the thread.
	 * @param pm PersistenceManager to close
	 * @see org.springframework.orm.jdo.PersistenceManagerFactoryUtils#releasePersistenceManager
	 */
	protected final void releasePersistenceManager(PersistenceManager pm) {
		PersistenceManagerFactoryUtils.releasePersistenceManager(pm, getPersistenceManagerFactory());
	}

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久这里只有精品视频网| 美国av一区二区| 久久婷婷国产综合国色天香| 激情综合色播激情啊| 精品国产亚洲在线| 91高清在线观看| 欧美视频一区在线| 欧美婷婷六月丁香综合色| 在线观看视频一区二区欧美日韩| av亚洲产国偷v产偷v自拍| 欧美综合久久久| 日韩欧美亚洲国产精品字幕久久久| 久久美女高清视频| 中文一区一区三区高中清不卡| 18成人在线视频| 爽好多水快深点欧美视频| 国产一区二区三区四区五区入口| 国产欧美一区在线| 日本一区二区在线不卡| 成人欧美一区二区三区黑人麻豆| 亚洲一区二区av在线| 日韩av二区在线播放| 丝瓜av网站精品一区二区| 国产成人综合在线播放| 懂色av中文一区二区三区| 欧美高清精品3d| www.亚洲色图| 欧美精品tushy高清| 国产日韩综合av| 污片在线观看一区二区| 极品少妇xxxx精品少妇| 波多野结衣欧美| 91精品在线免费观看| 亚洲午夜激情av| 不卡视频在线观看| 久久久久九九视频| 亚洲国产一区二区三区| 国产一区不卡视频| 欧美日韩在线观看一区二区| 欧美精彩视频一区二区三区| 蜜臀a∨国产成人精品| 成人国产电影网| 精品盗摄一区二区三区| 亚洲制服欧美中文字幕中文字幕| 99久久婷婷国产综合精品电影| 精品国产网站在线观看| 美女脱光内衣内裤视频久久影院| 欧美色视频在线观看| 亚洲国产日韩精品| 91在线视频播放地址| 色综合视频在线观看| 日本一区二区动态图| 污片在线观看一区二区| 欧美日韩一二区| 日韩欧美色电影| 日本三级亚洲精品| 欧美日韩国产一级二级| 亚洲你懂的在线视频| 亚洲成人手机在线| 99精品欧美一区| 欧美日本在线一区| 亚洲成人资源网| 日韩限制级电影在线观看| 亚洲成精国产精品女| 欧美成人vr18sexvr| 久久 天天综合| 久久综合色综合88| 国产精品99久久久久久似苏梦涵| 国产精品视频在线看| 亚洲超丰满肉感bbw| 91精品综合久久久久久| 国内精品写真在线观看| 国产精品黄色在线观看| 欧美在线|欧美| 午夜精品久久久久久久久| 欧美成人福利视频| 国产精品456露脸| 亚洲成a人片在线观看中文| 中文字幕中文字幕在线一区 | 五月天欧美精品| 亚洲三级在线看| 中文字幕av免费专区久久| 久久久精品tv| 国产日本欧美一区二区| 中文字幕精品—区二区四季| 精品少妇一区二区三区在线播放 | 激情五月播播久久久精品| 午夜激情一区二区| 丝袜脚交一区二区| 精品午夜久久福利影院| 国产欧美日韩久久| 国产精品午夜电影| 一区二区免费在线| 亚洲人成网站在线| 国产清纯在线一区二区www| 成人免费在线视频观看| 婷婷综合另类小说色区| 丝袜a∨在线一区二区三区不卡| 一区二区三区在线免费| 奇米777欧美一区二区| 久久99精品网久久| 99久久精品免费观看| 欧美日韩成人综合| 国产三级精品三级在线专区| 亚洲精选免费视频| 久久99九九99精品| 成人免费视频视频| jvid福利写真一区二区三区| 3atv一区二区三区| 国产日韩欧美在线一区| 亚洲午夜精品在线| 成人免费av在线| 欧美电影影音先锋| 中文字幕精品三区| 精品中文字幕一区二区小辣椒 | 一本到不卡精品视频在线观看| 欧美人体做爰大胆视频| 国产精品乱码久久久久久| 亚洲18影院在线观看| 北条麻妃一区二区三区| 制服丝袜亚洲播放| 亚洲一级片在线观看| 国产成人免费视频精品含羞草妖精| 91麻豆福利精品推荐| 国产视频亚洲色图| 日本中文字幕不卡| 欧美日韩精品一区视频| 国产精品天美传媒沈樵| 国产成人午夜片在线观看高清观看| 欧美三级电影网站| 国产精品久久久久久久久久久免费看| 久久爱另类一区二区小说| 91麻豆精品国产91久久久使用方法 | www.性欧美| 久久蜜桃一区二区| 国产在线视频一区二区三区| 欧美一区二区视频在线观看| 亚洲精品日韩专区silk| 91免费版pro下载短视频| 国产精品网站在线播放| 成人久久视频在线观看| 国产精品剧情在线亚洲| 国内成+人亚洲+欧美+综合在线| 日韩一级在线观看| 五月婷婷综合激情| 欧美一区二区三区四区五区| 亚洲一区在线观看免费| 欧美亚洲国产bt| 国产精品久久久久7777按摩| 色偷偷成人一区二区三区91| 亚洲影视在线播放| 91精品国产综合久久国产大片| 免费成人小视频| 久久综合久久综合久久综合| 成人免费视频app| 中文字幕一区二区三区四区| 色狠狠综合天天综合综合| 午夜欧美大尺度福利影院在线看| 欧美日韩1234| 粉嫩aⅴ一区二区三区四区五区| 国产精品你懂的在线| 成人看片黄a免费看在线| 日日摸夜夜添夜夜添精品视频| 欧美一级久久久| 99热国产精品| 看电视剧不卡顿的网站| 中文成人av在线| 91精品国产综合久久精品麻豆 | 欧美性大战xxxxx久久久| 亚洲国产精品一区二区久久恐怖片| 欧美成人精品福利| 91亚洲国产成人精品一区二区三| 日本美女视频一区二区| 国产精品美女久久久久久久网站| 欧美日韩精品欧美日韩精品一综合 | 欧美三级乱人伦电影| 国产综合色视频| 亚洲一二三四区| 国产无人区一区二区三区| 日韩三级视频在线看| 色婷婷亚洲综合| av爱爱亚洲一区| 极品少妇xxxx精品少妇| 免费在线观看不卡| 一色桃子久久精品亚洲| 久久免费偷拍视频| 日韩午夜精品视频| 一本一本大道香蕉久在线精品| 久色婷婷小香蕉久久| 日韩精品一级中文字幕精品视频免费观看| 久久久精品tv| 国产亚洲欧美在线| 精品国产乱码久久久久久蜜臀| 7777精品伊人久久久大香线蕉超级流畅 | 在线观看日韩国产| 一本色道a无线码一区v| 在线精品视频小说1| 色狠狠综合天天综合综合| 91福利国产成人精品照片| 色综合久久久网|