Пример #1
0
 @Override
 protected com.meeetlet.model.event.Participant jsonToModel(
     org.slim3.datastore.json.JsonRootReader rootReader, int maxDepth, int currentDepth) {
   com.meeetlet.model.event.Participant m = new com.meeetlet.model.event.Participant();
   org.slim3.datastore.json.JsonReader reader = null;
   org.slim3.datastore.json.Default decoder0 = new org.slim3.datastore.json.Default();
   reader = rootReader.newObjectReader("comment");
   m.setComment(decoder0.decode(reader, m.getComment()));
   reader = rootReader.newObjectReader("eventRef");
   decoder0.decode(reader, m.getEventRef(), maxDepth, currentDepth);
   reader = rootReader.newObjectReader("key");
   m.setKey(decoder0.decode(reader, m.getKey()));
   reader = rootReader.newObjectReader("userRef");
   decoder0.decode(reader, m.getUserRef(), maxDepth, currentDepth);
   reader = rootReader.newObjectReader("version");
   m.setVersion(decoder0.decode(reader, m.getVersion()));
   return m;
 }
Пример #2
0
 @Override
 public com.meeetlet.model.event.Participant entityToModel(
     com.google.appengine.api.datastore.Entity entity) {
   com.meeetlet.model.event.Participant model = new com.meeetlet.model.event.Participant();
   model.setComment((java.lang.String) entity.getProperty("comment"));
   if (model.getEventRef() == null) {
     throw new NullPointerException("The property(eventRef) is null.");
   }
   model
       .getEventRef()
       .setKey((com.google.appengine.api.datastore.Key) entity.getProperty("eventRef"));
   model.setKey(entity.getKey());
   if (model.getUserRef() == null) {
     throw new NullPointerException("The property(userRef) is null.");
   }
   model
       .getUserRef()
       .setKey((com.google.appengine.api.datastore.Key) entity.getProperty("userRef"));
   model.setVersion((java.lang.Long) entity.getProperty("version"));
   return model;
 }
Пример #3
0
 @Override
 protected void setKey(Object model, com.google.appengine.api.datastore.Key key) {
   validateKey(key);
   com.meeetlet.model.event.Participant m = (com.meeetlet.model.event.Participant) model;
   m.setKey(key);
 }