public Object load(Class entityClass, Serializable id) throws HibernateException {
return load( entityClass.getName(), id );
}
public Object load(String entityName, Serializable id) throws HibernateException {
LoadEvent event = new LoadEvent(id, entityName, false, this);
boolean success = false;
try {
fireLoad( event, LoadEventListener.LOAD );
if ( event.getResult() == null ) {
getFactory().getEntityNotFoundDelegate().handleEntityNotFound( entityName, id );
}
success = true;
return event.getResult();
}
finally {
afterOperation(success);
}
}