Examples of LicenseLocal


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

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

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

    public void test11_CascadeDelete() throws Exception {
        resetDB();
        beginTransaction();
        try {
            LicenseLocal license = findLicense(11);
            license.remove();
        } finally {
            completeTransaction();
        }

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

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

    // todo enable these when field to fk is implemented
    public void Xtest12_CMPMappedToForeignKeyColumn() throws Exception {
        resetDB();
        beginTransaction();
        try {
            LicenseLocal license = findLicense(11);

            Integer field3 = license.getPoints();
            assertEquals(license.getPerson().getPrimaryKey(), field3);
        } finally {
            completeTransaction();
        }
    }
View Full Code Here

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

    // todo enable these when field to fk is implemented
    public void Xtest13_SetCMPMappedToForeignKeyColumn() throws Exception {
        resetDB();
        beginTransaction();
        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

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

    private PersonLocal findPerson(int personId) throws FinderException {
        return personLocalHome.findByPrimaryKey(new PersonPk(personId, "value" + personId));
    }

    private LicenseLocal createLicense(int licenseId) throws CreateException {
        LicenseLocal license = licenseLocalHome.create(new LicensePk(licenseId, "value" + licenseId));
        return license;
    }
View Full Code Here

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

        }

        PersonLocal person1 = createPerson(1);
        createPerson(2);

        LicenseLocal license = createLicense(11);
        license.setPerson(person1);
    }
View Full Code Here

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

    private PersonLocal findPerson(int personId) throws FinderException {
        return personLocalHome.findByPrimaryKey(personId);
    }

    private LicenseLocal createLicense(int licenseId) throws CreateException {
        LicenseLocal license = licenseLocalHome.create(licenseId);
        license.setNumber("value" + licenseId);
        return license;
    }
View Full Code Here

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

        }

        PersonLocal person1 = createPerson(1);
        createPerson(2);

        LicenseLocal license = createLicense(11);
        license.setPerson(person1);
    }
View Full Code Here

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

        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.LicenseLocal

    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
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.