Package com.impetus.client.oraclenosql.entities

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


        persistPerson("3", "person3", 30, new Office(3, "Company3", "Location 3"));
        persistPerson("4", "person4", 40, new Office(4, "Company4", "Location 4"));

        // Find Records
        clearEm();
        PersonEmbeddedKVStore p11 = findById("1");
        assertNotNull(p11);
        assertEquals("person1", p11.getPersonName());
        assertEquals(10, p11.getAge());
        Assert.assertNotNull(p11.getOffice());
        Assert.assertEquals(1, p11.getOffice().getOfficeId());
        Assert.assertEquals("Company1", p11.getOffice().getCompanyName());
        Assert.assertEquals("Location 1", p11.getOffice().getLocation());

        PersonEmbeddedKVStore p22 = findById("2");
        assertNotNull(p22);
        assertEquals("person2", p22.getPersonName());
        assertEquals(20, p22.getAge());
        Assert.assertNotNull(p22.getOffice());
        Assert.assertEquals(2, p22.getOffice().getOfficeId());
        Assert.assertEquals("Company2", p22.getOffice().getCompanyName());
        Assert.assertEquals("Location 2", p22.getOffice().getLocation());

        PersonEmbeddedKVStore p33 = findById("3");
        assertNotNull(p33);
        assertEquals("person3", p33.getPersonName());
        assertEquals(30, p33.getAge());
        Assert.assertNotNull(p33.getOffice());
        Assert.assertEquals(3, p33.getOffice().getOfficeId());
        Assert.assertEquals("Company3", p33.getOffice().getCompanyName());
        Assert.assertEquals("Location 3", p33.getOffice().getLocation());

        PersonEmbeddedKVStore p44 = findById("4");
        assertNotNull(p44);
        assertEquals("person4", p44.getPersonName());
        assertEquals(40, p44.getAge());
        Assert.assertNotNull(p44.getOffice());
        Assert.assertEquals(4, p44.getOffice().getOfficeId());
        Assert.assertEquals("Company4", p44.getOffice().getCompanyName());
        Assert.assertEquals("Location 4", p44.getOffice().getLocation());

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

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


        persist(p);
    }

    protected PersonEmbeddedKVStore preparePerson(String rowKey, int age, String name, Office office)
    {
        PersonEmbeddedKVStore person = new PersonEmbeddedKVStore();
        person.setPersonId(rowKey);
        person.setPersonName(name);
        person.setAge(age);
        person.setOffice(office);
        return person;
    }
View Full Code Here

TOP

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

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.