@Override
 protected void setKey(Object model, com.google.appengine.api.datastore.Key key) {
   validateKey(key);
   biz.storebiz.db.entity.product.ProductDepartment m =
       (biz.storebiz.db.entity.product.ProductDepartment) model;
   m.setProductDepartmentKey(key);
 }
 @Override
 protected void prePut(Object model) {
   biz.storebiz.db.entity.product.ProductDepartment m =
       (biz.storebiz.db.entity.product.ProductDepartment) model;
   m.setCreationDate(slim3_creationDateAttributeListener.prePut(m.getCreationDate()));
   m.setDepartmentFormationDate(
       slim3_departmentFormationDateAttributeListener.prePut(m.getDepartmentFormationDate()));
 }
 @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();
 }
 @Override
 protected com.google.appengine.api.datastore.Key getKey(Object model) {
   biz.storebiz.db.entity.product.ProductDepartment m =
       (biz.storebiz.db.entity.product.ProductDepartment) model;
   return m.getProductDepartmentKey();
 }
 @Override
 public com.google.appengine.api.datastore.Entity modelToEntity(java.lang.Object model) {
   biz.storebiz.db.entity.product.ProductDepartment m =
       (biz.storebiz.db.entity.product.ProductDepartment) model;
   com.google.appengine.api.datastore.Entity entity = null;
   if (m.getProductDepartmentKey() != null) {
     entity = new com.google.appengine.api.datastore.Entity(m.getProductDepartmentKey());
   } else {
     entity = new com.google.appengine.api.datastore.Entity(kind);
   }
   entity.setProperty("creationDate", m.getCreationDate());
   entity.setProperty("departmentClosingDate", m.getDepartmentClosingDate());
   entity.setProperty("departmentFormationDate", m.getDepartmentFormationDate());
   entity.setProperty("departmentLastUpateDate", m.getDepartmentLastUpateDate());
   entity.setProperty("operational", m.isOperational());
   entity.setProperty("productDepartmentCode", m.getProductDepartmentCode());
   entity.setProperty("productDepartmentName", m.getProductDepartmentName());
   entity.setProperty("warehouseLocation", m.getWarehouseLocation());
   entity.setProperty("warehouseLocationCode", m.getWarehouseLocationCode());
   return entity;
 }
 @Override
 public biz.storebiz.db.entity.product.ProductDepartment entityToModel(
     com.google.appengine.api.datastore.Entity entity) {
   biz.storebiz.db.entity.product.ProductDepartment model =
       new biz.storebiz.db.entity.product.ProductDepartment();
   model.setCreationDate((java.util.Date) entity.getProperty("creationDate"));
   model.setDepartmentClosingDate((java.util.Date) entity.getProperty("departmentClosingDate"));
   model.setDepartmentFormationDate(
       (java.util.Date) entity.getProperty("departmentFormationDate"));
   model.setDepartmentLastUpateDate(
       (java.util.Date) entity.getProperty("departmentLastUpateDate"));
   model.setOperational(
       booleanToPrimitiveBoolean((java.lang.Boolean) entity.getProperty("operational")));
   model.setProductDepartmentCode((java.lang.String) entity.getProperty("productDepartmentCode"));
   model.setProductDepartmentKey(entity.getKey());
   model.setProductDepartmentName((java.lang.String) entity.getProperty("productDepartmentName"));
   model.setWarehouseLocation(
       (com.google.appengine.api.datastore.Key) entity.getProperty("warehouseLocation"));
   model.setWarehouseLocationCode((java.lang.String) entity.getProperty("warehouseLocationCode"));
   return model;
 }