@Transactional(readOnly = false) public void update(TrioMstaccessrole domain, String user) { // TODO , masbro domain.getUserTrailing().setVmodiby(user); domain.getUserTrailing().setDmodi(TrioDateUtil.getLongSysDate()); getHibernateTemplate().update(domain); getHibernateTemplate().flush(); }
@Transactional(readOnly = true) public List<TrioMstaccessrole> findByCriteria(TrioMstaccessrole domain) { // TODO , masbro DetachedCriteria c = DetachedCriteria.forClass(TrioMstaccessrole.class); if (domain.getTrioMstaccessrolePK().getVroleid() != null) { c = c.add( Restrictions.eq( "trioMstaccessrolePK.vroleid", domain.getTrioMstaccessrolePK().getVroleid())); } if (domain.getTrioMstaccessrolePK().getVmenuid() != null) { c = c.add( Restrictions.eq( "trioMstaccessrolePK.vmenuid", domain.getTrioMstaccessrolePK().getVmenuid())); } if (domain.getVstat() != null) { c = c.add(Restrictions.eq("vstat", domain.getVstat())); } return getHibernateTemplate().findByCriteria(c); }