Package com.impetus.kundera.client

Examples of com.impetus.kundera.client.Client


        UUID timeLineId = UUID.randomUUID();
        CassandraCompoundKey key = new CassandraCompoundKey("mevivs", 1, timeLineId);
        onCRUD(em, key);
        em = emf.createEntityManager();
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion("3.0.0");
        CassandraPrimeUser result = em.find(CassandraPrimeUser.class, key);
        Assert.assertNotNull(result);
        Assert.assertNull(result.getKey().getFullName());
        Assert.assertEquals("After merge", result.getTweetBody()); // assertion
View Full Code Here


        UUID timeLineId = UUID.randomUUID();
        CassandraCompoundKey key = new CassandraCompoundKey("mevivs", 1, timeLineId);
        onCRUD(em, key);
        em = emf.createEntityManager();
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion("3.0.0");
        CassandraPrimeUser result = em.find(CassandraPrimeUser.class, key);
        Assert.assertNotNull(result);
        Assert.assertNull(result.getKey().getFullName());
        Assert.assertEquals(currentDate.getTime(), result.getTweetDate().getTime()); // assertion
View Full Code Here

        UUID timeLineId = UUID.randomUUID();

        CassandraCompoundKey key = new CassandraCompoundKey("mevivs", 1, timeLineId);

        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion("3.0.0");

        CassandraPrimeUser user = new CassandraPrimeUser(key);
        user.setTweetBody("my first tweet");
        user.setTweetDate(currentDate);
View Full Code Here

        EntityManager em = emf.createEntityManager();

        UUID timeLineId = UUID.randomUUID();
        CassandraCompoundKey key = new CassandraCompoundKey("mevivs", 1, timeLineId);
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion(CassandraConstants.CQL_VERSION_3_0);

        CassandraPrimeUser user1 = new CassandraPrimeUser(key);
        user1.setTweetBody("my first tweet");
        user1.setTweetDate(currentDate);
View Full Code Here

        EntityManager em = emf.createEntityManager();

        UUID timeLineId = UUID.randomUUID();
        CassandraCompoundKey key = new CassandraCompoundKey("mevivs", 1, timeLineId);
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion(CassandraConstants.CQL_VERSION_3_0);

        CassandraPrimeUser user1 = new CassandraPrimeUser(key);
        user1.setTweetBody("my first tweet");
        user1.setTweetDate(currentDate);
View Full Code Here

        EntityManager em = emf.createEntityManager();

        UUID timeLineId = UUID.randomUUID();
        CassandraCompoundKey key = new CassandraCompoundKey("mevivs", 1, timeLineId);
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion(CassandraConstants.CQL_VERSION_3_0);

        CassandraPrimeUser user1 = new CassandraPrimeUser(key);
        user1.setTweetBody("my first tweet");
        user1.setTweetDate(currentDate);
View Full Code Here

        UUID timeLineId = UUID.randomUUID();
        for (int i = 0; i < 500; i++)
        {
            CassandraCompoundKey key = new CassandraCompoundKey("mevivs", i, timeLineId);
            Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
            Client client = clients.get(PERSISTENCE_UNIT);
            ((CassandraClientBase) client).setCqlVersion(CassandraConstants.CQL_VERSION_3_0);
            CassandraPrimeUser user = new CassandraPrimeUser(key);
            user.setTweetBody("my first tweet");
            user.setTweetDate(currentDate);
            em.persist(user);
View Full Code Here

    private void onCRUD(final EntityManager em, CassandraCompoundKey key)
    {

        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion(CassandraConstants.CQL_VERSION_3_0);
        CassandraPrimeUser user = new CassandraPrimeUser(key);
        user.setTweetBody("my first tweet");
        user.setTweetDate(currentDate);
        user.setNickName(NickName.KK);
View Full Code Here

    private void updateNamed()
    {
        EntityManager em = emf.createEntityManager();

        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion("3.0.0");

        UUID timeLineId = UUID.randomUUID();

        CassandraCompoundKey key = new CassandraCompoundKey("mevivs", 1, timeLineId);
View Full Code Here

        CassandraCompoundKey key = new CassandraCompoundKey("mevivs", 1, timeLineId);

        String deleteQuery = "Delete From CassandraPrimeUser u where u.key= :key";
        EntityManager em = emf.createEntityManager();
        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion("3.0.0");

        Query q = em.createQuery(deleteQuery);
        q.setParameter("key", key);
        q.executeUpdate();
View Full Code Here

TOP

Related Classes of com.impetus.kundera.client.Client

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.