@Override
    public Iterator<ClientVersionBean> getAllClientVersions(String organizationId,
            String clientId) throws StorageException {
        EntityManager entityManager = getActiveEntityManager();

        String jpql = "SELECT v "
                + "   FROM ClientVersionBean v "
                + "   JOIN v.client a "
                + "   JOIN a.organization o "
                + "  WHERE o.id = :orgId "
                + "    AND a.id = :clientId"
                + "  ORDER BY v.id ASC";

        Query query = entityManager.createQuery(jpql);
        query.setParameter("orgId", organizationId);
        query.setParameter("clientId", clientId);
        return super.getAll(ClientVersionBean.class, query);
    }
@ Override public Iterator < ClientVersionBean > getAllClientVersions ( String organizationId , String clientId ) throws StorageException { EntityManager entityManager = getActiveEntityManager ( ) ; String jpql = "SELECT v " + "   FROM ClientVersionBean v " + "   JOIN v.client a " + "   JOIN a.organization o " + "  WHERE o.id = :orgId " + "    AND a.id = :clientId" + "  ORDER BY v.id ASC" ; Query query = entityManager . createQuery ( jpql ) ; query . setParameter ( "orgId" , organizationId ) ; query . setParameter ( "clientId" , clientId ) ; return super . getAll ( ClientVersionBean . class , query ) ; }
@see io.apiman.manager.api.core.IStorage#getAllClientVersions(java.lang.String, java.lang.String)