#354 Add common interface for JPAQueryFactory and HibernateQueryFactory