det.setPromo(promo);
PromoDetail promoDetail = coreManager.save(PromoDetail.class, det);
promoDetail = coreManager.getPromoDetail(promoDetail.getId());
DisplayPromoDetail dispDet = mapper.map(promoDetail, DisplayPromoDetail.class);
ProductMeasurement productMeasurement = null;
if(promoDetail.getProduct().getProductMeasurement() != null && !promoDetail.getProduct().getProductMeasurement().isEmpty()){
productMeasurement = promoDetail.getProduct().getProductMeasurement().iterator().next();
}
if(productMeasurement != null){
dispDet.getProduct().setProductMeasurement(mapper.map(productMeasurement, DisplayProductMeasurement.class));
}
resp = dispDet;
} catch (Exception e) {
SgwtRestErrorResponse resp1 = new SgwtRestErrorResponse(-1);