Code example for ObjectRetrievalFailureException

0
    @Override 
    public PerDed obtiene(final Long id) { 
        PerDed perded = (PerDed) currentSession().get(PerDed.class, id); 
        if (perded == null) { 
            log.warn("uh oh, perded with id '" + id + "' not found..."); 
            throw new ObjectRetrievalFailureException(PerDed.class, id); 
        } 
 
        return perded; 
    } 
 
    /** 
     * @see 
     * mx.edu.um.mateo.rh.service.PerDedManager#graba(mx.edu.um.mateo.rh.model.PerDed, 
     * mx.edu.um.mateo.general.model.Usuario) 
     */ 
    @Override 
    public void graba(final PerDed perded, Usuario usuario) { 
        Session session = currentSession(); 
        if (usuario != null) {