Code example for Session

Methods: get

0
 
    public Object restore(Session session)
    { 
        try 
        { 
            return session.get(entityName, id);
        } 
        catch (Exception ex)
        { 
            throw new RuntimeException(HibernateMessages.sessionPersistedEntityLoadFailure(entityName, id, ex));
        } 
    } 
 
    @Override 
    public String toString()
    { 
        return String.format("<PersistedEntity: %s(%s)>", entityName, id);
    } 
}