@SuppressWarnings("unchecked")
private List executeQueryWithJPA(final Criterion[] criteria,
final int startPosition, final int maxResult, final Group group,
final String sQuery) {
try {
return (List) this.getJpaTemplate().execute(new JpaCallback() {
public Object doInJpa(EntityManager em)
throws PersistenceException {
Query query = em.createQuery(sQuery);
if (criteria != null) {
GenericDaoUtils.addGroupParams(query, group, null);