示例#1
0
 @Override
 protected void modelToJson(
     org.slim3.datastore.json.JsonWriter writer,
     java.lang.Object model,
     int maxDepth,
     int currentDepth) {
   slim3.demo.model.Blog m = (slim3.demo.model.Blog) model;
   writer.beginObject();
   org.slim3.datastore.json.Default encoder0 = new org.slim3.datastore.json.Default();
   if (m.getContent() != null) {
     writer.setNextPropertyName("content");
     encoder0.encode(writer, m.getContent());
   }
   if (m.getKey() != null) {
     writer.setNextPropertyName("key");
     encoder0.encode(writer, m.getKey());
   }
   if (m.getTitle() != null) {
     writer.setNextPropertyName("title");
     encoder0.encode(writer, m.getTitle());
   }
   if (m.getVersion() != null) {
     writer.setNextPropertyName("version");
     encoder0.encode(writer, m.getVersion());
   }
   writer.endObject();
 }
示例#2
0
 @Override
 protected com.xhills.golf_party.model.course.Area jsonToModel(
     org.slim3.datastore.json.JsonRootReader rootReader, int maxDepth, int currentDepth) {
   com.xhills.golf_party.model.course.Area m = new com.xhills.golf_party.model.course.Area();
   org.slim3.datastore.json.JsonReader reader = null;
   org.slim3.datastore.json.Default decoder0 = new org.slim3.datastore.json.Default();
   reader = rootReader.newObjectReader("key");
   m.setKey(decoder0.decode(reader, m.getKey()));
   reader = rootReader.newObjectReader("name");
   m.setName(decoder0.decode(reader, m.getName()));
   reader = rootReader.newObjectReader("version");
   m.setVersion(decoder0.decode(reader, m.getVersion()));
   return m;
 }
示例#3
0
 @Override
 protected slim3.demo.model.Blog jsonToModel(
     org.slim3.datastore.json.JsonRootReader rootReader, int maxDepth, int currentDepth) {
   slim3.demo.model.Blog m = new slim3.demo.model.Blog();
   org.slim3.datastore.json.JsonReader reader = null;
   org.slim3.datastore.json.Default decoder0 = new org.slim3.datastore.json.Default();
   reader = rootReader.newObjectReader("content");
   m.setContent(decoder0.decode(reader, m.getContent()));
   reader = rootReader.newObjectReader("key");
   m.setKey(decoder0.decode(reader, m.getKey()));
   reader = rootReader.newObjectReader("title");
   m.setTitle(decoder0.decode(reader, m.getTitle()));
   reader = rootReader.newObjectReader("version");
   m.setVersion(decoder0.decode(reader, m.getVersion()));
   return m;
 }
示例#4
0
 @Override
 protected void modelToJson(
     org.slim3.datastore.json.JsonWriter writer,
     java.lang.Object model,
     int maxDepth,
     int currentDepth) {
   tutorial.global.cool.model.BaseFormObject m = (tutorial.global.cool.model.BaseFormObject) model;
   writer.beginObject();
   org.slim3.datastore.json.Default encoder0 = new org.slim3.datastore.json.Default();
   if (m.getEmail() != null) {
     writer.setNextPropertyName("email");
     encoder0.encode(writer, m.getEmail());
   }
   if (m.getInsertDate() != null) {
     writer.setNextPropertyName("insertDate");
     encoder0.encode(writer, m.getInsertDate());
   }
   if (m.getKey() != null) {
     writer.setNextPropertyName("key");
     encoder0.encode(writer, m.getKey());
   }
   if (m.getUpdateDate() != null) {
     writer.setNextPropertyName("updateDate");
     encoder0.encode(writer, m.getUpdateDate());
   }
   if (m.getUserId() != null) {
     writer.setNextPropertyName("userId");
     encoder0.encode(writer, m.getUserId());
   }
   if (m.getVersion() != null) {
     writer.setNextPropertyName("version");
     encoder0.encode(writer, m.getVersion());
   }
   writer.endObject();
 }
示例#5
0
 @Override
 protected void modelToJson(
     org.slim3.datastore.json.JsonWriter writer,
     java.lang.Object model,
     int maxDepth,
     int currentDepth) {
   com.meeetlet.model.event.Participant m = (com.meeetlet.model.event.Participant) model;
   writer.beginObject();
   org.slim3.datastore.json.Default encoder0 = new org.slim3.datastore.json.Default();
   if (m.getComment() != null) {
     writer.setNextPropertyName("comment");
     encoder0.encode(writer, m.getComment());
   }
   if (m.getEventRef() != null && m.getEventRef().getKey() != null) {
     writer.setNextPropertyName("eventRef");
     encoder0.encode(writer, m.getEventRef(), maxDepth, currentDepth);
   }
   if (m.getKey() != null) {
     writer.setNextPropertyName("key");
     encoder0.encode(writer, m.getKey());
   }
   if (m.getUserRef() != null && m.getUserRef().getKey() != null) {
     writer.setNextPropertyName("userRef");
     encoder0.encode(writer, m.getUserRef(), maxDepth, currentDepth);
   }
   if (m.getVersion() != null) {
     writer.setNextPropertyName("version");
     encoder0.encode(writer, m.getVersion());
   }
   writer.endObject();
 }
示例#6
0
 @Override
 protected void modelToJson(
     org.slim3.datastore.json.JsonWriter writer,
     java.lang.Object model,
     int maxDepth,
     int currentDepth) {
   com.xhills.golf_party.model.course.Area m = (com.xhills.golf_party.model.course.Area) model;
   writer.beginObject();
   org.slim3.datastore.json.Default encoder0 = new org.slim3.datastore.json.Default();
   if (m.getKey() != null) {
     writer.setNextPropertyName("key");
     encoder0.encode(writer, m.getKey());
   }
   if (m.getName() != null) {
     writer.setNextPropertyName("name");
     encoder0.encode(writer, m.getName());
   }
   if (m.getVersion() != null) {
     writer.setNextPropertyName("version");
     encoder0.encode(writer, m.getVersion());
   }
   writer.endObject();
 }
示例#7
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;
 }
示例#8
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;
 }
 @Override
 protected biz.storebiz.db.entity.product.ProductDepartment jsonToModel(
     org.slim3.datastore.json.JsonRootReader rootReader, int maxDepth, int currentDepth) {
   biz.storebiz.db.entity.product.ProductDepartment m =
       new biz.storebiz.db.entity.product.ProductDepartment();
   org.slim3.datastore.json.JsonReader reader = null;
   org.slim3.datastore.json.Default decoder0 = new org.slim3.datastore.json.Default();
   reader = rootReader.newObjectReader("creationDate");
   m.setCreationDate(decoder0.decode(reader, m.getCreationDate()));
   reader = rootReader.newObjectReader("departmentClosingDate");
   m.setDepartmentClosingDate(decoder0.decode(reader, m.getDepartmentClosingDate()));
   reader = rootReader.newObjectReader("departmentFormationDate");
   m.setDepartmentFormationDate(decoder0.decode(reader, m.getDepartmentFormationDate()));
   reader = rootReader.newObjectReader("departmentLastUpateDate");
   m.setDepartmentLastUpateDate(decoder0.decode(reader, m.getDepartmentLastUpateDate()));
   reader = rootReader.newObjectReader("operational");
   m.setOperational(decoder0.decode(reader, m.isOperational()));
   reader = rootReader.newObjectReader("productDepartmentCode");
   m.setProductDepartmentCode(decoder0.decode(reader, m.getProductDepartmentCode()));
   reader = rootReader.newObjectReader("productDepartmentKey");
   m.setProductDepartmentKey(decoder0.decode(reader, m.getProductDepartmentKey()));
   reader = rootReader.newObjectReader("productDepartmentName");
   m.setProductDepartmentName(decoder0.decode(reader, m.getProductDepartmentName()));
   reader = rootReader.newObjectReader("warehouseLocation");
   m.setWarehouseLocation(decoder0.decode(reader, m.getWarehouseLocation()));
   reader = rootReader.newObjectReader("warehouseLocationCode");
   m.setWarehouseLocationCode(decoder0.decode(reader, m.getWarehouseLocationCode()));
   return m;
 }
 @Override
 protected void modelToJson(
     org.slim3.datastore.json.JsonWriter writer,
     java.lang.Object model,
     int maxDepth,
     int currentDepth) {
   biz.storebiz.db.entity.product.ProductDepartment m =
       (biz.storebiz.db.entity.product.ProductDepartment) model;
   writer.beginObject();
   org.slim3.datastore.json.Default encoder0 = new org.slim3.datastore.json.Default();
   if (m.getCreationDate() != null) {
     writer.setNextPropertyName("creationDate");
     encoder0.encode(writer, m.getCreationDate());
   }
   if (m.getDepartmentClosingDate() != null) {
     writer.setNextPropertyName("departmentClosingDate");
     encoder0.encode(writer, m.getDepartmentClosingDate());
   }
   if (m.getDepartmentFormationDate() != null) {
     writer.setNextPropertyName("departmentFormationDate");
     encoder0.encode(writer, m.getDepartmentFormationDate());
   }
   if (m.getDepartmentLastUpateDate() != null) {
     writer.setNextPropertyName("departmentLastUpateDate");
     encoder0.encode(writer, m.getDepartmentLastUpateDate());
   }
   writer.setNextPropertyName("operational");
   encoder0.encode(writer, m.isOperational());
   if (m.getProductDepartmentCode() != null) {
     writer.setNextPropertyName("productDepartmentCode");
     encoder0.encode(writer, m.getProductDepartmentCode());
   }
   if (m.getProductDepartmentKey() != null) {
     writer.setNextPropertyName("productDepartmentKey");
     encoder0.encode(writer, m.getProductDepartmentKey());
   }
   if (m.getProductDepartmentName() != null) {
     writer.setNextPropertyName("productDepartmentName");
     encoder0.encode(writer, m.getProductDepartmentName());
   }
   if (m.getWarehouseLocation() != null) {
     writer.setNextPropertyName("warehouseLocation");
     encoder0.encode(writer, m.getWarehouseLocation());
   }
   if (m.getWarehouseLocationCode() != null) {
     writer.setNextPropertyName("warehouseLocationCode");
     encoder0.encode(writer, m.getWarehouseLocationCode());
   }
   writer.endObject();
 }
示例#11
0
 @Override
 protected biz.storebiz.db.entity.customer.Customer jsonToModel(
     org.slim3.datastore.json.JsonRootReader rootReader, int maxDepth, int currentDepth) {
   biz.storebiz.db.entity.customer.Customer m = new biz.storebiz.db.entity.customer.Customer();
   org.slim3.datastore.json.JsonReader reader = null;
   org.slim3.datastore.json.Default decoder0 = new org.slim3.datastore.json.Default();
   reader = rootReader.newObjectReader("creationDate");
   m.setCreationDate(decoder0.decode(reader, m.getCreationDate()));
   reader = rootReader.newObjectReader("customerId");
   m.setCustomerId(decoder0.decode(reader, m.getCustomerId()));
   reader = rootReader.newObjectReader("customerKey");
   m.setCustomerKey(decoder0.decode(reader, m.getCustomerKey()));
   reader = rootReader.newObjectReader("customerLastModificationDate");
   m.setCustomerLastModificationDate(decoder0.decode(reader, m.getCustomerLastModificationDate()));
   reader = rootReader.newObjectReader("customerRegistrationDate");
   m.setCustomerRegistrationDate(decoder0.decode(reader, m.getCustomerRegistrationDate()));
   reader = rootReader.newObjectReader("customerRegistrationExpiryDate");
   m.setCustomerRegistrationExpiryDate(
       decoder0.decode(reader, m.getCustomerRegistrationExpiryDate()));
   reader = rootReader.newObjectReader("customerType");
   m.setCustomerType(decoder0.decode(reader, m.getCustomerType()));
   reader = rootReader.newObjectReader("email");
   m.setEmail(decoder0.decode(reader, m.getEmail()));
   reader = rootReader.newObjectReader("emailPreference");
   m.setEmailPreference(
       decoder0.decode(
           reader, m.getEmailPreference(), biz.storebiz.db.entity.customer.EmailPreference.class));
   reader = rootReader.newObjectReader("emailSubscription");
   m.setEmailSubscription(
       decoder0.decode(
           reader,
           m.getEmailSubscription(),
           biz.storebiz.db.entity.customer.EmailSubscription.class));
   reader = rootReader.newObjectReader("name");
   m.setName(decoder0.decode(reader, m.getName()));
   reader = rootReader.newObjectReader("password");
   m.setPassword(
       decoder0.decode(reader, m.getPassword(), biz.storebiz.db.entity.customer.Password.class));
   reader = rootReader.newObjectReader("postalAddresses");
   {
     java.util.ArrayList<com.google.appengine.api.datastore.Key> elements =
         new java.util.ArrayList<com.google.appengine.api.datastore.Key>();
     org.slim3.datastore.json.JsonArrayReader r = rootReader.newArrayReader("postalAddresses");
     if (r != null) {
       reader = r;
       int n = r.length();
       for (int i = 0; i < n; i++) {
         r.setIndex(i);
         com.google.appengine.api.datastore.Key v =
             decoder0.decode(reader, (com.google.appengine.api.datastore.Key) null);
         if (v != null) {
           elements.add(v);
         }
       }
       m.setPostalAddresses(elements);
     }
   }
   return m;
 }
示例#12
0
 @Override
 protected void modelToJson(
     org.slim3.datastore.json.JsonWriter writer,
     java.lang.Object model,
     int maxDepth,
     int currentDepth) {
   biz.storebiz.db.entity.customer.Customer m = (biz.storebiz.db.entity.customer.Customer) model;
   writer.beginObject();
   org.slim3.datastore.json.Default encoder0 = new org.slim3.datastore.json.Default();
   if (m.getCreationDate() != null) {
     writer.setNextPropertyName("creationDate");
     encoder0.encode(writer, m.getCreationDate());
   }
   if (m.getCustomerId() != null) {
     writer.setNextPropertyName("customerId");
     encoder0.encode(writer, m.getCustomerId());
   }
   if (m.getCustomerKey() != null) {
     writer.setNextPropertyName("customerKey");
     encoder0.encode(writer, m.getCustomerKey());
   }
   if (m.getCustomerLastModificationDate() != null) {
     writer.setNextPropertyName("customerLastModificationDate");
     encoder0.encode(writer, m.getCustomerLastModificationDate());
   }
   if (m.getCustomerRegistrationDate() != null) {
     writer.setNextPropertyName("customerRegistrationDate");
     encoder0.encode(writer, m.getCustomerRegistrationDate());
   }
   if (m.getCustomerRegistrationExpiryDate() != null) {
     writer.setNextPropertyName("customerRegistrationExpiryDate");
     encoder0.encode(writer, m.getCustomerRegistrationExpiryDate());
   }
   if (m.getCustomerType() != null) {
     writer.setNextPropertyName("customerType");
     encoder0.encode(writer, m.getCustomerType());
   }
   if (m.getEmail() != null) {
     writer.setNextPropertyName("email");
     encoder0.encode(writer, m.getEmail());
   }
   if (m.getEmailPreference() != null) {
     writer.setNextPropertyName("emailPreference");
     encoder0.encode(writer, m.getEmailPreference());
   }
   if (m.getEmailSubscription() != null) {
     writer.setNextPropertyName("emailSubscription");
     encoder0.encode(writer, m.getEmailSubscription());
   }
   if (m.getName() != null) {
     writer.setNextPropertyName("name");
     encoder0.encode(writer, m.getName());
   }
   if (m.getPassword() != null) {
     writer.setNextPropertyName("password");
     encoder0.encode(writer, m.getPassword());
   }
   if (m.getPostalAddresses() != null) {
     writer.setNextPropertyName("postalAddresses");
     writer.beginArray();
     for (com.google.appengine.api.datastore.Key v : m.getPostalAddresses()) {
       encoder0.encode(writer, v);
     }
     writer.endArray();
   }
   writer.endObject();
 }
示例#13
0
 @Override
 protected cz.artique.shared.model.label.Label jsonToModel(
     org.slim3.datastore.json.JsonRootReader rootReader, int maxDepth, int currentDepth) {
   cz.artique.shared.model.label.Label m = new cz.artique.shared.model.label.Label();
   org.slim3.datastore.json.JsonReader reader = null;
   org.slim3.datastore.json.Default decoder0 = new org.slim3.datastore.json.Default();
   reader = rootReader.newObjectReader("appearance");
   m.setAppearance(
       decoder0.decode(
           reader, m.getAppearance(), cz.artique.shared.model.label.LabelAppearance.class));
   reader = rootReader.newObjectReader("backupLevel");
   m.setBackupLevel(
       decoder0.decode(
           reader, m.getBackupLevel(), cz.artique.shared.model.label.BackupLevel.class));
   reader = rootReader.newObjectReader("displayName");
   m.setDisplayName(decoder0.decode(reader, m.getDisplayName()));
   reader = rootReader.newObjectReader("key");
   m.setKey(decoder0.decode(reader, m.getKey()));
   reader = rootReader.newObjectReader("labelType");
   m.setLabelType(
       decoder0.decode(reader, m.getLabelType(), cz.artique.shared.model.label.LabelType.class));
   reader = rootReader.newObjectReader("name");
   m.setName(decoder0.decode(reader, m.getName()));
   reader = rootReader.newObjectReader("priority");
   m.setPriority(decoder0.decode(reader, m.getPriority()));
   reader = rootReader.newObjectReader("shortcutStroke");
   m.setShortcutStroke(decoder0.decode(reader, m.getShortcutStroke()));
   reader = rootReader.newObjectReader("toBeDeleted");
   m.setToBeDeleted(decoder0.decode(reader, m.isToBeDeleted()));
   reader = rootReader.newObjectReader("userId");
   m.setUserId(decoder0.decode(reader, m.getUserId()));
   reader = rootReader.newObjectReader("version");
   m.setVersion(decoder0.decode(reader, m.getVersion()));
   return m;
 }
示例#14
0
 @Override
 protected void modelToJson(
     org.slim3.datastore.json.JsonWriter writer,
     java.lang.Object model,
     int maxDepth,
     int currentDepth) {
   cz.artique.shared.model.label.Label m = (cz.artique.shared.model.label.Label) model;
   writer.beginObject();
   org.slim3.datastore.json.Default encoder0 = new org.slim3.datastore.json.Default();
   if (m.getAppearance() != null) {
     writer.setNextPropertyName("appearance");
     encoder0.encode(writer, m.getAppearance());
   }
   if (m.getBackupLevel() != null) {
     writer.setNextPropertyName("backupLevel");
     encoder0.encode(writer, m.getBackupLevel());
   }
   if (m.getDisplayName() != null) {
     writer.setNextPropertyName("displayName");
     encoder0.encode(writer, m.getDisplayName());
   }
   if (m.getKey() != null) {
     writer.setNextPropertyName("key");
     encoder0.encode(writer, m.getKey());
   }
   if (m.getLabelType() != null) {
     writer.setNextPropertyName("labelType");
     encoder0.encode(writer, m.getLabelType());
   }
   if (m.getName() != null) {
     writer.setNextPropertyName("name");
     encoder0.encode(writer, m.getName());
   }
   writer.setNextPropertyName("priority");
   encoder0.encode(writer, m.getPriority());
   if (m.getShortcutStroke() != null) {
     writer.setNextPropertyName("shortcutStroke");
     encoder0.encode(writer, m.getShortcutStroke());
   }
   writer.setNextPropertyName("toBeDeleted");
   encoder0.encode(writer, m.isToBeDeleted());
   if (m.getUserId() != null) {
     writer.setNextPropertyName("userId");
     encoder0.encode(writer, m.getUserId());
   }
   if (m.getVersion() != null) {
     writer.setNextPropertyName("version");
     encoder0.encode(writer, m.getVersion());
   }
   writer.endObject();
 }