Examples of PushApplication


Examples of org.jboss.aerogear.unifiedpush.api.PushApplication

        merge(pushApplication);
    }

    @Override
    public void delete(PushApplication pushApplication) {
        PushApplication entity = entityManager.find(PushApplication.class, pushApplication.getId());
        final List<Variant> variants = entity.getVariants();
        if (variants != null && !variants.isEmpty()) {
            entityManager.createQuery("delete from Installation i where i.variant = :variant")
                    .setParameter("variant", variants).executeUpdate();
        }
        remove(entity);
View Full Code Here

Examples of org.jboss.aerogear.unifiedpush.api.PushApplication

    }

    @Override
    public PushApplication findByPushApplicationIDForDeveloper(String pushApplicationID, String loginName) {

        PushApplication entity = getSingleResultForQuery(createQuery(
                "select pa from PushApplication pa where pa.pushApplicationID = :pushApplicationID and pa.developer = :developer")
                .setParameter("pushApplicationID", pushApplicationID)
                .setParameter("developer", loginName));

        return entity;
View Full Code Here

Examples of org.jboss.aerogear.unifiedpush.api.PushApplication

    }

    @Override
    public PushApplication findByPushApplicationID(String pushApplicationID) {

        PushApplication entity = getSingleResultForQuery(createQuery("select pa from PushApplication pa where pa.pushApplicationID = :pushApplicationID")
                .setParameter("pushApplicationID", pushApplicationID));

        return entity;
    }
View Full Code Here

Examples of org.jboss.aerogear.unifiedpush.api.PushApplication

        return (List<PushApplication>) createQuery(jpql).setParameter("variantIDs", variantIDs).getResultList();
    }

    @Override
    public PushApplication find(String id) {
        PushApplication entity = entityManager.find(PushApplication.class, id);
        return  entity;
    }
View Full Code Here

Examples of org.jboss.aerogear.unifiedpush.api.PushApplication

        merge(pushApplication);
    }

    @Override
    public void delete(PushApplication pushApplication) {
        PushApplication entity = entityManager.find(PushApplication.class, pushApplication.getId());
        final List<Variant> variants = entity.getVariants();
        if (variants != null && !variants.isEmpty()) {
            final List<Installation> resultList = entityManager.createQuery("from Installation i where i.variant in :variants", Installation.class)
                    .setParameter("variants", variants).getResultList();
            for (Installation installation : resultList) {
                entityManager.remove(installation);
View Full Code Here

Examples of org.jboss.aerogear.unifiedpush.api.PushApplication

    }

    @Override
    public PushApplication findByPushApplicationIDForDeveloper(String pushApplicationID, String loginName) {

        PushApplication entity = getSingleResultForQuery(createQuery(
                "select pa from PushApplication pa where pa.pushApplicationID = :pushApplicationID and pa.developer = :developer")
                .setParameter("pushApplicationID", pushApplicationID)
                .setParameter("developer", loginName));

        return entity;
View Full Code Here

Examples of org.jboss.aerogear.unifiedpush.api.PushApplication

    }

    @Override
    public PushApplication findByPushApplicationID(String pushApplicationID) {

        PushApplication entity = getSingleResultForQuery(createQuery("select pa from PushApplication pa where pa.pushApplicationID = :pushApplicationID")
                .setParameter("pushApplicationID", pushApplicationID));

        return entity;
    }
View Full Code Here

Examples of org.jboss.aerogear.unifiedpush.api.PushApplication

        return (List<PushApplication>) createQuery(jpql).setParameter("variantIDs", variantIDs).getResultList();
    }

    @Override
    public PushApplication find(String id) {
        PushApplication entity = entityManager.find(PushApplication.class, id);
        return  entity;
    }
View Full Code Here

Examples of org.jboss.aerogear.unifiedpush.api.PushApplication

        merge(pushApplication);
    }

    @Override
    public void delete(PushApplication pushApplication) {
        PushApplication entity = entityManager.find(PushApplication.class, pushApplication.getId());
        final List<Variant> variants = entity.getVariants();
        if (variants != null && !variants.isEmpty()) {
            final List<Installation> resultList = entityManager.createQuery("from Installation i where i.variant in :variants", Installation.class)
                    .setParameter("variants", variants).getResultList();
            for (Installation installation : resultList) {
                entityManager.remove(installation);
View Full Code Here

Examples of org.jboss.aerogear.unifiedpush.api.PushApplication

        return beans;
    }

    @Test
    public void addPushApplication() {
        PushApplication pa = new PushApplication();
        pa.setName("EJB Container");
        final String uuid = UUID.randomUUID().toString();
        pa.setPushApplicationID(uuid);

        pushApplicationService.addPushApplication(pa);

        PushApplication stored = pushApplicationService.findByPushApplicationID(uuid);
        assertThat(stored).isNotNull();
        assertThat(stored.getId()).isNotNull();
        assertThat(pa.getName()).isEqualTo(stored.getName());
        assertThat(pa.getPushApplicationID()).isEqualTo(stored.getPushApplicationID());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.