8081828384858687888990
{ List result = q.list(); if( result.size() > 1) { throw new DatabaseException("expected a single result only!"); } else if( result.size() == 0) { return null; }
118119120121122123124125
{ return (T) getCurrentSession().get(getEntityClass(), id); } catch( HibernateException hex) { throw new DatabaseException("unable to find entity", hex); } }
134135136137138139140141
{ getCurrentSession().delete(entity); } catch( HibernateException hex) { throw new DatabaseException("unable to delete message", hex); } }
150151152153154155156157
{ getCurrentSession().merge(entity); } catch( HibernateException hex) { throw new DatabaseException("unable to merge entity", hex); } }
166167168169170171172173
{ getCurrentSession().persist(entity); } catch( HibernateException hex) { throw new DatabaseException("unable to persist entity", hex); } }
182183184185186187188189
{ getCurrentSession().refresh(entity); } catch( HibernateException hex) { throw new DatabaseException("unable to refresh entity", hex); } }
199200201202203204205206
{ getCurrentSession().replicate(entity, mode); } catch( HibernateException hex) { throw new DatabaseException("unable to replicate entity", hex); } }