Package org.amplafi.flow

Examples of org.amplafi.flow.DataClassDefinition


    protected Map<? extends K, ? extends V> doDeserialize(FlowPropertyProvider flowPropertyProvider, FlowPropertyDefinition flowPropertyDefinition, DataClassDefinition dataClassDefinition, Object serializedObject) {
        JSONObject jsonObject = JSONObject.toJsonObject(serializedObject);
        Map<K, V> map = new LinkedHashMap<K, V>();
        for(String key : jsonObject.keys() ) {
            Object object = jsonObject.get(key);
            DataClassDefinition keyDataClassDefinition = dataClassDefinition.getKeyDataClassDefinition();
            K realKey = (K) keyDataClassDefinition.deserialize(flowPropertyProvider, flowPropertyDefinition, key);
            DataClassDefinition elementDataClassDefinition = dataClassDefinition.getElementDataClassDefinition();
            V realValue = (V) elementDataClassDefinition.deserialize(flowPropertyProvider, flowPropertyDefinition, object);
            map.put(realKey, realValue);
        }
        return map;
    }
View Full Code Here


        if ( MapUtils.isNotEmpty(map) ) {
            for(Map.Entry<? extends K, ? extends V> entry: map.entrySet()) {
                K key = entry.getKey();
                V value = entry.getValue();
                if ( key != null && value != null) {
                    DataClassDefinition keyDataClassDefinition = dataClassDefinition.getKeyDataClassDefinition();
                    jsonWriter.key(keyDataClassDefinition.serialize(flowPropertyDefinition, key).toString());
                    dataClassDefinition.getElementDataClassDefinition().serialize(flowPropertyDefinition, jsonWriter, value);
                }
            }
        }
        return jsonWriter.endObject();
View Full Code Here

TOP

Related Classes of org.amplafi.flow.DataClassDefinition

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.