Package org.ofbiz.base.util.collections

Examples of org.ofbiz.base.util.collections.FlexibleMapAccessor


       
        List orderByElementList = UtilXml.childElementList(element, "order-by");
        Iterator orderByElementIter = orderByElementList.iterator();
        while (orderByElementIter.hasNext()) {
            Element orderByElement = (Element) orderByElementIter.next();
            this.orderByAcsrList.add(new FlexibleMapAccessor(orderByElement.getAttribute("field-name")));
        }

        this.mc = new MapComparator(this.orderByAcsrList);
    }
View Full Code Here


    protected void init(String name) {
        this.name = name;
        if (name == null || name.length() == 0) {
            empty = true;
            needsExpand = false;
            fma = new FlexibleMapAccessor(name);
        } else {
            empty = false;
            int openPos = name.indexOf("${");
            if (openPos != -1 && name.indexOf("}", openPos) != -1) {
                fma = null;
                needsExpand = true;
            } else {
                fma = new FlexibleMapAccessor(name);
                needsExpand = false;
            }
        }
    }
View Full Code Here

    }
   
    /** Based on name get from Map or from List in Map */
    public Object get(Map theMap, MethodContext methodContext) {
        if (this.needsExpand) {
            FlexibleMapAccessor fma = new FlexibleMapAccessor(methodContext.expandString(name));
            return fma.get(theMap);
        } else {
            return fma.get(theMap);
        }
    }
View Full Code Here

     * If a "+" (plus sign) is included inside the square brackets before the index
     * number the value will inserted/added at that point instead of set at the point.
     */
    public void put(Map theMap, Object value, MethodContext methodContext) {
        if (this.needsExpand) {
            FlexibleMapAccessor fma = new FlexibleMapAccessor(methodContext.expandString(name));
            fma.put(theMap, value);
        } else {
            fma.put(theMap, value);
        }
    }
View Full Code Here

    }
   
    /** Based on name remove from Map or from List in Map */
    public Object remove(Map theMap, MethodContext methodContext) {
        if (this.needsExpand) {
            FlexibleMapAccessor fma = new FlexibleMapAccessor(methodContext.expandString(name));
            return fma.remove(theMap);
        } else {
            return fma.remove(theMap);
        }
    }
View Full Code Here

    /**
     * @param string
     */
    public void setEntryName(String string) {
        entryAcsr = new FlexibleMapAccessor(string);
    }
View Full Code Here

    /**
     * @param string
     */
    public void setMapName(String string) {
        this.mapAcsr = new FlexibleMapAccessor(string);
    }
View Full Code Here

    public EntityCount(Element element, SimpleMethod simpleMethod) {
        super(element, simpleMethod);
        this.entityNameExdr = new FlexibleStringExpander(element.getAttribute("entity-name"));
        this.delegatorNameExdr = new FlexibleStringExpander(element.getAttribute("delegator-name"));
        this.countAcsr = new FlexibleMapAccessor(element.getAttribute("count-name"));
       
        // process condition-expr | condition-list
        Element conditionExprElement = UtilXml.firstChildElement(element, "condition-expr");
        Element conditionListElement = UtilXml.firstChildElement(element, "condition-list");
        Element conditionObjectElement = UtilXml.firstChildElement(element, "condition-object");
View Full Code Here

     * @param key The name of the environment value to get. Can contain "." and "[]" syntax elements as described above.
     * @return The environment value if found, otherwise null.
     */
    public Object getEnv(String key) {
        String ekey = this.expandString(key);
        FlexibleMapAccessor fma = new FlexibleMapAccessor(ekey);
        return this.getEnv(fma);
    }
View Full Code Here

     * @param key The name of the environment value to get. Can contain "." syntax elements as described above.
     * @param value The value to set in the named environment location.
     */
    public void putEnv(String key, Object value) {
        String ekey = this.expandString(key);
        FlexibleMapAccessor fma = new FlexibleMapAccessor(ekey);
        this.putEnv(fma, value);
    }
View Full Code Here

TOP

Related Classes of org.ofbiz.base.util.collections.FlexibleMapAccessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.