Code example for Session

Methods: load

0
		tx = session.beginTransaction();
	} 
	@SuppressWarnings("unchecked") 
	@Override 
	protected <T> T find(Class<T> entityClass, Serializable id) {
		return (T)session.load(entityClass, id);
	} 
	@Override 
	protected <T> T save(T entity) {
		session.save(entity);
		return entity;
	} 
	@SuppressWarnings("unchecked") 
	@Override 
	protected <T> T merge(T entity) {
		return (T)session.merge(entity);
	} 
	@Override 
	protected void flush() { 
		session.flush();