jsonResult.put("status", Constants.WEBSERVICE_STATUS_SUCCESS);
Long shippingRegionId = Format.getLong(form.getShippingRegionId());
ShippingRegion shippingRegion = (ShippingRegion) em.find(ShippingRegion.class, shippingRegionId);
ShippingRegionZip shippingRegionZip = new ShippingRegionZip();
shippingRegionZip.setZipCodeStart(form.getZipCodeStart());
shippingRegionZip.setZipCodeEnd(form.getZipCodeEnd());
if (form.getZipCodeExpression().equalsIgnoreCase(String.valueOf(Constants.VALUE_YES))) {
shippingRegionZip.setZipCodeExpression(Constants.VALUE_YES);
}
else {
shippingRegionZip.setZipCodeExpression(Constants.VALUE_NO);
}
shippingRegionZip.setRecUpdateBy(adminBean.getUser().getUserId());
shippingRegionZip.setRecUpdateDatetime(new Date(System.currentTimeMillis()));
shippingRegionZip.setRecCreateBy(adminBean.getUser().getUserId());
shippingRegionZip.setRecCreateDatetime(new Date(System.currentTimeMillis()));
shippingRegionZip.setShippingRegion(shippingRegion);
em.persist(shippingRegionZip);
String result = getJSONZipCodeList(shippingRegion);
this.streamWebService(response, result);