HH-31919 : added generic code to get single query result from hibernate ...

...without spam in logs