Code example for Session

Methods: get

0
	 */ 
	public Object fetchEntity(Object entity, String[] fetch) {
	    Serializable id = (Serializable)Entity.forClass(entity.getClass()).getIdentifier(entity);
	    if (id == null)
	        return null; 
	    return session.get(entity.getClass(), id);
	} 
     
	/** 
	 * disconnects from the Hibernate Session. 
	 */ 
	protected void disconnectSession() { 
		session.disconnect();
	} 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE