Exemplo n.º 1
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();
 }