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

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

?? datafactory.java

?? 這是一個(gè)用來取代structs的結(jié)構(gòu)
?? JAVA
字號(hào):
package com.base;

import java.util.Vector;
import java.util.HashMap;
import java.util.Iterator;
import java.lang.reflect.Method;
import com.base.SysException;
import com.erpbase.general.Log;
import com.erpbase.util.StringUtility;
//import com.waveful.cargoflow.bl.commonaudit.EventData;
//import com.waveful.cargoflow.bl.commonaudit.AuditEventData;

public class DataFactory
{
	static HashMap hashFields;

	/**
	 *功能:從jsp頁面中得到所有的AuditEventData對(duì)象
	 *說明:如果jsp中沒有定義審核流程,則此處會(huì)返回一個(gè)null
	 */
	 /*
	public static AuditEventData getAuditEvent(CommonData comData)
	{
		AuditEventData aevData = new AuditEventData();
		String strHas_audit_event = comData.getValue("has_audit_event");//是否有審核流程
		if(!StringUtility.isNull(strHas_audit_event) && strHas_audit_event.equals("Y"))//有審核流程
		{
			aevData.setMenuCode(comData.getMenuCode());
			aevData.setCorporation(comData.getCor_id());
			aevData.setTableName(comData.getValue("audit_event_table"));//審核事件需要記錄的表
			String strAuditEvent = comData.getValue("audit_event_id");
			aevData.setEventId(strAuditEvent);//用戶選擇的審核事件號(hào)
			aevData.setNotneedAudit(comData.getValue("no_audit"));//用戶是否設(shè)置為無需審核

			String[] strRlt_order = comData.getValues("rlt_order:"+strAuditEvent);//審核流水順序
			String[] strAuthRole = comData.getValues("auth_role:"+strAuditEvent); //得到接收方的角色編碼(審核/核定)
			String[] strRoleName = comData.getValues("role_name:"+strAuditEvent); //得到接收方的角色名稱(審核/核定)
			String[] strAuditerName = comData.getValues("s_type:"+strAuditEvent); //得到接收方名稱(人/職務(wù)的名稱)
			String[] strAuditerCode = comData.getValues("toid:"+strAuditEvent); //得到接收方編碼(人或職務(wù)的編碼)
			String[] strDayArray = comData.getValues("day:"+strAuditEvent); //得到轉(zhuǎn)發(fā)的天數(shù)
			String[] strHourArray = comData.getValues("hour:"+strAuditEvent); //得到轉(zhuǎn)發(fā)的小時(shí)數(shù)
			String[] strTransferCode = comData.getValues("fwtoid:"+strAuditEvent); //得到轉(zhuǎn)發(fā)的接收人編碼
			String[] strTransferName = comData.getValues("fwtoname:"+strAuditEvent); //得到轉(zhuǎn)發(fā)的接收人姓名
			Vector vctEventData = new Vector();
			for (int loop=0; loop<strRlt_order.length; loop++)
			{
				EventData eventData = new EventData();
				eventData.setRlt_order(strRlt_order[loop]);
				eventData.setAuthRole(strAuthRole[loop]);
				eventData.setRoleName(strRoleName[loop]);
				eventData.setDayArray(strDayArray[loop]);
				eventData.setHourArray(strHourArray[loop]);
				eventData.setTransferCode(strTransferCode[loop]);
				eventData.setTransferName(strTransferName[loop]);
				eventData.setAuditerName(strAuditerName[loop]);
				eventData.setAuditerCode(strAuditerCode[loop]);
				vctEventData.addElement(eventData);
			}
			aevData.setEventData(vctEventData);
		}
		else aevData.setNotneedAudit("N");
		return aevData;
	}*/

	/**
	 *功能:從前臺(tái)得到所有的輸入數(shù)據(jù),并且保存在Ojbect中,并且返回此Object
	 *說明:如果要從頁面中一個(gè)input對(duì)象,name="object_id"的對(duì)象存放物品名稱
	 *則Object中必須要有一個(gè)setObject_id(String str)的方法,否則將不能保存
	 *相關(guān)數(shù)據(jù),在保存時(shí),會(huì)自動(dòng)查找所有的set方法,并且會(huì)在前臺(tái)的jsp頁面中
	 *定義了相關(guān)的對(duì)象才會(huì)把數(shù)據(jù)保存進(jìn)來
	 */
	public static Object getData(CommonData comData, Object obj)throws SysException
	{
        try
		{
			HashMap mapFields = comData.getFieldMap();
			HashMap mapMethods = getMapMethod(mapFields, obj);
   			Iterator iterKeys = (mapMethods.keySet()).iterator();
			while(iterKeys.hasNext())
			{
				String strKey = (String)iterKeys.next();
				String strFieldName = (String)mapFields.get(strKey);
	   			String strValue = comData.getValue(strFieldName);
				Method theMethod = (Method)mapMethods.get(strKey);
				Object[] objValue = {strValue};
				theMethod.invoke(obj, objValue);
			}
		}
		catch(Exception ex)
		{
		    Log.printDebug("ssssssssssssssss  Exception(getData)  sssssssssssssss");
		    Log.printException(ex);
            throw new SysException("throw Exception caused by<br>執(zhí)行方法getData()時(shí)發(fā)生系統(tǒng)錯(cuò)誤!"+ex.getCause().getMessage());
		}
		return obj;
	}

	/**
	 *功能:從前臺(tái)得到所有的輸入數(shù)據(jù),并且保存在Ojbect中,并且返回此Object
	 *說明:如果要從頁面中一個(gè)input對(duì)象,name="object_id"的對(duì)象存放物品名稱
	 *則Object中必須要有一個(gè)setObject_id(String str)的方法,否則將不能保存
	 *相關(guān)數(shù)據(jù),在保存時(shí),會(huì)自動(dòng)查找所有的set方法,并且會(huì)在前臺(tái)的jsp頁面中
	 *定義了相關(guān)的對(duì)象才會(huì)把數(shù)據(jù)保存進(jìn)來
	 @param strExceptObjects 指不包含的對(duì)象,就是不包含的對(duì)象,如jsp中有一個(gè)對(duì)象
	 abc_code,如果不想把此值通過obj中的方法setAbc_code()保存到對(duì)象中
	 */
	public static Object getData(CommonData comData, Object obj, String strExceptObjects)
		throws SysException
	{
        try
		{
			if(StringUtility.isNull(strExceptObjects)) strExceptObjects = "";
			HashMap mapFields = comData.getFieldMap();
			HashMap mapMethods = getMapMethod(mapFields, obj);
   			Iterator iterKeys = (mapMethods.keySet()).iterator();
			while(iterKeys.hasNext())
			{
				String strKey = (String)iterKeys.next();
				String strFieldName = (String)mapFields.get(strKey);
				if(strExceptObjects.indexOf(strFieldName)>=0) continue;
	   			String strValue = comData.getValue(strFieldName);
				Method theMethod = (Method)mapMethods.get(strKey);
				Object[] objValue = {strValue};
				theMethod.invoke(obj, objValue);
			}
		}
		catch(Exception ex)
		{
		    Log.printDebug("ssssssssssssssss  Exception(getData)  sssssssssssssss");
		    Log.printException(ex);
            throw new SysException("throw Exception caused by<br>執(zhí)行方法getData()時(shí)發(fā)生系統(tǒng)錯(cuò)誤!"+ex.getCause().getMessage());
		}
		return obj;
	}

	/**
	 @function:
	 *說明:如前臺(tái)的jsp頁面中定義多個(gè)名為object_id的對(duì)象,Object中的有一個(gè)setObject_id()
	 *的方法
	 @return 返回的Vector中的每一個(gè)元素都是一個(gè)Object對(duì)象,并且已經(jīng)把頁面中的值存放
	 在此對(duì)象中
	 */
	public static Vector getDatas(CommonData comData, Object obj)throws SysException
	{
		Vector vctData = new Vector();
        try
		{
            //得到所有需要存放值的方法
			HashMap mapMethods = getMapMethod(comData.getFieldMap(), obj);
			//從前臺(tái)得到所有的值
			HashMap mapValues = comData.getValues(hashFields);
			int iValuesLength = comData.getValuesLength();
   			for(int loop=0; loop<iValuesLength; loop++)
   			{
	   			Object oneObj = obj.getClass().newInstance();
                Iterator iterKeyMap = (mapValues.keySet()).iterator();
       			while(iterKeyMap.hasNext())
       			{
                    String strKey = (String)iterKeyMap.next();
                    String[] strValues = (String[])mapValues.get(strKey);
                    if( strValues.length>loop)
                    {
    					Method theMethod = (Method)mapMethods.get(strKey);
    					String strValue = strValues[loop];
                        //Log.printDebug("在getDatas方法中strKey="+strKey+" || strValue="+strValue);
						Object[] objValue = {strValue};
    					theMethod.invoke(oneObj, objValue);
                    }
				}
				vctData.addElement(oneObj);
			}
		}
		catch(Exception ex)
		{
		    Log.printDebug("ssssssssssssss Exception(getDatas) sssssssssssssss");
		    Log.printException(ex);
            throw new SysException("throw Exception caused by<br>執(zhí)行方法getDatas()時(shí)發(fā)生系統(tǒng)錯(cuò)誤!"+ex.getCause().getMessage());
		}
		return vctData;
	}

	/**
	 @function:
	 *說明:如前臺(tái)的jsp頁面中定義多個(gè)名為object_id的對(duì)象,Object中的有一個(gè)setObject_id()
	 *的方法
	 @return 返回的Vector中的每一個(gè)元素都是一個(gè)Object對(duì)象,并且已經(jīng)把頁面中的值存放
	 在此對(duì)象中
	 */
	public static Vector getDatas(CommonData comData, Object obj, String strExceptObjects)
		throws SysException
	{
		Vector vctData = new Vector();
        if(StringUtility.isNull(strExceptObjects)) strExceptObjects = "";
		try
		{
            //得到所有需要存放值的方法
			HashMap mapMethods = getMapMethod(comData.getFieldMap(), obj);
			//從前臺(tái)得到所有的值
			HashMap mapValues = comData.getValues(hashFields);
			int iValuesLength = comData.getValuesLength();
   			for(int loop=0; loop<iValuesLength; loop++)
   			{
	   			Object oneObj = obj.getClass().newInstance();
                Iterator iterKeyMap = (mapValues.keySet()).iterator();
       			while(iterKeyMap.hasNext())
       			{
                    String strKey = (String)iterKeyMap.next();
                    if(strExceptObjects.indexOf(strKey)>=0) continue;
                    String[] strValues = (String[])mapValues.get(strKey);
                    if( strValues.length>loop)
                    {
    					Method theMethod = (Method)mapMethods.get(strKey);
    					String strValue = strValues[loop];
                        //Log.printDebug("在getDatas方法中strKey="+strKey+" || strValue="+strValue);
						Object[] objValue = {strValue};
    					theMethod.invoke(oneObj, objValue);
                    }
				}
				vctData.addElement(oneObj);
			}
		}
		catch(Exception ex)
		{
		    Log.printDebug("ssssssssssssss Exception(getDatas) sssssssssssssss");
		    Log.printException(ex);
            throw new SysException("throw Exception caused by<br>執(zhí)行方法getDatas()時(shí)發(fā)生系統(tǒng)錯(cuò)誤!"+ex.getCause().getMessage());
		}
		return vctData;
	}

	/**
	 *功能:得到所有前臺(tái)jsp頁面中有request field對(duì)應(yīng)的所有的方法
	 @param mapFields中存放所有前臺(tái)的input對(duì)象,包括通過url進(jìn)行的參數(shù)傳遞
	 */
	private static HashMap getMapMethod(HashMap mapFields, Object obj)
	{
        hashFields = new HashMap();
        HashMap mapMethods = new HashMap();
        Class thisClass = obj.getClass();
        getClassMethod( mapFields,thisClass,mapMethods);
        Class superClass1 = thisClass.getSuperclass();
        if( superClass1!=null && !superClass1.getName().equals("java.lang.Object"))
        {
            getClassMethod( mapFields,superClass1,mapMethods);
            Class superClass2 = superClass1.getSuperclass();
            if( superClass2!=null && !superClass2.getName().equals("java.lang.Object"))
                getClassMethod( mapFields,superClass2,mapMethods);
        }
		return mapMethods;
	}
   /**
    * 功能:獲得類對(duì)象中的與前臺(tái)jsp頁面字段對(duì)應(yīng)的set方法
    *
    */
    private static void getClassMethod( HashMap mapFields, Class cla,HashMap mapMethods)
    {
        Method[] classMethod = cla.getDeclaredMethods();
		for(int outLoop=0; outLoop< classMethod.length; outLoop++)
		{
            String strMethodName = ( classMethod[outLoop]).getName();
			if(strMethodName.startsWith("set"))
			{
                strMethodName = strMethodName.substring(3).toLowerCase();
                String strMethodNameLower = strMethodName;
				strMethodNameLower = strMethodNameLower.toLowerCase();
				if(mapFields.containsKey(strMethodNameLower))
				{
                	mapMethods.put(strMethodNameLower,  classMethod[outLoop]);
                    hashFields.put(strMethodNameLower, (String)mapFields.get(strMethodNameLower));
				}
			}
		}
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩电影在线看| 久久av资源网| 欧美成人a∨高清免费观看| 紧缚奴在线一区二区三区| 国产精品久久久久永久免费观看 | 91啪亚洲精品| 理论电影国产精品| 一区二区三区在线视频免费| 欧美日韩一区国产| 国产成人午夜电影网| 偷拍与自拍一区| 中文字幕日韩一区| 日韩美一区二区三区| 91丨国产丨九色丨pron| 激情久久久久久久久久久久久久久久| 久久久久久99精品| 在线不卡免费欧美| a亚洲天堂av| 国产美女精品一区二区三区| 国产精品三级av| 日韩三级av在线播放| 色综合视频在线观看| 国产一区二区中文字幕| 午夜国产精品一区| 亚洲精品视频在线| 久久久五月婷婷| 欧美一区中文字幕| 欧美在线一二三| 成人av中文字幕| 国产一区二区影院| 另类调教123区| 日本中文字幕一区二区有限公司| 国产精品欧美久久久久无广告| 欧美一区二区福利视频| 在线观看免费视频综合| 不卡一区在线观看| 国产精品一区二区久久不卡| 视频在线在亚洲| 天堂在线一区二区| 亚洲第一电影网| 亚洲高清在线视频| 亚洲自拍与偷拍| 亚洲日本中文字幕区| 中文字幕亚洲综合久久菠萝蜜| 久久久五月婷婷| 久久久无码精品亚洲日韩按摩| 精品国产乱码久久久久久影片| 欧美一级精品在线| 91麻豆精品国产综合久久久久久| 欧洲一区二区av| 日本高清不卡aⅴ免费网站| av激情亚洲男人天堂| 不卡的电影网站| 久久成人av少妇免费| 男男视频亚洲欧美| 美女在线视频一区| 蜜桃av一区二区在线观看| 免费成人你懂的| 韩国一区二区三区| 国产91精品免费| 国产精品白丝jk黑袜喷水| 国产精品中文字幕日韩精品 | 久久久久久久av麻豆果冻| xnxx国产精品| 中文字幕不卡的av| 亚洲视频在线观看一区| 国产精品亲子乱子伦xxxx裸| 亚洲欧洲日韩女同| 亚洲自拍偷拍麻豆| 日一区二区三区| 美腿丝袜在线亚洲一区| 国产精品一二三四区| 国产精品69毛片高清亚洲| aaa欧美大片| 欧美日韩一二三| 日韩欧美一区中文| 久久你懂得1024| 亚洲视频 欧洲视频| 亚洲国产wwwccc36天堂| 激情五月激情综合网| 国产91清纯白嫩初高中在线观看| 97se亚洲国产综合自在线不卡| 欧美在线观看你懂的| 欧美一级欧美一级在线播放| 26uuu另类欧美| 亚洲欧美另类久久久精品| 婷婷夜色潮精品综合在线| 亚洲高清在线精品| 国产精品亚洲一区二区三区妖精 | 欧美日韩免费在线视频| 精品卡一卡二卡三卡四在线| 久久久精品免费观看| 亚洲乱码国产乱码精品精可以看| 婷婷夜色潮精品综合在线| 国产一区二区三区电影在线观看 | 从欧美一区二区三区| 欧美在线免费观看亚洲| 精品国产乱码久久| 一区二区在线观看不卡| 老司机午夜精品99久久| 99精品1区2区| 日韩欧美中文一区二区| 亚洲欧洲av在线| 日本成人中文字幕| 91在线小视频| 9191成人精品久久| 国产日产欧美一区| 日韩精品亚洲专区| 91在线视频免费观看| 精品国产乱码久久久久久老虎 | 国产精品一二三四| 日韩精品一区二区三区视频在线观看| 一区二区三区四区在线| 不卡av免费在线观看| 国产无人区一区二区三区| 老司机精品视频在线| 91精品蜜臀在线一区尤物| 亚洲在线视频一区| 欧美亚洲丝袜传媒另类| 亚洲嫩草精品久久| 97久久久精品综合88久久| 国产精品久久久久久久久久久免费看| 久久国产欧美日韩精品| 日韩欧美一区电影| 欧美aaaaa成人免费观看视频| 欧美色网一区二区| 性感美女极品91精品| 欧美图区在线视频| 亚洲成人一区在线| 欧美日韩一区二区三区在线| 亚洲一区二区五区| 欧美图片一区二区三区| 亚洲成人动漫在线免费观看| 欧美日韩一区中文字幕| 视频一区在线播放| 欧美一区二区三区免费大片| 蜜桃视频一区二区三区在线观看| 欧美一区二区视频在线观看2020 | 国产成a人亚洲| 国产三级精品三级在线专区| 成人午夜免费电影| 亚洲欧洲色图综合| 91福利在线观看| 午夜视黄欧洲亚洲| 日韩欧美成人一区二区| 国产一区二区三区在线看麻豆 | 奇米色777欧美一区二区| 日韩欧美在线123| 国产乱理伦片在线观看夜一区| 欧美精品一区二区三区四区| 懂色中文一区二区在线播放| 中文字幕亚洲视频| 欧美性猛交xxxx乱大交退制版| 视频在线在亚洲| www亚洲一区| kk眼镜猥琐国模调教系列一区二区| 亚洲激情图片一区| 欧美麻豆精品久久久久久| 久久精品国产999大香线蕉| 欧美激情艳妇裸体舞| 在线观看免费一区| 久久99久久久欧美国产| 国产精品丝袜久久久久久app| 色婷婷国产精品| 久久精品免费观看| 中文字幕一区二区5566日韩| 在线播放视频一区| 国产精品77777| 亚洲国产三级在线| 久久久三级国产网站| 欧美亚洲图片小说| 国产福利视频一区二区三区| 亚洲精品视频免费观看| 日韩一级二级三级| 99久久国产综合精品麻豆| 奇米四色…亚洲| 亚洲女与黑人做爰| 精品久久人人做人人爽| 色国产综合视频| 国产盗摄女厕一区二区三区| 亚洲妇女屁股眼交7| 久久精品在线免费观看| 欧美日韩国产另类一区| 国产精品一区二区免费不卡| 亚洲成人av一区| 国产人成亚洲第一网站在线播放| 欧美图片一区二区三区| 丁香激情综合国产| 乱一区二区av| 亚洲一级二级三级在线免费观看| 久久色视频免费观看| 欧美精选一区二区| 99久久er热在这里只有精品15 | 99久久久无码国产精品| 麻豆国产一区二区| 亚洲电影你懂得| 亚洲欧美日韩系列| 中文字幕成人网| 久久伊99综合婷婷久久伊| 91精品国产91综合久久蜜臀|