//stats
getStatistics().setStatisticsEnabled( settings.isStatisticsEnabled() );
// EntityNotFoundDelegate
EntityNotFoundDelegate entityNotFoundDelegate = cfg.getEntityNotFoundDelegate();
if ( entityNotFoundDelegate == null ) {
entityNotFoundDelegate = new EntityNotFoundDelegate() {
public void handleEntityNotFound(String entityName, Serializable id) {
throw new ObjectNotFoundException( id, entityName );
}
public boolean isEntityNotFoundException(RuntimeException exception) {
return ObjectNotFoundException.class.isInstance( exception );