Persistence querying task API + QueryBuilder.

relates to #116