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

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

?? configuration.java

?? 一個Java持久層類庫
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
//$Id: Configuration.java 10841 2006-11-17 18:29:10Z max.andersen@jboss.com $package org.hibernate.cfg;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.FileOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.ObjectInputStream;import java.io.Serializable;import java.io.StringReader;import java.lang.reflect.Array;import java.net.URL;import java.util.ArrayList;import java.util.Enumeration;import java.util.HashMap;import java.util.HashSet;import java.util.Iterator;import java.util.List;import java.util.ListIterator;import java.util.Map;import java.util.Properties;import java.util.Set;import java.util.TreeMap;import java.util.jar.JarFile;import java.util.zip.ZipEntry;import org.dom4j.Attribute;import org.dom4j.DocumentException;import org.dom4j.Element;import org.slf4j.Logger;import org.slf4j.LoggerFactory;import org.w3c.dom.Document;import org.xml.sax.EntityResolver;import org.xml.sax.InputSource;import org.hibernate.EmptyInterceptor;import org.hibernate.HibernateException;import org.hibernate.Interceptor;import org.hibernate.InvalidMappingException;import org.hibernate.MappingException;import org.hibernate.MappingNotFoundException;import org.hibernate.SessionFactory;import org.hibernate.SessionFactoryObserver;import org.hibernate.dialect.Dialect;import org.hibernate.dialect.MySQLDialect;import org.hibernate.dialect.function.SQLFunction;import org.hibernate.engine.FilterDefinition;import org.hibernate.engine.Mapping;import org.hibernate.event.AutoFlushEventListener;import org.hibernate.event.DeleteEventListener;import org.hibernate.event.DirtyCheckEventListener;import org.hibernate.event.EventListeners;import org.hibernate.event.EvictEventListener;import org.hibernate.event.FlushEntityEventListener;import org.hibernate.event.FlushEventListener;import org.hibernate.event.InitializeCollectionEventListener;import org.hibernate.event.LoadEventListener;import org.hibernate.event.LockEventListener;import org.hibernate.event.MergeEventListener;import org.hibernate.event.PersistEventListener;import org.hibernate.event.PostCollectionRecreateEventListener;import org.hibernate.event.PostCollectionRemoveEventListener;import org.hibernate.event.PostCollectionUpdateEventListener;import org.hibernate.event.PostDeleteEventListener;import org.hibernate.event.PostInsertEventListener;import org.hibernate.event.PostLoadEventListener;import org.hibernate.event.PostUpdateEventListener;import org.hibernate.event.PreCollectionRecreateEventListener;import org.hibernate.event.PreCollectionRemoveEventListener;import org.hibernate.event.PreCollectionUpdateEventListener;import org.hibernate.event.PreDeleteEventListener;import org.hibernate.event.PreInsertEventListener;import org.hibernate.event.PreLoadEventListener;import org.hibernate.event.PreUpdateEventListener;import org.hibernate.event.RefreshEventListener;import org.hibernate.event.ReplicateEventListener;import org.hibernate.event.SaveOrUpdateEventListener;import org.hibernate.id.IdentifierGenerator;import org.hibernate.id.PersistentIdentifierGenerator;import org.hibernate.impl.SessionFactoryImpl;import org.hibernate.mapping.AuxiliaryDatabaseObject;import org.hibernate.mapping.Collection;import org.hibernate.mapping.ForeignKey;import org.hibernate.mapping.IdentifierCollection;import org.hibernate.mapping.Index;import org.hibernate.mapping.PersistentClass;import org.hibernate.mapping.Property;import org.hibernate.mapping.RootClass;import org.hibernate.mapping.SimpleValue;import org.hibernate.mapping.Table;import org.hibernate.mapping.UniqueKey;import org.hibernate.proxy.EntityNotFoundDelegate;import org.hibernate.secure.JACCConfiguration;import org.hibernate.tool.hbm2ddl.DatabaseMetadata;import org.hibernate.tool.hbm2ddl.TableMetadata;import org.hibernate.type.SerializationException;import org.hibernate.type.Type;import org.hibernate.util.ArrayHelper;import org.hibernate.util.CollectionHelper;import org.hibernate.util.ConfigHelper;import org.hibernate.util.PropertiesHelper;import org.hibernate.util.ReflectHelper;import org.hibernate.util.SerializationHelper;import org.hibernate.util.StringHelper;import org.hibernate.util.XMLHelper;/** * An instance of <tt>Configuration</tt> allows the application * to specify properties and mapping documents to be used when * creating a <tt>SessionFactory</tt>. Usually an application will create * a single <tt>Configuration</tt>, build a single instance of * <tt>SessionFactory</tt> and then instantiate <tt>Session</tt>s in * threads servicing client requests. The <tt>Configuration</tt> is meant * only as an initialization-time object. <tt>SessionFactory</tt>s are * immutable and do not retain any association back to the * <tt>Configuration</tt>.<br> * <br> * A new <tt>Configuration</tt> will use the properties specified in * <tt>hibernate.properties</tt> by default. * * @author Gavin King * @see org.hibernate.SessionFactory */public class Configuration implements Serializable {	private static Logger log = LoggerFactory.getLogger( Configuration.class );	protected Map classes;	protected Map imports;	protected Map collections;	protected Map tables;	protected List auxiliaryDatabaseObjects;	protected Map sqlFunctions;	protected Map namedQueries;	protected Map namedSqlQueries;	/**	 * Map<String, SqlResultSetMapping> result set name, result set description	 */	protected Map sqlResultSetMappings;	protected Map filterDefinitions;	protected List secondPasses;	protected List propertyReferences;//	protected List extendsQueue;	protected Map extendsQueue;	protected Map tableNameBinding;	protected Map columnNameBindingPerTable;	private Interceptor interceptor;	private Properties properties;	private EntityResolver entityResolver;	private EntityNotFoundDelegate entityNotFoundDelegate;	protected transient XMLHelper xmlHelper;	protected transient Map typeDefs;	protected NamingStrategy namingStrategy;	private EventListeners eventListeners;	protected final SettingsFactory settingsFactory;	private SessionFactoryObserver sessionFactoryObserver;	protected void reset() {		classes = new HashMap();		imports = new HashMap();		collections = new HashMap();		tables = new TreeMap();		namedQueries = new HashMap();		namedSqlQueries = new HashMap();		sqlResultSetMappings = new HashMap();		xmlHelper = new XMLHelper();		typeDefs = new HashMap();		propertyReferences = new ArrayList();		secondPasses = new ArrayList();		interceptor = EmptyInterceptor.INSTANCE;		properties = Environment.getProperties();		entityResolver = XMLHelper.DEFAULT_DTD_RESOLVER;		eventListeners = new EventListeners();		filterDefinitions = new HashMap();//		extendsQueue = new ArrayList();		extendsQueue = new HashMap();		auxiliaryDatabaseObjects = new ArrayList();		tableNameBinding = new HashMap();		columnNameBindingPerTable = new HashMap();		namingStrategy = DefaultNamingStrategy.INSTANCE;		sqlFunctions = new HashMap();	}	private transient Mapping mapping = buildMapping();	protected Configuration(SettingsFactory settingsFactory) {		this.settingsFactory = settingsFactory;		reset();	}	public Configuration() {		this( new SettingsFactory() );	}	/**	 * Iterate the entity mappings	 *	 * @return Iterator of the entity mappings currently contained in the configuration.	 */	public Iterator getClassMappings() {		return classes.values().iterator();	}	/**	 * Iterate the collection mappings	 *	 * @return Iterator of the collection mappings currently contained in the configuration.	 */	public Iterator getCollectionMappings() {		return collections.values().iterator();	}	/**	 * Iterate the table mappings	 *	 * @return Iterator of the table mappings currently contained in the configuration.	 */	public Iterator getTableMappings() {		return tables.values().iterator();	}	/**	 * Get the mapping for a particular entity	 *	 * @param entityName An entity name.	 * @return the entity mapping information	 */	public PersistentClass getClassMapping(String entityName) {		return (PersistentClass) classes.get( entityName );	}	/**	 * Get the mapping for a particular collection role	 *	 * @param role a collection role	 * @return The collection mapping information	 */	public Collection getCollectionMapping(String role) {		return (Collection) collections.get( role );	}	/**	 * Set a custom entity resolver. This entity resolver must be	 * set before addXXX(misc) call.	 * Default value is {@link org.hibernate.util.DTDEntityResolver}	 *	 * @param entityResolver entity resolver to use	 */	public void setEntityResolver(EntityResolver entityResolver) {		this.entityResolver = entityResolver;	}	public EntityResolver getEntityResolver() {		return entityResolver;	}	/**	 * Retrieve the user-supplied delegate to handle non-existent entity	 * scenarios.  May be null.	 *	 * @return The user-supplied delegate	 */	public EntityNotFoundDelegate getEntityNotFoundDelegate() {		return entityNotFoundDelegate;	}	/**	 * Specify a user-supplied delegate to be used to handle scenarios where an entity could not be	 * located by specified id.  This is mainly intended for EJB3 implementations to be able to	 * control how proxy initialization errors should be handled...	 *	 * @param entityNotFoundDelegate The delegate to use	 */	public void setEntityNotFoundDelegate(EntityNotFoundDelegate entityNotFoundDelegate) {		this.entityNotFoundDelegate = entityNotFoundDelegate;	}	/**	 * Read mappings from a particular XML file	 *	 * @param xmlFile a path to a file	 * @return this (for method chaining purposes)	 * @throws org.hibernate.MappingException Indicates inability to locate or parse	 * the specified mapping file.	 * @see #addFile(java.io.File)	 */	public Configuration addFile(String xmlFile) throws MappingException {		return addFile( new File( xmlFile ) );	}	/**	 * Read mappings from a particular XML file	 *	 * @param xmlFile a path to a file	 * @return this (for method chaining purposes)	 * @throws org.hibernate.MappingException Indicates inability to locate or parse	 * the specified mapping file.	 */	public Configuration addFile(File xmlFile) throws MappingException {		log.info( "Reading mappings from file: " + xmlFile.getPath() );		if ( !xmlFile.exists() ) {			throw new MappingNotFoundException( "file", xmlFile.toString() );		}		try {			List errors = new ArrayList();			org.dom4j.Document doc = xmlHelper.createSAXReader( xmlFile.toString(), errors, entityResolver ).read( xmlFile );			if ( errors.size() != 0 ) {				throw new InvalidMappingException( "file", xmlFile.toString(), ( Throwable ) errors.get( 0 ) );			}			add( doc );			return this;		}		catch ( InvalidMappingException e ) {			throw e;		}		catch  ( MappingNotFoundException e ) {			throw e;		}		catch ( Exception e ) {			throw new InvalidMappingException( "file", xmlFile.toString(), e );		}	}	/**	 * Add a cached mapping file.  A cached file is a serialized representation	 * of the DOM structure of a particular mapping.  It is saved from a previous	 * call as a file with the name <tt>xmlFile + ".bin"</tt> where xmlFile is	 * the name of the original mapping file.	 * </p>	 * If a cached <tt>xmlFile + ".bin"</tt> exists and is newer than	 * <tt>xmlFile</tt> the <tt>".bin"</tt> file will be read directly. Otherwise	 * xmlFile is read and then serialized to <tt>xmlFile + ".bin"</tt> for use	 * the next time.	 *	 * @param xmlFile The cacheable mapping file to be added.	 * @return this (for method chaining purposes)	 * @throws MappingException Indicates problems reading the cached file or processing	 * the non-cached file.	 */	public Configuration addCacheableFile(File xmlFile) throws MappingException {		try {			File cachedFile = new File( xmlFile.getAbsolutePath() + ".bin" );			org.dom4j.Document doc = null;			final boolean useCachedFile = xmlFile.exists() &&					cachedFile.exists() &&					xmlFile.lastModified() < cachedFile.lastModified();			if ( useCachedFile ) {				try {					log.info( "Reading mappings from cache file: " + cachedFile );					doc = ( org.dom4j.Document ) SerializationHelper.deserialize( new FileInputStream( cachedFile ) );				}				catch ( SerializationException e ) {					log.warn( "Could not deserialize cache file: " + cachedFile.getPath(), e );				}				catch ( FileNotFoundException e ) {					log.warn( "I/O reported cached file could not be found : " + cachedFile.getPath(), e );				}			}			// if doc is null, then for whatever reason, the cached file cannot be used...			if ( doc == null ) {				if ( !xmlFile.exists() ) {					throw new MappingNotFoundException( "file", xmlFile.toString() );				}				log.info( "Reading mappings from file: " + xmlFile );				List errors = new ArrayList();				try {					doc = xmlHelper.createSAXReader( xmlFile.getAbsolutePath(), errors, entityResolver ).read( xmlFile );					if ( errors.size() != 0 ) {						throw new MappingException( "invalid mapping", ( Throwable ) errors.get( 0 ) );					}				}				catch( DocumentException e){					throw new MappingException( "invalid mapping", e );				}				try {					log.debug( "Writing cache file for: " + xmlFile + " to: " + cachedFile );					SerializationHelper.serialize( ( Serializable ) doc, new FileOutputStream( cachedFile ) );				}				catch ( SerializationException e ) {					log.warn( "Could not write cached file: " + cachedFile, e );				}				catch ( FileNotFoundException e ) {					log.warn( "I/O reported error writing cached file : " + cachedFile.getPath(), e );				}			}			add( doc );			return this;		}		catch ( InvalidMappingException e ) {			throw e;		}		catch  ( MappingNotFoundException e ) {			throw e;		}		catch ( Exception e ) {			throw new InvalidMappingException( "file", xmlFile.toString(), e );		}	}	/**	 * Add a cacheable mapping file.	 *	 * @param xmlFile The name of the file to be added.  This must be in a form	 * useable to simply construct a {@link java.io.File} instance.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美亚洲国产另类| 欧美一区二区三区公司| 久久99精品一区二区三区| 亚洲综合成人网| 亚洲一区中文日韩| 亚洲电影你懂得| 日欧美一区二区| 日韩电影一区二区三区四区| 性做久久久久久免费观看| 日韩国产在线观看| 国产美女娇喘av呻吟久久| 风间由美一区二区三区在线观看 | 日本道免费精品一区二区三区| 成人性色生活片| 色94色欧美sute亚洲13| 欧美三级韩国三级日本三斤| 欧美日韩二区三区| 精品卡一卡二卡三卡四在线| 久久综合九色综合欧美就去吻| 久久久精品影视| 中文字幕在线一区| 一区二区三区四区视频精品免费| 亚洲成人免费av| 精品一区二区三区久久| 丁香啪啪综合成人亚洲小说| 91网址在线看| 精品久久久久久最新网址| 国产区在线观看成人精品| 有坂深雪av一区二区精品| 日本在线播放一区二区三区| 国产精品自在在线| 91成人在线精品| 久久色.com| 亚洲一区二区三区自拍| 精彩视频一区二区| 欧美在线观看一二区| 久久亚洲精品小早川怜子| 亚洲色图色小说| 久久福利资源站| 一本大道av一区二区在线播放| 欧美电影免费观看高清完整版在线观看 | 国产精品久久综合| 秋霞午夜av一区二区三区| 国产91丝袜在线播放九色| 欧美乱妇23p| 亚洲女人****多毛耸耸8| 高清av一区二区| 欧美专区在线观看一区| 国产日韩精品一区二区三区| 三级不卡在线观看| 91色在线porny| 欧美极品少妇xxxxⅹ高跟鞋| 日韩精品一区第一页| 色噜噜狠狠一区二区三区果冻| 久久久久久久久99精品| 美国十次综合导航| 久久久久久免费| 丝袜诱惑制服诱惑色一区在线观看| 成人性生交大片免费看视频在线| 日韩欧美一二区| 香港成人在线视频| 在线一区二区三区| 亚洲色图另类专区| 成人免费毛片高清视频| 久久久久高清精品| 国产精品一区二区91| 欧美精品一区二区三区蜜桃| 蜜臀久久久久久久| 欧美一区二区观看视频| 亚洲成人动漫在线免费观看| 在线日韩一区二区| 一级特黄大欧美久久久| 欧美在线综合视频| 亚洲成人激情av| 91精品国产综合久久久久久久久久| 亚洲国产va精品久久久不卡综合| 欧美性生活影院| 亚洲成人手机在线| 欧美一区二区三区播放老司机| 日韩精品亚洲专区| 欧美xxxx在线观看| 国产成人免费网站| 国产精品久久久久久久久晋中| 99久久精品免费| 亚洲精品乱码久久久久| 欧美日韩精品欧美日韩精品 | 91精品国产综合久久福利软件| 午夜久久电影网| 日韩欧美www| 国产99一区视频免费| 日本一区二区动态图| 一本在线高清不卡dvd| 亚洲国产人成综合网站| 日韩一区二区三区视频| 国产一区二区美女诱惑| 午夜激情久久久| 日韩欧美在线综合网| 国产精品资源在线观看| 亚洲欧美aⅴ...| 欧美一区二区视频在线观看| 国产乱码精品1区2区3区| 成人免费一区二区三区视频 | 蜜桃视频免费观看一区| 亚洲精品一线二线三线| jlzzjlzz亚洲女人18| 亚洲国产精品久久艾草纯爱| 日韩欧美一区在线| gogo大胆日本视频一区| 午夜精品久久久久久| 国产欧美日韩另类视频免费观看| 91丨porny丨户外露出| 青青草国产精品97视觉盛宴| 国产精品免费视频一区| 91麻豆精品国产91| 成人涩涩免费视频| 日韩vs国产vs欧美| 国产精品美女久久久久aⅴ| 欧美丝袜丝交足nylons| 国产成人一级电影| 日韩激情中文字幕| 亚洲色图在线播放| 久久久久久麻豆| 欧美一区二区视频网站| 色欧美日韩亚洲| 国产精品99久久久久久似苏梦涵| 亚洲国产人成综合网站| 国产精品蜜臀av| 久久亚洲一区二区三区四区| 欧美日韩mp4| 日本韩国一区二区三区| 国产·精品毛片| 国产在线精品不卡| 奇米777欧美一区二区| 国产一区二区三区久久久| 亚洲成a天堂v人片| 亚洲视频资源在线| 国产精品久久久久久久裸模| 精品久久五月天| 欧美第一区第二区| 91精品国产乱码久久蜜臀| 欧美性xxxxxxxx| 在线看一区二区| 91美女蜜桃在线| www.视频一区| 日本伦理一区二区| 91丝袜呻吟高潮美腿白嫩在线观看| 国产美女精品一区二区三区| 久久成人久久爱| 久久精品国产亚洲aⅴ| 美国毛片一区二区三区| 首页亚洲欧美制服丝腿| 日韩精品色哟哟| 日本欧美久久久久免费播放网| 亚洲超碰精品一区二区| 日韩影院免费视频| 免费成人在线视频观看| 精品亚洲国内自在自线福利| 青娱乐精品视频在线| 精品一区二区三区在线视频| 精品一区二区三区视频 | 久久久久久免费网| 久久先锋影音av| 国产精品久久久久久久久免费相片| 国产欧美精品区一区二区三区| 中文字幕欧美日本乱码一线二线| 欧美激情在线一区二区| 国产精品国产三级国产aⅴ入口 | 国产精品久久久久久久裸模| 国产欧美精品区一区二区三区| 国产精品污www在线观看| 国产精品超碰97尤物18| 狠狠色伊人亚洲综合成人| 国产一区高清在线| 不卡一二三区首页| 欧美色精品在线视频| 日韩一区二区在线观看| 久久美女艺术照精彩视频福利播放 | 麻豆一区二区三| 国产一区二区女| 91国产丝袜在线播放| 日韩欧美中文字幕一区| 中文字幕欧美国产| 亚洲一区二区三区四区的| 日韩av成人高清| 国产九色精品成人porny| 91久久一区二区| wwww国产精品欧美| 亚洲色图丝袜美腿| 久久er精品视频| 色视频一区二区| 久久久99久久| 日韩激情视频网站| 99视频超级精品| 日韩免费看网站| 一区二区三区四区在线免费观看 | 大胆亚洲人体视频| 91精品国产麻豆| 亚洲综合999| 成人免费看片app下载| 91麻豆精品91久久久久同性|