Package com.impetus.client.entities

Examples of com.impetus.client.entities.RedisEmbeddedUser


        final String userId = "1";
        final int tweetId = 12;
        final UUID timeLineId = UUID.randomUUID();
        final Date tweetDate = new Date();
        RedisCompoundKey embeddable = new RedisCompoundKey(userId, tweetId, timeLineId);
        RedisEmbeddedUser user = new RedisEmbeddedUser(userId);
        user.setTweetBody("My tweet");
        user.setTweetDate(tweetDate);
        user.setEmbeddable(embeddable);
        em.persist(user);

        em.clear(); // clear cache.

        RedisEmbeddedUser found = em.find(RedisEmbeddedUser.class, userId);
        Assert.assertNotNull(found);
        Assert.assertNotNull(found.getUserId());
        Assert.assertEquals(userId, found.getEmbeddable().getUserId());
        Assert.assertEquals(tweetDate, found.getTweetDate());
        em.remove(found);

        em.clear(); // clear cache.

        found = em.find(RedisEmbeddedUser.class, userId);
View Full Code Here

TOP

Related Classes of com.impetus.client.entities.RedisEmbeddedUser

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.