Adding query events to the hibernate query classes.