Package com.impetus.client.oraclenosql.entities

Examples of com.impetus.client.oraclenosql.entities.PersonOTOOracleNoSQL


        persistPerson("3", "person3", 30, new AddressOTOOracleNoSQL(3.3, "Address 3"));
        persistPerson("4", "person4", 40, new AddressOTOOracleNoSQL(4.4, "Address 4"));

        // Find Records
        em.clear();
        PersonOTOOracleNoSQL p11 = findById("1");
        Assert.assertNotNull(p11);
        Assert.assertEquals("person1", p11.getPersonName());
        Assert.assertEquals(new Integer(10), p11.getAge());
        Assert.assertNotNull(p11.getAddress());
        Assert.assertEquals(new Double(1.1), p11.getAddress().getAddressId());
        Assert.assertEquals("Address 1", p11.getAddress().getStreet());

        PersonOTOOracleNoSQL p22 = findById("2");
        Assert.assertNotNull(p22);
        Assert.assertEquals("person2", p22.getPersonName());
        Assert.assertEquals(new Integer(20), p22.getAge());
        Assert.assertNotNull(p22.getAddress());
        Assert.assertEquals(new Double(2.2), p22.getAddress().getAddressId());
        Assert.assertEquals("Address 2", p22.getAddress().getStreet());

        PersonOTOOracleNoSQL p33 = findById("3");
        Assert.assertNotNull(p33);
        Assert.assertEquals("person3", p33.getPersonName());
        Assert.assertEquals(new Integer(30), p33.getAge());
        Assert.assertNotNull(p33.getAddress());
        Assert.assertEquals(new Double(3.3), p33.getAddress().getAddressId());
        Assert.assertEquals("Address 3", p33.getAddress().getStreet());

        PersonOTOOracleNoSQL p44 = findById("4");
        assertNotNull(p44);
        Assert.assertEquals("person4", p44.getPersonName());
        Assert.assertEquals(new Integer(40), p44.getAge());
        Assert.assertNotNull(p44.getAddress());
        Assert.assertEquals(new Double(4.4), p44.getAddress().getAddressId());
        Assert.assertEquals("Address 4", p44.getAddress().getStreet());

        PersonOTOOracleNoSQL p55 = findById("5"); // Invalid records
        Assert.assertNull(p55);

        // Update records
        p11.setPersonName("person11");
        p11.setAge(100);
View Full Code Here


        em.remove(person);
    }

    protected PersonOTOOracleNoSQL preparePerson(String rowKey, int age, String name, AddressOTOOracleNoSQL address)
    {
        PersonOTOOracleNoSQL person = new PersonOTOOracleNoSQL();
        person.setPersonId(rowKey);
        person.setPersonName(name);
        person.setAge(age);
        person.setAddress(address);
        return person;
    }
View Full Code Here

TOP

Related Classes of com.impetus.client.oraclenosql.entities.PersonOTOOracleNoSQL

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.