@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 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
 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;
 }