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

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

?? xpathmanager.java

?? JDBF是一個實現o/r mapping 的軟件
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:

	/**
	 *
	 * Return the BeanDescriptor object
	 *
	 * @see BeanDescriptor
	 * @param  e -Element  xml node in the repository
	 * @return BeanDescriptor
	 * @throws MappingException
	 *
	 */
	protected BeanDescriptor getBeanDescriptor(Element e) throws MappingException{

	    BeanDescriptor beanDescriptor = new BeanDescriptor();
		String attribute = e.getAttribute("name");
		logger.log(Level.INFO,Messages.format("XPathManager.beanDesc",attribute));

	    if(attribute == null || attribute.equals("")){			
			logger.throwing(getClass().getName(), "getBeanDescriptor", 
				            new MappingException("mapping.repositoryViewNameMissing"));
			throw new MappingException("mapping.repositoryViewNameMissing");
		}
		else
			beanDescriptor.setRepositoryViewName(attribute);

		attribute = e.getAttribute("table-name");

		if(attribute == null || attribute.equals("")){
		
			logger.throwing(getClass().getName(), "getBeanDescriptor", 
				            new MappingException("mapping.noTableName",xPath));
			throw new MappingException("mapping.noTableName",xPath);
		}
		else
			beanDescriptor.setTableName(attribute);

		attribute = e.getAttribute("object-name");

		if(attribute == null || attribute.equals("")){
		
			logger.throwing(getClass().getName(), "getBeanDescriptor", 
				            new MappingException("mapping.classMapNotFound",xPath));
			throw new MappingException("mapping.classMapNotFound",xPath);
		}
		else
			beanDescriptor.setClassName(attribute);

		attribute = e.getAttribute("database-name");

		if(attribute == null || attribute.equals("")){
		
			logger.throwing(getClass().getName(), "getBeanDescriptor", 
				            new MappingException("mapping.databaseNameMissing"));	
			throw new MappingException("mapping.databaseNameMissing");
		}
		else
			beanDescriptor.setDatabaseName(attribute);

		logger.log(Level.FINEST,beanDescriptor.toString());
		return beanDescriptor;
	}


	/**
	 *
	 * Return the ItemDescriptor object
	 * 
	 * If the xPath is incorrect MappingException is throwed
	 *
	 * @see ItemDescriptor
	 * @param  xPath  path the repositoryView on the repository
	 * @return Collection of ItemDescriptor
	 * @throws MappingException
	 *
	 */
	protected ArrayList getItemDescriptor(String xPath,
										  BeanDescriptor beanDescriptor)
		throws MappingException{

	    ArrayList itemDescriptors = new ArrayList();
		PrimaryKeyMap pk = new PrimaryKeyMap();	
	    try{
				
			NodeList nl = XPathAPI.selectNodeList(document, xPath);

         	for (int i = 0 ; i < nl.getLength(); i++) {

			    ItemDescriptor itemDescriptor = new ItemDescriptor();
			    Element e =(Element)nl.item(i);
	
			    String primaryKey = e.getAttribute("primary-key");
	
			    if(primaryKey == null || primaryKey.equals("")){
			    
			       logger.throwing(getClass().getName(), "getItemDescriptor()", 
					       new MappingException("mapping.primaryKeyMissing"));
			       throw new MappingException("mapping.primaryKeyMissing");
			    }
			    else{
	
				 //if item is unique key
				 if(primaryKey.equalsIgnoreCase("yes"))
			        itemDescriptor.setIsPrimaryKey(true);
				 else
				    itemDescriptor.setIsPrimaryKey(false);
			    }
	
			    String attribute = e.getAttribute("property-name");
	
			    if(attribute == null || attribute.equals("")){
			       logger.throwing(getClass().getName(), "getItemDescriptor()", 
					       new MappingException("mapping.propertyNameMissing"));
			       throw new MappingException("mapping.propertyNameMissing");
	         	}
			    else
				   itemDescriptor.setPropertyName(attribute);
	
			    attribute = e.getAttribute("data-type");
	
			    if(attribute == null || attribute.equals("")){
	    		    	logger.throwing(getClass().getName(), "getItemDescriptor()", 
					       new MappingException("mapping.sqlTypeMissing"));
	    		    	throw new MappingException("mapping.sqlTypeMissing");
			    }
			    else
	    		   itemDescriptor.setDataType(attribute);
	
			    attribute = e.getAttribute("column-name");
	
			    if(attribute == null || attribute.equals("")){
	     			logger.throwing(getClass().getName(), "getItemDescriptor()", 
					       new MappingException("mapping.columnNameMissing"));
	     			throw new MappingException("mapping.columnNameMissing");
			    }
	 		    else
	    			itemDescriptor.setColumnTableName(attribute);
				
				if(itemDescriptor.isPrimaryKey()){				
					pk.addKey(itemDescriptor);
					beanDescriptor.setPrimaryKeyMap(pk);
				}
				else
	    			itemDescriptors.add(itemDescriptor);
         	}
	     }
	     catch(TransformerException e){
			logger.throwing(getClass().getName(), "getItemDescriptor()", 
				       new MappingException(e));
	       throw new MappingException(e);
	     }
	     finally{
		   
	       return itemDescriptors;
	     }
	}


	/**
	 *
	 * Load all repositoryView object in RepositoryFactory.
	 *
	 * @throws MappingException if error occurs
	 *
	 */
	protected void loadRepositoryFactory() throws MappingException {

	    try{
			logger.log(Level.INFO,Messages.message("XPathManager.loadingRep"));
			xPath = "/repository/*";
			NodeList nl = XPathAPI.selectNodeList(document, xPath);

			for(int i = 0 ; i < nl.getLength() ; i++) {

				Element node = (Element) nl.item(i);
				RepositoryView repository = (RepositoryView)
											createRepositoryView(node);
				String repositoryViewName = repository.getBeanDescriptor()
													  .getRepositoryViewName();
				repFactory.addRepository(repositoryViewName,repository);				
				logger.log(Level.INFO,Messages.format("XPathManager.repAdd",
					       repositoryViewName));
			}

	    }
	    catch(TransformerException e){
			
			logger.throwing(getClass().getName(), "loadRepositoryFactory()", 
				       new MappingException(e));
			throw new MappingException(e);
	    }
	}


	/**
	 *
	 * Return  RepositoryFactory
	 *
	 * @return RepositoryFactory
	 *
	 */
	public RepositoryFactory getRepositoryFactory() {

		return repFactory;
	}


	/**
	 *
	 * Parses the repository file specified in fileName
	 *
	 * @param  fileName  name of repository file
	 * @return Document
	 * @throws MappingException
	 * @throws SAXException
	 * @throws ParserConfigurationExcpetion 
	 *
	 */
	protected Document parse(String fileName) throws ParserConfigurationException,SAXException,MappingException {

		DocumentBuilderFactory dfactory = null;
		InputSource in = null;
		Document doc = null;
		try{

			//Set up a DOM tree to query
			in = new InputSource( new FileInputStream(fileName) );
			dfactory = DocumentBuilderFactory.newInstance();
			dfactory.setNamespaceAware(true);
			
			doc = dfactory.newDocumentBuilder().parse(in);
			
		}
		catch(FileNotFoundException e){
			logger.throwing(getClass().getName(), "parse()", 
				       new MappingException("mapping.missingRepositoryConf",fileName));
			throw new MappingException("mapping.missingRepositoryConf",fileName);
			//return null;
		}
		catch(IOException e){
			logger.throwing(getClass().getName(), "parse()", 
				       new MappingException("mapping.missingRepositoryConf",fileName));
    		throw new MappingException("mapping.missingRepositoryConf",fileName);
    		//return null;
		}
		finally{
			return doc;
		}
	}

}

/*

 $Log: XPathManager.java,v $
 Revision 1.16  2004/05/31 22:51:19  gmartone
 changed for task 99533 (Composite Primary Key)

 Revision 1.15  2004/05/20 22:44:15  gmartone
 Changed for task 99073 (Coverage Javadocs)

 Revision 1.14  2004/05/18 18:18:47  gmartone
 resolved bug 953273 and changed javadocs

 Revision 1.13  2004/04/29 22:34:46  gmartone



 Task 66484 (Logging System)

 Revision 1.12  2004/01/25 00:32:58  giabac
 Correct banal error, otherwise it don't compile

 Revision 1.11  2004/01/22 00:11:31  gmartone




 Task 66484 (Logging System) added management of logs

 Revision 1.10  2003/10/30 15:44:08  lechertl
 cosmetic changes


*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚欧色一区w666天堂| 黄网站免费久久| 久久久午夜精品| 91麻豆国产福利在线观看| 日韩av网站免费在线| 国产色综合久久| 欧美老女人在线| 99久久99久久综合| 国产一区二区三区不卡在线观看| 一区二区三区四区视频精品免费 | 国产精品久久久久一区二区三区共 | 99久久99久久综合| 久久精品噜噜噜成人88aⅴ| 亚洲卡通欧美制服中文| 久久精品一区二区| 欧美v日韩v国产v| 欧美日本乱大交xxxxx| 国产成人精品亚洲日本在线桃色 | 91麻豆精品国产91久久久资源速度| 成人在线视频一区二区| 韩国精品主播一区二区在线观看| 性久久久久久久| 玉足女爽爽91| 亚洲六月丁香色婷婷综合久久| 欧美激情在线看| 久久精品综合网| 久久尤物电影视频在线观看| 91麻豆精品国产91久久久久久| 在线精品视频免费播放| 色哟哟欧美精品| 99国产精品一区| 99热在这里有精品免费| 暴力调教一区二区三区| 国产精品99久| 国产大片一区二区| 国产精品一区二区黑丝| 国内国产精品久久| 久久精品国产第一区二区三区| 午夜精品久久久久久久| 亚洲成人免费看| 午夜精品一区在线观看| 亚洲r级在线视频| 一区二区在线观看av| 亚洲久草在线视频| 亚洲国产日韩综合久久精品| 一区二区三区欧美| 亚洲国产成人porn| 日韩高清欧美激情| 另类综合日韩欧美亚洲| 国内久久精品视频| 国产·精品毛片| 99国产精品久久久| 日本韩国精品在线| 欧美日本一区二区三区四区 | 中文字幕第一页久久| 国产精品久久三| 亚洲老妇xxxxxx| 亚洲不卡一区二区三区| 免费精品视频最新在线| 精品在线亚洲视频| 成人动漫在线一区| 一本大道久久a久久综合婷婷| 欧美色男人天堂| 日韩一级片在线观看| 欧美mv日韩mv| 国产精品美女久久久久久久| 一区二区三区影院| 久久精品国产一区二区三区免费看 | 岛国一区二区三区| 91社区在线播放| 色88888久久久久久影院野外| 欧美三级在线看| 91精品在线观看入口| 久久久精品tv| 亚洲尤物在线视频观看| 久久er精品视频| 91理论电影在线观看| 欧美肥妇free| 国产精品免费观看视频| 亚洲成av人片www| 国产成人在线看| 精品视频一区三区九区| 26uuu亚洲| 一区二区三区丝袜| 精品无码三级在线观看视频| 99久久精品国产观看| 欧美一区二区精品在线| 国产精品电影一区二区| 亚洲r级在线视频| caoporen国产精品视频| 欧美一区二区三区免费大片| 中文字幕一区二区三区蜜月 | 精品一区二区精品| 色综合久久88色综合天天6| 日韩免费观看2025年上映的电影 | 97久久久精品综合88久久| 欧美一级欧美一级在线播放| 国产精品久久福利| 老司机精品视频在线| 欧美在线短视频| 国产日韩v精品一区二区| 婷婷久久综合九色综合绿巨人| 成人在线综合网站| 日韩欧美在线影院| 亚洲猫色日本管| 国产精品自拍在线| 欧美一区三区二区| 亚洲综合网站在线观看| 国产成人免费视| 欧美一区午夜精品| 亚洲午夜精品在线| 波多野结衣欧美| 久久精品这里都是精品| 麻豆精品国产传媒mv男同| 91久久精品一区二区| 国产精品久久久久久久裸模| 久久99精品久久只有精品| 欧美日本精品一区二区三区| 亚洲色图.com| 99精品视频一区| 国产精品每日更新| 丰满少妇在线播放bd日韩电影| 欧美一级淫片007| 婷婷激情综合网| 欧美日韩电影一区| 亚洲综合丝袜美腿| 在线观看日韩高清av| 亚洲免费观看视频| 成人18视频在线播放| 国产日韩欧美激情| 国产v综合v亚洲欧| 久久综合精品国产一区二区三区| 久久精品国产久精国产| 日韩欧美色综合| 久热成人在线视频| 日韩一区二区精品葵司在线| 蜜芽一区二区三区| 日韩一区二区三区在线观看 | 亚洲国产wwwccc36天堂| 欧美自拍丝袜亚洲| 一区二区三区丝袜| 欧美日韩中文字幕精品| 日日夜夜免费精品| 91精品国产全国免费观看| 日韩国产精品久久久久久亚洲| 91精品黄色片免费大全| 日韩黄色小视频| 精品国产乱码久久久久久久| 久草精品在线观看| 久久久久久一级片| 成人午夜激情视频| 亚洲人精品午夜| 欧美日韩一区二区三区高清 | 日本亚洲免费观看| 日韩精品影音先锋| 国产在线精品一区二区三区不卡 | 国产suv一区二区三区88区| 国产精品毛片久久久久久久| 91免费版在线| 亚洲18影院在线观看| 日韩三级伦理片妻子的秘密按摩| 国产一区二区免费看| 1区2区3区国产精品| 色噜噜狠狠成人网p站| 日韩精品国产欧美| 久久久精品综合| 在线欧美日韩国产| 久久99热这里只有精品| 国产丝袜美腿一区二区三区| 色婷婷av一区| 美美哒免费高清在线观看视频一区二区| 久久久久久久久99精品| 色哟哟在线观看一区二区三区| 天堂精品中文字幕在线| 久久奇米777| 成人avav影音| 美女性感视频久久| 亚洲视频狠狠干| 欧美一级欧美一级在线播放| caoporn国产精品| 日本不卡一二三区黄网| 国产精品高潮呻吟| 欧美一区二区三区性视频| 成人激情小说网站| 午夜av一区二区三区| 欧美激情一区二区三区不卡| 欧美亚洲免费在线一区| 国产一区二区三区黄视频| 亚洲一区在线免费观看| 国产午夜一区二区三区| 欧美日韩久久久一区| 风间由美中文字幕在线看视频国产欧美 | 欧美mv日韩mv亚洲| 色av一区二区| 国产福利不卡视频| 青青国产91久久久久久 | 蜜桃视频一区二区三区| 一区二区三区在线观看动漫| 国产午夜精品一区二区三区嫩草| 在线成人av网站|