Package org.apache.jdo.tck.pc.company

Examples of org.apache.jdo.tck.pc.company.ICompany


                    APPLICATION_IDENTITY);
            return;
        }
        pm = getPM();
        Transaction tx = pm.currentTransaction();
        ICompany icompany = (ICompany)pm.newInstance(ICompany.class);
        icompany.setCompanyid(1001);
        icompany.setName("GooTube");
        icompany.setFounded(new Date());

        tx.begin();
        pm.makePersistent(icompany);
        LongIdentity ioid = (LongIdentity)pm.getObjectId(icompany);
        tx.commit();

        Class icompanyOidClass = ioid.getTargetClass();
        if (icompanyOidClass != icompany.getClass())
            appendMessage(ASSERTION_FAILED +
                 " getObjectId(icompany) should return interface class.\n" +
                    "expected: " + icompany.getClass().getName() + "\n" +
                    "actual: " + icompanyOidClass.getName());
        failOnError();

    }
View Full Code Here


                    APPLICATION_IDENTITY);
            return;
        }
        pm = getPM();
        Transaction tx = pm.currentTransaction();
        ICompany icompany = (ICompany)pm.newInstance(PICompany.class);
        icompany.setCompanyid(1001);
        icompany.setName("GooTube");
        icompany.setFounded(new Date());

        tx.begin();
        pm.makePersistent(icompany);
        LongIdentity ioid = (LongIdentity)pm.getObjectId(icompany);
        tx.commit();

        Class pICompanyOidTargetClass = ioid.getTargetClass();
        if (pICompanyOidTargetClass != PICompany.class)
            appendMessage(ASSERTION_FAILED +
                 " getObjectId(icompany) should return interface class.\n" +
                    "expected: " + icompany.getClass().getName() + "\n" +
                    "actual: " + pICompanyOidTargetClass.getName());
        failOnError();

    }
View Full Code Here

TOP

Related Classes of org.apache.jdo.tck.pc.company.ICompany

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.