Package com.impetus.client.twitter.entities

Examples of com.impetus.client.twitter.entities.UserCassandra


        List<UserCassandra> users = twitter.findUserByBirthtime(new java.sql.Time(new Date(Long
                .parseLong("1344079062222")).getTime()));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new java.sql.Time(new Date(Long.parseLong("1344079062222")).getTime()), pd.getBirthtime());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByBirthtime(new java.sql.Time(new Date(Long
                .parseLong("1344079065555")).getTime()));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new java.sql.Time(new Date(Long.parseLong("1344079065555")).getTime()), pd2.getBirthtime());
        twitter.closeEntityManager();
    }
View Full Code Here


        List<UserCassandra> users = twitter.findUserByAnniversary(new java.sql.Timestamp(new Date(Long
                .parseLong("13440790653333")).getTime()));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new java.sql.Timestamp(new Date(Long.parseLong("13440790653333")).getTime()),
                pd.getAnniversary());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByAnniversary(new java.sql.Timestamp(new Date(Long
                .parseLong("1344079066666")).getTime()));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new java.sql.Timestamp(new Date(Long.parseLong("1344079066666")).getTime()),
                pd2.getAnniversary());
        twitter.closeEntityManager();
    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByJobAttempts(new BigInteger("123456789"));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new BigInteger("123456789"), pd.getJobAttempts());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByJobAttempts(new BigInteger("123456790"));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new BigInteger("123456790"), pd2.getJobAttempts());
        twitter.closeEntityManager();
    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByAccumulatedWealth(new BigDecimal(123456789));
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(new BigDecimal(123456789), pd.getAccumulatedWealth());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByAccumulatedWealth(new BigDecimal(123456790));
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(new BigDecimal(123456790), pd2.getAccumulatedWealth());
        twitter.closeEntityManager();
    }
View Full Code Here

        cal.setTime(new Date(1344079067777l));
        List<UserCassandra> users = twitter.findUserByGraduationDay(cal);
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(cal, pd.getGraduationDay());
        twitter.closeEntityManager();

        twitter.createEntityManager();

        Calendar cal2 = Calendar.getInstance();
        cal2.setTime(new Date(1344079068888l));
        List<UserCassandra> users2 = twitter.findUserByGraduationDay(cal2);
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(cal2, pd2.getGraduationDay());
        twitter.closeEntityManager();
    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByProfessionId(1234567);
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(1234567, pd.getProfessionId());
        twitter.closeEntityManager();

        // User2
        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByProfessionId(1234568);
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(1234568, pd2.getProfessionId());
        twitter.closeEntityManager();
    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByDepartment("Labs");
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals("Labs", pd.getDepartmentName());
        twitter.closeEntityManager();

        // User2
        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByDepartment("ODC");
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals("ODC", pd2.getDepartmentName());
        twitter.closeEntityManager();
    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findExceptionalUsers();
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId2, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(true, pd.isExceptional());
        twitter.closeEntityManager();

    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByAge(31);
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals(31, pd.getAge());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByAge(32);
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals(32, pd2.getAge());
        twitter.closeEntityManager();
    }
View Full Code Here

        twitter.createEntityManager();
        List<UserCassandra> users = twitter.findUserByGrade('C');
        Assert.assertNotNull(users);
        Assert.assertFalse(users.isEmpty());
        Assert.assertTrue(users.size() == 1);
        UserCassandra user = users.get(0);
        Assert.assertNotNull(user);
        Assert.assertEquals(userId1, user.getUserId());
        ProfessionalDetailCassandra pd = user.getProfessionalDetail();
        Assert.assertNotNull(pd);
        Assert.assertEquals('C', pd.getGrade());
        twitter.closeEntityManager();

        twitter.createEntityManager();
        List<UserCassandra> users2 = twitter.findUserByGrade('A');
        Assert.assertNotNull(users2);
        Assert.assertFalse(users2.isEmpty());
        Assert.assertTrue(users2.size() == 1);
        UserCassandra user2 = users2.get(0);
        Assert.assertNotNull(user2);
        Assert.assertEquals(userId2, user2.getUserId());
        ProfessionalDetailCassandra pd2 = user2.getProfessionalDetail();
        Assert.assertNotNull(pd2);
        Assert.assertEquals('A', pd2.getGrade());
        twitter.closeEntityManager();
    }
View Full Code Here

TOP

Related Classes of com.impetus.client.twitter.entities.UserCassandra

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.