JPQL refactorings

For [AGPUSH-144](https://issues.jboss.org/browse/AGPUSH-144):

* Removing java loop
* replaced by JPQL query
* Adding service wrappers