Package com.impetus.kundera.tests.crossdatastore.useraddress.entities

Examples of com.impetus.kundera.tests.crossdatastore.useraddress.entities.PersonnelUniMTo1


    }

    @Override
    protected void insert()
    {
        PersonnelUniMTo1 person1 = new PersonnelUniMTo1();
        person1.setPersonId("unimanytoone_1");
        person1.setPersonName("Amresh");

        PersonnelUniMTo1 person2 = new PersonnelUniMTo1();
        person2.setPersonId("unimanytoone_2");
        person2.setPersonName("Vivek");

        HabitatUniMTo1 address = new HabitatUniMTo1();
        address.setAddressId("unimanytoone_a");
        address.setStreet("AAAAAAAAAAAAA");

        person1.setAddress(address);
        person2.setAddress(address);

        Set<PersonnelUniMTo1> persons = new HashSet<PersonnelUniMTo1>();
        persons.add(person1);
        persons.add(person2);
View Full Code Here


    @Override
    protected void find()
    {
        // Find Person 1
        PersonnelUniMTo1 p1 = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_1");
        assertPerson1(p1);

        // Find Person 2
        PersonnelUniMTo1 p2 = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_2");
        assertPerson2(p2);

    }
View Full Code Here

    }

    @Override
    protected void findPersonByIdColumn()
    {
        PersonnelUniMTo1 p = (PersonnelUniMTo1) dao.findPersonByIdColumn(PersonnelUniMTo1.class, "unimanytoone_1");
        assertPerson1(p);
    }
View Full Code Here

    {
        List<PersonnelUniMTo1> persons = dao.findPersonByName(PersonnelUniMTo1.class, "Amresh");
        Assert.assertNotNull(persons);
        Assert.assertFalse(persons.isEmpty());
        Assert.assertTrue(persons.size() == 1);
        PersonnelUniMTo1 person = persons.get(0);
        assertPerson1(person);
    }
View Full Code Here

    @Override
    protected void update()
    {
        // Find Person 1
        PersonnelUniMTo1 p1 = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_1");
        Assert.assertNotNull(p1);
        p1.setPersonName("Saurabh");
        p1.getAddress().setStreet("Brand New Street");
        dao.merge(p1);
        PersonnelUniMTo1 p1AfterMerge = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_1");
        Assert.assertNotNull(p1AfterMerge);
        Assert.assertEquals("Saurabh", p1AfterMerge.getPersonName());
        Assert.assertEquals("Brand New Street", p1AfterMerge.getAddress().getStreet());

        // Find Person 2
        PersonnelUniMTo1 p2 = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_2");
        Assert.assertNotNull(p2);
        Assert.assertNotNull(p2.getAddress());
        Assert.assertNotNull(p2.getAddress().getAddressId());
        p2.setPersonName("Prateek");
        dao.merge(p2);
        PersonnelUniMTo1 p2AfterMerge = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_2");
        Assert.assertNotNull(p2AfterMerge);
        Assert.assertEquals("Prateek", p2AfterMerge.getPersonName());
        Assert.assertEquals("Brand New Street", p2AfterMerge.getAddress().getStreet());
    }
View Full Code Here

    @Override
    protected void remove()
    {
        // Remove Person 1
        dao.remove("unimanytoone_1", PersonnelUniMTo1.class);
        PersonnelUniMTo1 p1AfterRemoval = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_1");
        Assert.assertNull(p1AfterRemoval);

        // Remove Person 2
        dao.remove("unimanytoone_2", PersonnelUniMTo1.class);
        PersonnelUniMTo1 p2AfterRemoval = (PersonnelUniMTo1) dao.findPerson(PersonnelUniMTo1.class, "unimanytoone_2");
        Assert.assertNull(p2AfterRemoval);
    }
View Full Code Here

TOP

Related Classes of com.impetus.kundera.tests.crossdatastore.useraddress.entities.PersonnelUniMTo1

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.