public ShoppingCouponActionableDynamicQuery() throws SystemException { setBaseLocalService(ShoppingCouponLocalServiceUtil.getService()); setClass(ShoppingCoupon.class); setClassLoader(PortalClassLoaderUtil.getClassLoader()); setPrimaryKeyPropertyName("couponId"); }
public ShoppingCoupon getCoupon() throws PortalException, SystemException { ShoppingCoupon coupon = null; if (Validator.isNotNull(getCouponCodes())) { String code = StringUtil.split(getCouponCodes())[0]; try { coupon = ShoppingCouponLocalServiceUtil.getCoupon(code); } catch (NoSuchCouponException nsce) { } } return coupon; }