129130131132133134135136137138139140
Session aSession = null; Transaction tx = null; aSession = getSession(); tx = aSession.beginTransaction(); SbiEvents hibEvent = new SbiEvents(); hibEvent.setUser(user); updateSbiCommonInfo4Insert(hibEvent); aSession.save(hibEvent); tx.commit(); return hibEvent.getId(); }
149150151152153154155156157158159
Query hqlQuery = null; try { aSession = getSession(); tx = aSession.beginTransaction(); SbiEvents hibEvent = new SbiEvents(id, user); aSession.delete(hibEvent); tx.commit(); } catch (HibernateException he) { logException(he); if (tx != null)
5455565758596061626364
try { aSession = getSession(); tx = aSession.beginTransaction(); SbiEvents hibEvent = (SbiEvents)aSession.load(SbiEvents.class, eventId); realResult = toEvent(hibEvent); tx.commit(); } catch (HibernateException he) { logException(he);