Examples of PersonLocal


Examples of org.apache.openejb.test.entity.cmr.onetoone.PersonLocal

    public void test00_AGetBExistingAB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PersonLocal person = findPerson(1);
            assertNotNull("person is null", person);
            LicenseLocal license = person.getLicense();
            assertNotNull("license is null", license);
            assertEquals(new Integer(11), license.getId());
            assertEquals("value11", license.getNumber());
        } finally {
            completeTransaction();
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetoone.PersonLocal

    public void test01_BGetAExistingAB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            LicenseLocal license = findLicense(11);
            PersonLocal person = license.getPerson();
            assertNotNull(person);
            assertEquals(new Integer(1), person.getId());
            assertEquals("value1", person.getName());
        } finally {
            completeTransaction();
        }
    }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetoone.PersonLocal

    public void test02_ASetBDropExisting() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PersonLocal person = findPerson(1);
            person.setLicense(null);
        } finally {
            completeTransaction();
        }

        assertUnlinked(1);
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetoone.PersonLocal

    public void test04_ASetBNewAB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PersonLocal person = findPerson(2);
            LicenseLocal license = createLicense(22);
            person.setLicense(license);
        } finally {
            completeTransaction();
        }

        assertLinked(2, 22);
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetoone.PersonLocal

    public void test05_BSetANewAB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PersonLocal person = findPerson(2);
            LicenseLocal license = createLicense(22);
            license.setPerson(person);
        } finally {
            completeTransaction();
        }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetoone.PersonLocal

    public void test06_ASetBExistingBNewA() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PersonLocal person = findPerson(2);
            LicenseLocal license = findLicense(11);
            person.setLicense(license);
        } finally {
            completeTransaction();
        }

        assertLinked(2, 11);
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetoone.PersonLocal

    public void test07_BSetAExistingBNewA() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PersonLocal person = createPerson(3);
            LicenseLocal license = findLicense(11);
            license.setPerson(person);
        } finally {
            completeTransaction();
        }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetoone.PersonLocal

    public void test09_BSetAExistingANewB() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PersonLocal person = findPerson(1);
            LicenseLocal license = createLicense(22);
            license.setPerson(person);
        } finally {
            completeTransaction();
        }
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetoone.PersonLocal

    public void test10_RemoveRelationships() throws Exception {
        resetDB();
        beginTransaction();
        try {
            PersonLocal person = findPerson(1);
            person.remove();
        } finally {
            completeTransaction();
        }

        Connection c = ds.getConnection();
View Full Code Here

Examples of org.apache.openejb.test.entity.cmr.onetoone.PersonLocal

        try {
            LicenseLocal license = findLicense(11);

            license.setPoints(new Integer(2));

            PersonLocal person = license.getPerson();
            assertEquals(new Integer(2), person.getId());
            assertEquals("value2", person.getName());
        } finally {
            completeTransaction();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.