Examples of RedisGeneratedIdWithSequenceGenerator


Examples of com.impetus.client.generatedId.entites.RedisGeneratedIdWithSequenceGenerator

        {
            Assert.assertEquals("java.lang.IllegalArgumentException: " + GenerationType.class.getSimpleName() + "."
                    + GenerationType.TABLE + " Strategy not supported by this client :" + RedisClient.class.getName(),
                    e.getMessage());
        }
        RedisGeneratedIdWithSequenceGenerator withSequenceGenerator = new RedisGeneratedIdWithSequenceGenerator();
        withSequenceGenerator.setName("Kuldeep Kumar Mishra");
        try
        {
            em.persist(withSequenceGenerator);
            List<RedisGeneratedIdWithSequenceGenerator> list = em.createQuery(
                    "Select c from RedisGeneratedIdWithSequenceGenerator c").getResultList();
            Assert.assertNotNull(list);
            Assert.assertEquals(1, list.size());
            Assert.assertEquals("Kuldeep Kumar Mishra", list.get(0).getName());
            Object id = list.get(0).getId();
            em.clear();
            withSequenceGenerator = em.find(RedisGeneratedIdWithSequenceGenerator.class, id);
            Assert.assertNotNull(withSequenceGenerator);
            Assert.assertEquals("Kuldeep Kumar Mishra", withSequenceGenerator.getName());
        }
        catch (KunderaException e)
        {
            Assert.fail();
        }
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.