Package com.impetus.client.crud.entities

Examples of com.impetus.client.crud.entities.PersonMongoNameAnnotation


        em.persist(p1);
        em.persist(p2);
        em.persist(p3);

        PersonMongoNameAnnotation personWithKey = new PersonMongoNameAnnotation();
        personWithKey.setPersonId("111");
        em.persist(personWithKey);

        em.clear();
        PersonMongoNameAnnotation p = findById(PersonMongoNameAnnotation.class, "1", em);
        Assert.assertNotNull(p);
        Assert.assertEquals("vivek", p.getPersonName());
        Assert.assertEquals(Day.THURSDAY, p.getDay());

        em.clear();
        String qry = "Select p.personId,p.personName from PesonMongo p where p.personId >= 1";
        Query q = em.createQuery(qry);
        List<PersonMongoNameAnnotation> persons = q.getResultList();
View Full Code Here


        emf.close();
    }

    private PersonMongoNameAnnotation prepareData(String rowKey, int age)
    {
        PersonMongoNameAnnotation o = new PersonMongoNameAnnotation();
        o.setPersonId(rowKey);
        o.setPersonName("vivek");
        o.setAge(age);
        o.setDay(Day.THURSDAY);
        return o;
    }
View Full Code Here

        em.persist(p1);
        em.persist(p2);
        em.persist(p3);

        PersonMongoNameAnnotation personWithKey = new PersonMongoNameAnnotation();
        personWithKey.setPersonId("111");
        em.persist(personWithKey);       

        em.clear();
        PersonMongoNameAnnotation p = findById(PersonMongoNameAnnotation.class, "1", em);
        Assert.assertNotNull(p);
        Assert.assertEquals("vivek", p.getPersonName());
        Assert.assertEquals(Day.THURSDAY, p.getDay());

        em.clear();
        String qry = "Select p.personId,p.personName from PesonMongo p where p.personId >= 1";
        Query q = em.createQuery(qry);
        List<PersonMongoNameAnnotation> persons = q.getResultList();
View Full Code Here

    }
   

    private PersonMongoNameAnnotation prepareData(String rowKey, int age)
    {
        PersonMongoNameAnnotation o = new PersonMongoNameAnnotation();
        o.setPersonId(rowKey);
        o.setPersonName("vivek");
        o.setAge(age);
        o.setDay(Day.THURSDAY);
        return o;
    }
View Full Code Here

TOP

Related Classes of com.impetus.client.crud.entities.PersonMongoNameAnnotation

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.