@Override public Object retrievePromotionByTPN(String tpn, String zone) throws PromoDataAccessException { LOGGER.info("Enter retrievePromotionByTPN"); Object promoDoc = couchbaseWrapper.get("PROMO_" + tpn + "_" + zone); LOGGER.info("Exit retrievePromotionByTPN"); return promoDoc; }
@Override public Map<String, Object> retrievePromotionByTPNBBulk(Set<String> tpnbList, Set<String> zoneList) throws PromoDataAccessException { List<String> tpnList = new ArrayList<String>(); for (String tpnb : tpnbList) { for (String zone : zoneList) { tpnList.add("PROMO_" + tpnb + "_" + zone); } } Map<String, Object> docs = couchbaseWrapper.getBulk(tpnList); return docs; }
@Override public boolean createPromotionDocument(String promoItemZoneKey, String promoItemZoneString) throws PromoDataAccessException { couchbaseWrapper.set(promoItemZoneKey, promoItemZoneString); return true; }