37383940414243444546
public void delFilter(long id) { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); Filter filter = (Filter) session.load(Filter.class, id); session.delete(filter); session.getTransaction().commit(); }
81828384858687888990
public Filter getFilter(long id) { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); Filter filter = (Filter) session.load(Filter.class, id); session.getTransaction().commit(); return filter; }