Example #1
0
 @Override
 public tutorial.global.cool.model.BaseFormObject entityToModel(
     com.google.appengine.api.datastore.Entity entity) {
   tutorial.global.cool.model.BaseFormObject model =
       new tutorial.global.cool.model.BaseFormObject();
   model.setEmail((java.lang.String) entity.getProperty("email"));
   model.setInsertDate((java.lang.String) entity.getProperty("insertDate"));
   model.setKey(entity.getKey());
   model.setUpdateDate((java.lang.String) entity.getProperty("updateDate"));
   model.setUserId((java.lang.String) entity.getProperty("userId"));
   model.setVersion((java.lang.Long) entity.getProperty("version"));
   return model;
 }
Example #2
0
 @Override
 protected tutorial.global.cool.model.BaseFormObject jsonToModel(
     org.slim3.datastore.json.JsonRootReader rootReader, int maxDepth, int currentDepth) {
   tutorial.global.cool.model.BaseFormObject m = new tutorial.global.cool.model.BaseFormObject();
   org.slim3.datastore.json.JsonReader reader = null;
   org.slim3.datastore.json.Default decoder0 = new org.slim3.datastore.json.Default();
   reader = rootReader.newObjectReader("email");
   m.setEmail(decoder0.decode(reader, m.getEmail()));
   reader = rootReader.newObjectReader("insertDate");
   m.setInsertDate(decoder0.decode(reader, m.getInsertDate()));
   reader = rootReader.newObjectReader("key");
   m.setKey(decoder0.decode(reader, m.getKey()));
   reader = rootReader.newObjectReader("updateDate");
   m.setUpdateDate(decoder0.decode(reader, m.getUpdateDate()));
   reader = rootReader.newObjectReader("userId");
   m.setUserId(decoder0.decode(reader, m.getUserId()));
   reader = rootReader.newObjectReader("version");
   m.setVersion(decoder0.decode(reader, m.getVersion()));
   return m;
 }