Haven't yet looked at DatabaseQuery, but I would have assumed we just use Hibernate, like:
new HqlQueryBuilder().select("...").from("...").getQuery(SessionFactory).list()