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

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

?? serviceutil.java

?? Sequoia ERP是一個真正的企業級開源ERP解決方案。它提供的模塊包括:電子商務應用(e-commerce), POS系統(point of sales),知識管理,存貨與倉庫管理
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * $Id: ServiceUtil.java 7027 2006-03-20 18:21:03Z jaz $ * * Copyright (c) 2001-2005 The Open For Business Project - www.ofbiz.org * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */package org.ofbiz.service;import java.sql.Timestamp;import java.util.Calendar;import java.util.Iterator;import java.util.LinkedList;import java.util.List;import java.util.Locale;import java.util.Map;import javax.servlet.http.HttpServletRequest;import javax.transaction.Transaction;import javolution.util.FastMap;import javolution.util.FastList;import org.ofbiz.base.util.Debug;import org.ofbiz.base.util.UtilDateTime;import org.ofbiz.base.util.UtilMisc;import org.ofbiz.base.util.UtilProperties;import org.ofbiz.base.util.UtilValidate;import org.ofbiz.entity.GenericDelegator;import org.ofbiz.entity.GenericEntityException;import org.ofbiz.entity.GenericValue;import org.ofbiz.entity.transaction.TransactionUtil;import org.ofbiz.entity.transaction.GenericTransactionException;import org.ofbiz.entity.condition.EntityCondition;import org.ofbiz.entity.condition.EntityConditionList;import org.ofbiz.entity.condition.EntityExpr;import org.ofbiz.entity.condition.EntityOperator;import org.ofbiz.entity.util.EntityFindOptions;import org.ofbiz.entity.util.EntityListIterator;import org.ofbiz.security.Security;import org.ofbiz.service.config.ServiceConfigUtil;/** * Generic Service Utility Class * * @author     <a href="mailto:jaz@ofbiz.org">Andy Zeneski</a> * @version    $Rev: 7027 $ * @since      2.0 */public class ServiceUtil {    public static final String module = ServiceUtil.class.getName();    public static final String resource = "ServiceErrorUiLabels";    /** A little short-cut method to check to see if a service returned an error */    public static boolean isError(Map results) {        if (results == null || results.get(ModelService.RESPONSE_MESSAGE) == null) {            return false;        }        return ModelService.RESPOND_ERROR.equals(results.get(ModelService.RESPONSE_MESSAGE));    }    public static boolean isFailure(Map results) {        if (results == null || results.get(ModelService.RESPONSE_MESSAGE) == null) {            return false;        }        return ModelService.RESPOND_FAIL.equals(results.get(ModelService.RESPONSE_MESSAGE));    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the error response code */    public static Map returnError(String errorMessage) {        return returnProblem(ModelService.RESPOND_ERROR, errorMessage, null, null, null);    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the error response code */    public static Map returnError(String errorMessage, List errorMessageList) {        return returnProblem(ModelService.RESPOND_ERROR, errorMessage, errorMessageList, null, null);    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the error response code */    public static Map returnError(List errorMessageList) {        return returnProblem(ModelService.RESPOND_ERROR, null, errorMessageList, null, null);    }    public static Map returnFailure(String errorMessage) {        return returnProblem(ModelService.RESPOND_FAIL, errorMessage, null, null, null);    }     public static Map returnFailure(List errorMessageList) {        return returnProblem(ModelService.RESPOND_FAIL, null, errorMessageList, null, null);    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the error response code, also forwards any error messages from the nestedResult */    public static Map returnError(String errorMessage, List errorMessageList, Map errorMessageMap, Map nestedResult) {        return returnProblem(ModelService.RESPOND_ERROR, errorMessage, errorMessageList, errorMessageMap, nestedResult);    }    public static Map returnProblem(String returnType, String errorMessage, List errorMessageList, Map errorMessageMap, Map nestedResult) {        Map result = FastMap.newInstance();        result.put(ModelService.RESPONSE_MESSAGE, returnType);        if (errorMessage != null) {            result.put(ModelService.ERROR_MESSAGE, errorMessage);        }        List errorList = new LinkedList();        if (errorMessageList != null) {            errorList.addAll(errorMessageList);        }        Map errorMap = FastMap.newInstance();        if (errorMessageMap != null) {            errorMap.putAll(errorMessageMap);        }        if (nestedResult != null) {            if (nestedResult.get(ModelService.ERROR_MESSAGE) != null) {                errorList.add(nestedResult.get(ModelService.ERROR_MESSAGE));            }            if (nestedResult.get(ModelService.ERROR_MESSAGE_LIST) != null) {                errorList.addAll((List) nestedResult.get(ModelService.ERROR_MESSAGE_LIST));            }            if (nestedResult.get(ModelService.ERROR_MESSAGE_MAP) != null) {                errorMap.putAll((Map) nestedResult.get(ModelService.ERROR_MESSAGE_MAP));            }        }        if (errorList.size() > 0) {            result.put(ModelService.ERROR_MESSAGE_LIST, errorList);        }        if (errorMap.size() > 0) {            result.put(ModelService.ERROR_MESSAGE_MAP, errorMap);        }        return result;    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the success response code */    public static Map returnSuccess(String successMessage) {        return returnMessage(ModelService.RESPOND_SUCCESS, successMessage);    }    /** A small routine used all over to improve code efficiency, make a result map with the message and the success response code */    public static Map returnSuccess() {        return returnMessage(ModelService.RESPOND_SUCCESS, null);    }    /** A small routine to make a result map with the message and the response code     * NOTE: This brings out some bad points to our message convention: we should be using a single message or message list     *  and what type of message that is should be determined by the RESPONSE_MESSAGE (and there's another annoyance, it should be RESPONSE_CODE)     */    public static Map returnMessage(String code, String message) {        Map result = FastMap.newInstance();        if (code != null) result.put(ModelService.RESPONSE_MESSAGE, code);        if (message != null) result.put(ModelService.SUCCESS_MESSAGE, message);        return result;    }    /** A small routine used all over to improve code efficiency, get the partyId and does a security check     *<b>security check</b>: userLogin partyId must equal partyId, or must have [secEntity][secOperation] permission     */    public static String getPartyIdCheckSecurity(GenericValue userLogin, Security security, Map context, Map result, String secEntity, String secOperation) {        String partyId = (String) context.get("partyId");        Locale locale = getLocale(context);        if (partyId == null || partyId.length() == 0) {            partyId = userLogin.getString("partyId");        }        // partyId might be null, so check it        if (partyId == null || partyId.length() == 0) {            result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);            String errMsg = UtilProperties.getMessage(ServiceUtil.resource, "serviceUtil.party_id_missing", locale) + ".";            result.put(ModelService.ERROR_MESSAGE, errMsg);            return partyId;        }        // <b>security check</b>: userLogin partyId must equal partyId, or must have PARTYMGR_CREATE permission        if (!partyId.equals(userLogin.getString("partyId"))) {            if (!security.hasEntityPermission(secEntity, secOperation, userLogin)) {                result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);                String errMsg = UtilProperties.getMessage(ServiceUtil.resource, "serviceUtil.no_permission_to_operation", locale) + ".";                result.put(ModelService.ERROR_MESSAGE, errMsg);                return partyId;            }        }        return partyId;    }    public static void setMessages(HttpServletRequest request, String errorMessage, String eventMessage, String defaultMessage) {        if (UtilValidate.isNotEmpty(errorMessage))            request.setAttribute("_ERROR_MESSAGE_", errorMessage);        if (UtilValidate.isNotEmpty(eventMessage))            request.setAttribute("_EVENT_MESSAGE_", eventMessage);        if (UtilValidate.isEmpty(errorMessage) && UtilValidate.isEmpty(eventMessage) && UtilValidate.isNotEmpty(defaultMessage))            request.setAttribute("_EVENT_MESSAGE_", defaultMessage);    }    public static void getMessages(HttpServletRequest request, Map result, String defaultMessage) {        getMessages(request, result, defaultMessage, null, null, null, null, null, null);    }    public static void getMessages(HttpServletRequest request, Map result, String defaultMessage,                                   String msgPrefix, String msgSuffix, String errorPrefix, String errorSuffix, String successPrefix, String successSuffix) {        String errorMessage = ServiceUtil.makeErrorMessage(result, msgPrefix, msgSuffix, errorPrefix, errorSuffix);        String successMessage = ServiceUtil.makeSuccessMessage(result, msgPrefix, msgSuffix, successPrefix, successSuffix);        setMessages(request, errorMessage, successMessage, defaultMessage);    }    public static String getErrorMessage(Map result) {        StringBuffer errorMessage = new StringBuffer();        if (result.get(ModelService.ERROR_MESSAGE) != null) errorMessage.append((String) result.get(ModelService.ERROR_MESSAGE));        if (result.get(ModelService.ERROR_MESSAGE_LIST) != null) {            List errors = (List) result.get(ModelService.ERROR_MESSAGE_LIST);            Iterator errorIter = errors.iterator();            while (errorIter.hasNext()) {                // NOTE: this MUST use toString and not cast to String because it may be a MessageString object                String curMessage = errorIter.next().toString();                if (errorMessage.length() > 0) {                    errorMessage.append(", ");                }                errorMessage.append(curMessage);            }        }        return errorMessage.toString();    }    public static String makeErrorMessage(Map result, String msgPrefix, String msgSuffix, String errorPrefix, String errorSuffix) {        if (result == null) {            Debug.logWarning("A null result map was passed", module);            return null;        }        String errorMsg = (String) result.get(ModelService.ERROR_MESSAGE);        List errorMsgList = (List) result.get(ModelService.ERROR_MESSAGE_LIST);        Map errorMsgMap = (Map) result.get(ModelService.ERROR_MESSAGE_MAP);        StringBuffer outMsg = new StringBuffer();        if (errorMsg != null) {            if (msgPrefix != null) outMsg.append(msgPrefix);            outMsg.append(errorMsg);            if (msgSuffix != null) outMsg.append(msgSuffix);        }        outMsg.append(makeMessageList(errorMsgList, msgPrefix, msgSuffix));        if (errorMsgMap != null) {            Iterator mapIter = errorMsgMap.entrySet().iterator();            while (mapIter.hasNext()) {                Map.Entry entry = (Map.Entry) mapIter.next();                outMsg.append(msgPrefix);                outMsg.append(entry.getKey());                outMsg.append(": ");                outMsg.append(entry.getValue());                outMsg.append(msgSuffix);            }        }        if (outMsg.length() > 0) {            StringBuffer strBuf = new StringBuffer();            if (errorPrefix != null) strBuf.append(errorPrefix);            strBuf.append(outMsg.toString());            if (errorSuffix != null) strBuf.append(errorSuffix);            return strBuf.toString();        } else {            return null;        }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美老女人在线| 99久久久精品免费观看国产蜜| 日韩精品一区二区在线观看| 国产成人综合在线观看| 一区二区国产盗摄色噜噜| 精品不卡在线视频| 91国偷自产一区二区三区观看| 黄页网站大全一区二区| 亚洲图片自拍偷拍| 国产欧美日韩卡一| 9191国产精品| 色综合久久综合网欧美综合网| 精品一区二区三区免费视频| 亚洲综合色网站| 国产精品免费看片| 欧美成人精精品一区二区频| 欧美亚洲尤物久久| av不卡免费在线观看| 九九九精品视频| 国产乱对白刺激视频不卡| 日韩av中文字幕一区二区| 一区二区三区免费看视频| 亚洲综合偷拍欧美一区色| 亚洲成人动漫在线免费观看| 亚洲精品水蜜桃| 中文字幕一区二区三中文字幕| 久久久一区二区三区| 日韩美女在线视频 | 欧美一区二区三区免费| 色哟哟一区二区在线观看| 欧美午夜片在线观看| 91精品国产色综合久久| 久久综合一区二区| 日韩免费观看2025年上映的电影| xf在线a精品一区二区视频网站| 国产亚洲污的网站| 久久综合狠狠综合| 中文字幕视频一区| 丝袜a∨在线一区二区三区不卡| 亚洲一区二区三区四区在线观看 | 国产亚洲短视频| 国产精品第13页| 中文字幕乱码亚洲精品一区| 久久久欧美精品sm网站| 日韩美女久久久| 亚洲精品大片www| 蜜桃av噜噜一区| 久久精品国产一区二区三区免费看 | 91精品国产免费| 国产日韩欧美激情| 亚洲国产精品一区二区尤物区| 精品一区二区在线免费观看| 99在线精品免费| 日韩网站在线看片你懂的| 日韩欧美资源站| 亚洲色图在线播放| 久久国产精品免费| 91黄色激情网站| 国产欧美一区二区精品忘忧草| 亚洲国产视频网站| 成人av动漫在线| 色视频欧美一区二区三区| 精品日韩99亚洲| 亚洲韩国一区二区三区| 高清shemale亚洲人妖| 91伊人久久大香线蕉| 欧美羞羞免费网站| 亚洲国产精品精华液ab| 色视频成人在线观看免| 精品国产乱码久久久久久闺蜜| 亚洲精品ww久久久久久p站| 激情伊人五月天久久综合| 欧美在线小视频| 91精品欧美久久久久久动漫 | 欧美一区二区观看视频| 亚洲人成精品久久久久| 亚洲成国产人片在线观看| 高清日韩电视剧大全免费| 日韩久久精品一区| 亚洲夂夂婷婷色拍ww47| 波多野结衣一区二区三区 | 亚洲精品中文字幕在线观看| 国产精品一区二区三区乱码 | 中文字幕亚洲电影| 国产精品综合视频| 日韩亚洲电影在线| 婷婷中文字幕一区三区| 激情综合五月婷婷| 9191成人精品久久| 亚洲h在线观看| 在线免费观看日韩欧美| 亚洲人成网站影音先锋播放| 丁香另类激情小说| 91精品久久久久久蜜臀| 午夜成人免费电影| 欧美亚洲国产怡红院影院| 亚洲免费毛片网站| 色婷婷av一区二区三区软件| 国产精品久久久久久久久免费樱桃| 国产精品亚洲专一区二区三区| 91精品视频网| 免费观看日韩av| 在线观看网站黄不卡| |精品福利一区二区三区| eeuss影院一区二区三区| 国产精品久久久爽爽爽麻豆色哟哟 | 午夜精品视频在线观看| 精品视频1区2区3区| 国产亲近乱来精品视频| 国产精品一区二区久久不卡| 久久久久国产一区二区三区四区| 国产米奇在线777精品观看| 欧美专区日韩专区| 亚洲成人动漫在线观看| 在线不卡免费av| 久久成人久久爱| 久久先锋资源网| 国产91丝袜在线观看| 国产精品每日更新| 91高清视频在线| 亚洲成a人v欧美综合天堂| 欧美一区二区三区色| 国产在线精品一区二区不卡了| 欧美国产日韩在线观看| 色综合久久久久综合| 偷窥少妇高潮呻吟av久久免费| 91精品国模一区二区三区| 国精品**一区二区三区在线蜜桃| 国产人伦精品一区二区| 色综合天天天天做夜夜夜夜做| 久久综合色天天久久综合图片| 国产成人激情av| 亚洲久本草在线中文字幕| 欧美日精品一区视频| 另类调教123区| 中文字幕精品综合| 欧美三片在线视频观看| 免费观看在线色综合| 国产精品久久久久久一区二区三区 | 亚洲天堂网中文字| 欧美丝袜丝交足nylons| 精油按摩中文字幕久久| 国产精品福利影院| 欧美二区在线观看| 国产又粗又猛又爽又黄91精品| 亚洲欧洲精品成人久久奇米网| 欧美日韩国产bt| 日韩精品一级中文字幕精品视频免费观看| 日韩免费视频一区| 91丨porny丨蝌蚪视频| 婷婷中文字幕一区三区| 欧美国产日韩一二三区| 欧美中文一区二区三区| 国产一区不卡精品| 一级女性全黄久久生活片免费| 欧美tk丨vk视频| 色婷婷国产精品综合在线观看| 久久99久久精品| 亚洲一区二区三区四区不卡| 久久久综合九色合综国产精品| 欧美撒尿777hd撒尿| 成人一区在线观看| 日本在线播放一区二区三区| 亚洲私人黄色宅男| 精品国产乱码久久久久久久久 | 精品国产污污免费网站入口| 91色|porny| 国产精品一线二线三线| 亚洲成人精品在线观看| 亚洲人成精品久久久久久| 久久久久久**毛片大全| 日韩一区二区在线观看| 91九色02白丝porn| 福利一区福利二区| 极品尤物av久久免费看| 香蕉成人啪国产精品视频综合网 | 久久国产人妖系列| 亚洲一区av在线| 亚洲欧洲99久久| 国产亚洲一区二区三区四区| 日韩三级av在线播放| 欧美视频一区二区三区在线观看 | 久久精品亚洲精品国产欧美kt∨| 欧美日本韩国一区二区三区视频 | 久久精品一区二区三区av| 4438成人网| 欧美日韩一区二区三区在线| 91视频在线观看免费| 成人免费va视频| 国产乱妇无码大片在线观看| 麻豆视频观看网址久久| 天天免费综合色| 亚洲成人av在线电影| 亚洲男同1069视频| 亚洲欧洲精品天堂一级 | www.色综合.com| 成人午夜视频网站| 国产福利精品导航| 国产精品一级黄| 国产成人三级在线观看|