I have no experience with Apigee, but Querydsl could be used as a foundation for your querying DSLs.
It provides a base query model which can be adapted and extended to fit custom querying/storage stargets.
This answer is biased since I am involved with the Querydsl project.