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

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

?? configuration.java

?? 通過系統把幾乎所有與人力資源相關的數據統一管理
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
//$Id: Configuration.java,v 1.27.2.30 2004/02/04 18:56:44 oneovthafew Exp $package net.sf.hibernate.cfg;import java.util.Enumeration;import java.util.Iterator;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import java.util.Properties;import java.util.jar.JarFile;import java.util.zip.ZipEntry;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException;import java.io.InputStream;import java.io.Serializable;import java.io.StringReader;import java.net.URL;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.dom4j.Attribute;import org.dom4j.Element;import org.w3c.dom.Document;import org.xml.sax.InputSource;import net.sf.hibernate.util.ArrayHelper;import net.sf.hibernate.util.ReflectHelper;import net.sf.hibernate.util.StringHelper;import net.sf.hibernate.util.XMLHelper;import net.sf.hibernate.HibernateException;import net.sf.hibernate.Interceptor;import net.sf.hibernate.MappingException;import net.sf.hibernate.SessionFactory;import net.sf.hibernate.tool.hbm2ddl.DatabaseMetadata;import net.sf.hibernate.tool.hbm2ddl.TableMetadata;import net.sf.hibernate.type.Type;import net.sf.hibernate.id.IdentifierGenerator;import net.sf.hibernate.id.PersistentIdentifierGenerator;import net.sf.hibernate.impl.SessionFactoryImpl;import net.sf.hibernate.mapping.Collection;import net.sf.hibernate.mapping.ForeignKey;import net.sf.hibernate.mapping.Index;import net.sf.hibernate.mapping.PersistentClass;import net.sf.hibernate.mapping.Property;import net.sf.hibernate.mapping.RootClass;import net.sf.hibernate.mapping.Table;import net.sf.hibernate.mapping.SimpleValue;import net.sf.hibernate.cache.Cache;import net.sf.hibernate.cache.CacheConcurrencyStrategy;import net.sf.hibernate.cache.CacheException;import net.sf.hibernate.cache.CacheFactory;import net.sf.hibernate.dialect.Dialect;import net.sf.hibernate.engine.Mapping;/** * 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. * * @see net.sf.hibernate.SessionFactory * @author Gavin King */public class Configuration {	private Map classes = new HashMap();	private Map imports = new HashMap();	private Map collections = new HashMap();	private Map tables = new HashMap();	private Map namedQueries = new HashMap();	private Map namedSqlQueries = new HashMap();	private List secondPasses = new ArrayList();	private List propertyReferences = new ArrayList();	private Interceptor interceptor = EMPTY_INTERCEPTOR;	private Properties properties = Environment.getProperties();	private Map caches = new HashMap();		private NamingStrategy namingStrategy = DefaultNamingStrategy.INSTANCE; 	private static Log log = LogFactory.getLog(Configuration.class);	protected void reset() {		classes = new HashMap();		collections = new HashMap();		tables = new HashMap();		namedQueries = new HashMap();		namedSqlQueries = new HashMap();		secondPasses = new ArrayList();		interceptor = EMPTY_INTERCEPTOR;		properties = Environment.getProperties();	}	private Mapping mapping = new Mapping() {		/**		 * Returns the identifier type of a mapped class		 */		public Type getIdentifierType(Class persistentClass) throws MappingException {			return ( (PersistentClass) classes.get(persistentClass) ).getIdentifier().getType();		}		public String getIdentifierPropertyName(Class persistentClass) throws MappingException {			return ( (PersistentClass) classes.get(persistentClass) ).getIdentifierProperty().getName();		}		public Type getPropertyType(Class persistentClass, String propertyName) throws MappingException {			return ( (PersistentClass) classes.get(persistentClass) ).getProperty(propertyName).getType();		}	};		public Configuration() {		reset();	}	/**	 * Iterate the class mappings	 */	public Iterator getClassMappings() {		return classes.values().iterator();	}	/**	 * Iterate the collection mappings	 */	public Iterator getCollectionMappings() {		return collections.values().iterator();	}	/**	 * Iterate the table mappings	 */	private Iterator getTableMappings() {		return tables.values().iterator();	}	/**	 * Get the mapping for a particular class	 */	public PersistentClass getClassMapping(Class persistentClass) {		return (PersistentClass) classes.get(persistentClass);	}	/**	 * Get the mapping for a particular collection role	 * @param role a collection role	 * @return Collection	 */	public Collection getCollectionMapping(String role) {		return (Collection) collections.get(role);	}	/**	 * Read mappings from a particular XML file	 * @param xmlFile a path to a file	 */	public Configuration addFile(String xmlFile) throws MappingException {		log.info("Mapping file: " + xmlFile);		try {			List errors = new ArrayList();			org.dom4j.Document doc= XMLHelper.createSAXReader(xmlFile, errors).read( new File(xmlFile) );			if ( errors.size()!=0 ) throw new MappingException( "invalid mapping", (Throwable) errors.get(0) );			add(doc);			return this;		}		catch (Exception e) {			log.error("Could not configure datastore from file: " + xmlFile, e);			throw new MappingException(e);		}	}	/**	 * Read mappings from a particular XML file	 * @param xmlFile a path to a file	 */	public Configuration addFile(File xmlFile) throws MappingException {		log.info( "Mapping file: " + xmlFile.getPath() );		try {			addInputStream( new FileInputStream(xmlFile) );		}		catch (Exception e) {			log.error("Could not configure datastore from file: " + xmlFile.getPath(), e);			throw new MappingException(e);		}		return this;	}	/**	 * Read mappings from a <tt>String</tt>	 * @param xml an XML string	 */	public Configuration addXML(String xml) throws MappingException {		if ( log.isDebugEnabled() ) log.debug("Mapping XML:\n" + xml);		try {			List errors = new ArrayList();			org.dom4j.Document doc = XMLHelper.createSAXReader("XML String", errors).read( new StringReader(xml) );			if ( errors.size()!=0 ) throw new MappingException( "invalid mapping", (Throwable) errors.get(0) );			add(doc);		}		catch (Exception e) {			log.error("Could not configure datastore from XML", e);			throw new MappingException(e);		}		return this;	}	/**	 * Read mappings from a <tt>URL</tt>	 * @param url	 */	public Configuration addURL(URL url) throws MappingException {		if ( log.isDebugEnabled() ) log.debug("Mapping URL:\n" + url);		try {			addInputStream( url.openStream() );		}		catch (Exception e) {			log.error("Could not configure datastore from URL", e);			throw new MappingException(e);		}		return this;	}	/**	 * Read mappings from a DOM <tt>Document</tt>	 * @param doc a DOM document	 */	public Configuration addDocument(Document doc) throws MappingException {		if ( log.isDebugEnabled() ) log.debug("Mapping XML:\n" + doc);		try {			add( XMLHelper.createDOMReader().read(doc) );		}		catch (Exception e) {			log.error("Could not configure datastore from XML document", e);			throw new MappingException(e);		}		return this;	}	protected void add(org.dom4j.Document doc) throws Exception {		try {			Binder.bindRoot( doc, createMappings() );		}		catch (MappingException me) {			log.error("Could not compile the mapping document", me);			throw me;		}	}	/**	 * Create a new <tt>Mappings</tt> to add class and collection	 * mappings to.	 */	public Mappings createMappings() {		return new Mappings(			classes, 			collections, 			tables, 			namedQueries, 			namedSqlQueries, 			imports, 			caches, 			secondPasses, 			propertyReferences,			namingStrategy		);	}	/**	 * Read mappings from an <tt>InputStream</tt>	 * @param xmlInputStream an <tt>InputStream</tt> containing XML	 */	public Configuration addInputStream(InputStream xmlInputStream) throws MappingException {		try {			List errors = new ArrayList();			org.dom4j.Document doc = XMLHelper.createSAXReader("XML InputStream", errors).read( new InputSource(xmlInputStream) );			if ( errors.size()!=0 ) throw new MappingException( "invalid mapping", (Throwable) errors.get(0) );			add(doc);			return this;		}		catch (MappingException me) {			throw me;		}		catch (Exception e) {			log.error("Could not configure datastore from input stream", e);			throw new MappingException(e);		}		finally {			try{				xmlInputStream.close();			} 			catch (IOException ioe){				log.error("could not close input stream", ioe);				}		}	}	/**	 * Read mappings from an application resource	 * @param path a resource	 * @param classLoader a <tt>ClassLoader</tt> to use	 */	public Configuration addResource(String path, ClassLoader classLoader) throws MappingException {		log.info("Mapping resource: " + path);		InputStream rsrc = classLoader.getResourceAsStream(path);		if (rsrc==null) throw new MappingException("Resource: " + path + " not found");		try {			return addInputStream(rsrc);		} 		catch (MappingException me) {			throw new MappingException("Error reading resource: " + path, me);		}	}	/**	 * Read a mapping from an application resource, using a convention.	 * The class <tt>foo.bar.Foo</tt> is mapped by the file <tt>foo/bar/Foo.hbm.xml</tt>.	 * @param persistentClass the mapped class	 */	public Configuration addClass(Class persistentClass) throws MappingException {		String fileName = persistentClass.getName().replace(StringHelper.DOT,'/') + ".hbm.xml";		log.info("Mapping resource: " + fileName);		InputStream rsrc = persistentClass.getClassLoader().getResourceAsStream(fileName);		if (rsrc==null) throw new MappingException("Resource: " + fileName + " not found");		try {			return addInputStream(rsrc);		} 		catch (MappingException me) {			throw new MappingException("Error reading resource: " + fileName, me);		}	}	/**	 * Read all mappings from a jar file	 * @param resource an application resource (a jar file)	 * @deprecated use <tt>addJar(java.io.File)</tt>	 */	public Configuration addJar(String resource) throws MappingException {		return addJar( new File( 			Thread.currentThread().getContextClassLoader().getResource(resource).getFile() 		) );	}	/**	 * Read all mappings from a jar file	 * @param jar a jar file	 */	public Configuration addJar(File jar) throws MappingException {		log.info( "Searching for mapping documents in jar: " + jar.getName() );		final JarFile jarFile;		try {			jarFile = new JarFile(jar);		}		catch (IOException ioe) {			log.error("Could not configure datastore from jar: " + jar.getName(), ioe);			throw new MappingException("Could not configure datastore from jar: " + jar.getName(), ioe);		}		Enumeration enum = jarFile.entries();		while( enum.hasMoreElements() ) {			ZipEntry ze = (ZipEntry) enum.nextElement();			if( ze.getName().endsWith(".hbm.xml") ) {				log.info( "Found mapping documents in jar: " + ze.getName() );				try {					addInputStream( jarFile.getInputStream(ze) );				}				catch (MappingException me) {					throw me;				}				catch (Exception e) {					log.error("Could not configure datastore from jar", e);					throw new MappingException(e);				}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美午夜精品免费| 国内精品久久久久影院一蜜桃| 91精品国产品国语在线不卡| 成人精品电影在线观看| 国产一区视频导航| 青青草国产精品97视觉盛宴| 亚洲不卡在线观看| 亚洲成人综合在线| 亚洲一卡二卡三卡四卡无卡久久| 国产精品乱码人人做人人爱 | 国产欧美日韩亚州综合| 日韩一区二区在线免费观看| 91精品啪在线观看国产60岁| 欧美日韩高清影院| 777亚洲妇女| 91精品国产91综合久久蜜臀| 日韩免费视频一区| 久久精品夜色噜噜亚洲aⅴ| 久久久久高清精品| 国产精品国产三级国产aⅴ入口| 国产精品另类一区| 一区二区免费视频| 免费观看成人av| 狠狠色丁香久久婷婷综合_中| 国产乱子伦一区二区三区国色天香 | 欧美日韩亚洲国产综合| 欧美蜜桃一区二区三区| 日韩欧美一级二级| 久久精品亚洲精品国产欧美 | www.色综合.com| 色妞www精品视频| 欧美精品123区| 精品盗摄一区二区三区| 国产精品久久久久久久久快鸭| 亚洲精品成人在线| 免费看日韩a级影片| 成人性色生活片免费看爆迷你毛片| 99re这里只有精品首页| 欧美一级爆毛片| 中文字幕一区二区视频| 日韩中文字幕区一区有砖一区 | 国产福利视频一区二区三区| 色屁屁一区二区| 日韩一级免费观看| 亚洲欧洲国产专区| 蜜桃视频在线观看一区| 91日韩精品一区| 欧美一级夜夜爽| 亚洲欧美综合在线精品| 久久成人综合网| 色婷婷综合久色| 26uuu国产在线精品一区二区| 亚洲精品国产成人久久av盗摄 | 欧美videofree性高清杂交| 国产精品福利电影一区二区三区四区 | 欧美老肥妇做.爰bbww| 欧美国产日韩精品免费观看| 首页国产丝袜综合| 91麻豆国产福利在线观看| 久久色中文字幕| 三级久久三级久久| 日本二三区不卡| 欧美激情中文不卡| 国产一区在线观看麻豆| 日韩欧美国产1| 亚洲一区二区三区小说| jlzzjlzz国产精品久久| 国产亚洲一二三区| 麻豆成人综合网| 91麻豆精品国产无毒不卡在线观看| 亚洲欧美日韩国产一区二区三区| 国模冰冰炮一区二区| 日韩精品一区二区三区三区免费| 亚洲国产日韩在线一区模特| 色综合久久综合网97色综合 | 高清久久久久久| 久久这里都是精品| 精品一区二区三区在线视频| 91.com视频| 亚洲va在线va天堂| 欧美日韩不卡一区二区| 亚洲h动漫在线| 精品视频在线视频| 亚洲国产美国国产综合一区二区| 91精品办公室少妇高潮对白| 一区二区三区四区不卡在线| 色综合久久中文综合久久97| 亚洲视频一区二区免费在线观看 | 欧美国产激情一区二区三区蜜月| 国产伦精一区二区三区| 国产人伦精品一区二区| 成人深夜在线观看| 中文字幕制服丝袜成人av | 91色视频在线| 亚洲一区二区精品久久av| 欧美色区777第一页| 三级久久三级久久| 欧美va在线播放| 成人综合婷婷国产精品久久免费| 中文字幕一区二区三区精华液 | 制服丝袜一区二区三区| 久久激情综合网| 中文字幕av一区二区三区高| 色综合一区二区| 午夜精品在线视频一区| 日韩精品自拍偷拍| 国产91综合网| 亚洲午夜视频在线| 欧美成人官网二区| 波多野洁衣一区| 污片在线观看一区二区| 久久精品在线观看| 色一情一伦一子一伦一区| 午夜精品爽啪视频| 337p日本欧洲亚洲大胆精品| 99热国产精品| 秋霞成人午夜伦在线观看| 国产精品私房写真福利视频| 欧美羞羞免费网站| 国产自产视频一区二区三区| 中文字幕字幕中文在线中不卡视频| 欧美日韩一区在线观看| 国产99久久久国产精品免费看| 亚洲午夜视频在线观看| 国产午夜精品一区二区三区嫩草 | 樱花草国产18久久久久| 日韩欧美精品三级| 色欧美88888久久久久久影院| 国产一区二区三区日韩| 亚洲综合一二区| 国产午夜精品久久久久久久| 欧美日韩aaa| av激情成人网| 国产成人在线影院| 免费xxxx性欧美18vr| 一区二区久久久久| 国产精品毛片大码女人| 久久精品欧美一区二区三区不卡 | 色丁香久综合在线久综合在线观看 | 亚洲国产成人自拍| 欧美一级在线免费| 欧美三级日韩三级国产三级| 97se亚洲国产综合在线| 国产一区二区三区免费观看| 日本视频一区二区三区| 亚洲午夜精品一区二区三区他趣| 国产精品福利一区| 国产欧美精品一区二区色综合 | 久久网站热最新地址| 91精品午夜视频| 欧美福利一区二区| 欧美丝袜自拍制服另类| 色婷婷国产精品| 不卡电影一区二区三区| 成人午夜激情在线| 国产91精品欧美| 国产v日产∨综合v精品视频| 国产成人精品在线看| 国产一二三精品| 精品一二三四区| 韩日欧美一区二区三区| 国产一区欧美日韩| 精品一区中文字幕| 国产一区二区不卡| 国产精品一二三四区| 国产成人在线免费观看| 成人性生交大片免费看视频在线 | 波多野结衣精品在线| 99久久精品免费看国产| 色综合色狠狠综合色| 91黄色免费观看| 欧美在线免费观看视频| 欧美精品v国产精品v日韩精品 | 欧美一区二区国产| 精品美女在线播放| 久久久久久久综合日本| 国产精品色哟哟| 综合色中文字幕| 亚洲第一av色| 另类欧美日韩国产在线| 国产宾馆实践打屁股91| 色婷婷综合久色| 制服.丝袜.亚洲.中文.综合| 久久一区二区三区四区| 中文字幕一区二区三区视频| 一区二区三区中文字幕精品精品| 午夜视频在线观看一区二区| 久久狠狠亚洲综合| 成人黄色电影在线| 欧美日韩一区二区不卡| 2020日本不卡一区二区视频| 亚洲三级小视频| 美女视频黄 久久| 成人sese在线| 7777精品伊人久久久大香线蕉完整版| 2022国产精品视频| 亚洲一区二区三区不卡国产欧美| 久久www免费人成看片高清| 91在线一区二区三区| 日韩欧美综合一区|