Package com.impetus.kundera.client

Examples of com.impetus.kundera.client.Client


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

        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion(CassandraConstants.CQL_VERSION_3_0);
        PrimeUser user = new PrimeUser(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();

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

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

        String deleteQuery = "Delete From PrimeUser 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

                (short) 8, (float) 69.3, 163.76765654, enrolmentDate, enrolmentTime, joiningDateAndTime,
                new Integer(3), new Long(978423946455l), 135434.89, newSqlDate, sqlTime, sqlTimestamp, bigDecimal,
                bigInteger, calendar, CompoundKeyDataType.class.newInstance());

        Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
        Client client = clients.get(PERSISTENCE_UNIT);
        ((CassandraClientBase) client).setCqlVersion("3.0.0");
        PrimeUserDataType user = new PrimeUserDataType(key);
        user.setTweetBody("my first tweet");
        user.setTweetDate(currentDate);
        user.setIsActive(true);
View Full Code Here

                (short) 8, (float) 69.3, 163.76765654, enrolmentDate, enrolmentTime, joiningDateAndTime,
                new Integer(3), new Long(978423946455l), 135434.89, newSqlDate, sqlTime, sqlTimestamp, bigDecimal,
                bigInteger, calendar, CompoundKeyDataType.class.newInstance());

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

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

    private void updateNamed() throws InstantiationException, IllegalAccessException
    {
        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();
        Date currentDate = new Date();
        CompoundKeyDataType key = prepareData(new Long(12345677), 78575785897L, "Amresh", false, 10, 'A', (byte) 5,
View Full Code Here

                bigInteger, calendar, CompoundKeyDataType.class.newInstance());

        String deleteQuery = "Delete From PrimeUserDataType 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

            puPropertiesString.put(PersistenceProperties.KUNDERA_BATCH_SIZE, "10");

            em = emf.createEntityManager(puPropertiesString);

            Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
            Client client = clients.get(_PU);

            Assert.assertEquals(((HBaseClient) client).getBatchSize(), 10);

        }
View Full Code Here

            puPropertiesString.put(PersistenceProperties.KUNDERA_BATCH_SIZE, 10);

            em = emf.createEntityManager(puPropertiesString);

            Map<String, Client> clients = (Map<String, Client>) em.getDelegate();
            Client client = clients.get(_PU);

            Field f1, f2;

            f1 = ((HBaseClient) client).getClass().getDeclaredField("handler"); // NoSuchFieldException
            f1.setAccessible(true);
View Full Code Here

        EntityManager em = emf.createEntityManager();
        UUID timeLineId = UUID.randomUUID();
        UserTimeLine key = new UserTimeLine("mevivs", 1, timeLineId);

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

        PrimeUser user = new PrimeUser(key);
        user.setTweetBody("my first tweet");
        user.setTweetDate(currentDate);
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.