// CouponTypeBean
@Override
public CouponTypeBean getOrCreateCouponTypeBean(final String type) {
final Query query = getSession().getNamedQuery("CouponTypeBean.one");
query.setString("name", type);
CouponTypeBean bean = (CouponTypeBean) query.uniqueResult();
if (bean == null) {
bean = persistBean(new CouponTypeBean(type));
}
return bean;
}