12131415161718192021222324
@Service @Transactional public class CmsCommentExtMngImpl implements CmsCommentExtMng { public CmsCommentExt save(String ip, String text, CmsComment comment) { CmsCommentExt ext = new CmsCommentExt(); ext.setText(text); ext.setIp(ip); ext.setComment(comment); comment.setCommentExt(ext); dao.save(ext); return ext; }
1617181920212223
Pagination page = findByCriteria(crit, pageNo, pageSize); return page; } public CmsCommentExt findById(Integer id) { CmsCommentExt entity = get(id); return entity; }
3334353637383940414243
return getSession().createQuery(hql).setParameter("contentId", contentId).executeUpdate(); } public CmsCommentExt deleteById(Integer id) { CmsCommentExt entity = super.get(id); if (entity != null) { getSession().delete(entity); } return entity; }