Package org.jboss.aerogear.simplepush.server.datastore.model

Examples of org.jboss.aerogear.simplepush.server.datastore.model.Server


        }

        final JpaOperation<Void> saveSalt = new JpaOperation<Void>() {
            @Override
            public Void perform(final EntityManager em) {
                em.persist(new Server(new String(salt, UTF_8)));
                return null;
            }
        };
        jpaExecutor.execute(saveSalt);
    }
View Full Code Here


    public byte[] getPrivateKeySalt() {
        final JpaOperation<byte[]> saveChannel = new JpaOperation<byte[]>() {
            @Override
            public byte[] perform(final EntityManager em) {
                final Query query = em.createQuery("SELECT s FROM Server s");
                final Server server = (Server) query.getSingleResult();
                return server.getSalt().getBytes(UTF_8);
            }
        };
        try {
            return jpaExecutor.execute(saveChannel);
        } catch (final Exception e) {
View Full Code Here

    }

    @Test
    public void saveServerSalt() {
        final String salt = "the server salt";
        final Server server = new Server(salt);
        entityManager.getTransaction().begin();
        entityManager.persist(server);
        entityManager.getTransaction().commit();
    }
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.simplepush.server.datastore.model.Server

Copyright © 2018 www.massapicom. 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.