Package com.google.appengine.datanucleus.Utils

Examples of com.google.appengine.datanucleus.Utils.Function


    Class valType = clr.classForName(ammd.getMap().getValueType());
    Iterator iter = ((List)value).iterator();
    while (iter.hasNext()) {
      Object listKey = iter.next();
      Object key = listKey;
      Function funcKey = DATASTORE_TO_POJO_TYPE_FUNC.get(keyType);
      if (funcKey != null) {
        key = funcKey.apply(listKey);
      }

      Object listVal = iter.next();
      Object val = listVal;
      Function funcVal = DATASTORE_TO_POJO_TYPE_FUNC.get(valType);
      if (funcVal != null) {
        val = funcVal.apply(listVal);
      }

      map.put(key, val);
    }
View Full Code Here


    Class keyType = clr.classForName(ammd.getMap().getKeyType());
    Class valType = clr.classForName(ammd.getMap().getValueType());
    while (entryIter.hasNext()) {
      Map.Entry entry = (Map.Entry)entryIter.next();
      Object key = entry.getKey();
      Function keyFunc = pojoToDatastoreTypeFunction.get(keyType);
      if (keyFunc != null) {
        result.add(keyFunc.apply(key));
      } else {
        result.add(key);
      }
     
      Object val = entry.getValue();
      Function valFunc = pojoToDatastoreTypeFunction.get(valType);
      if (valFunc != null) {
        result.add(valFunc.apply(val));
      } else {
        result.add(val);
      }
    }
View Full Code Here

TOP

Related Classes of com.google.appengine.datanucleus.Utils.Function

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.