List of usage examples for org.hibernate Session load
Object load(String entityName, Serializable id, LockOptions lockOptions);
From source file:com.jdon.persistence.hibernate.HibernateTemplate.java
License:Apache License
public Object load(final Class entityClass, final Serializable id, final LockMode lockMode) throws Exception { return doHibernate(new HibernateCallback() { public Object execute(Session session) throws HibernateException { if (lockMode != null) { return session.load(entityClass, id, lockMode); } else { return session.load(entityClass, id); }/* w w w .j a va2 s . co m*/ } }); }
From source file:com.jdon.persistence.hibernate.HibernateTemplate.java
License:Apache License
public Object load(final String entityName, final Serializable id, final LockMode lockMode) throws Exception { return doHibernate(new HibernateCallback() { public Object execute(Session session) throws HibernateException { if (lockMode != null) { return session.load(entityName, id, lockMode); } else { return session.load(entityName, id); }//from ww w .j a v a 2 s . c om } }); }