Examples of IPayor


Examples of org.apache.openjpa.persistence.proxy.entities.IPayor

                throw e;
            }
           
            if (log.isTraceEnabled())
                log.trace("creating payor");
            IPayor payor = null;
            try {
                payor = createPayor(myEMF);
            } catch(Exception e) {
                log.error("failed to create payor successfuly.", e);
                throw e;
View Full Code Here

Examples of org.apache.openjpa.persistence.proxy.entities.IPayor

        }
       
        assertPayorsEqual(annuity.getPayors(), results.getPayors(),
                "Annuity Payor from Client is not equal to DB value", "Mismacth was found.");
        if (annuity.getPayors() != null) {
            IPayor clientPayor = null;
            for (int i=0; i<annuity.getPayors().size(); i++) {     
                found = false// reset
                clientPayor = annuity.getPayors().get(i);
                for (IPayor resultPayor : results.getPayors()) {
                    if (clientPayor.getId().equals(resultPayor.getId())){
                        found = true;
                        assertEqual(annuity.getPayors().get(i), resultPayor,
                        "Annuity payor from Client is not equal to DB value at location: " +i , "Mismacth was found");
                    }else{
                        continue;
                    }
                }
                if (!(found) && clientPayor != null) {
                    throw new RuntimeException("Annuity: Payor from client is not equal to DB.  " +
                            "Found payor with id: " + clientPayor.getId() +
                            " on the client side, but not in the database for annuity id:" + annuity.getId());
                   
                }
            }
        }
View Full Code Here

Examples of org.apache.openjpa.persistence.proxy.entities.IPayor

            throw new RuntimeException("Annuity: IPayor list not the same (payors was null)!");
        if (payors.size() != payors2.size())
            throw new RuntimeException("Annuity: IPayor list not the same (payors size not the same)! payors=" +
                payors.toArray().toString() + ", payors2=" + payors2.toString());
        for (int i = 0; i < payors.size(); i++) {
            IPayor payor = payors.get(i);
            boolean found = false;
            for (int j = 0; i < payors2.size(); j++) {
                try {
                    assertEqual(payor, payors2.get(j), string, string2);
                    found = true;
View Full Code Here

Examples of org.apache.openjpa.persistence.proxy.entities.IPayor

            }
        }
    }

    private void verifyPayorValues(OpenJPAEntityManagerFactorySPI myEMF, IPayor payor) throws Exception {
        IPayor results = null;
        results = findPayorById(myEMF, Payor.class, payor.getId());
        assertEqual(payor, results,
                "Payor from Client is not equal to DB value.", "Mismacth was found.");
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.proxy.entities.IPayor

                "Payor from Client is not equal to DB value.", "Mismacth was found.");
    }

    private IPayor findPayorById(OpenJPAEntityManagerFactorySPI myEMF, Class<Payor> class1, String id) {
        EntityManager em = createEM(myEMF);
        IPayor ip = em.find(class1, id);
        closeEM(em);
        return ip;
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.proxy.entities.IPayor

    }

    private IPayor createPayor(OpenJPAEntityManagerFactorySPI myEMF) {
        EntityManager em = createEM(myEMF);
        em.getTransaction().begin();
        IPayor payor = new Payor();
        payor.setId(getId());
        payor.setName("Payor");
        em.persist(payor);
        em.getTransaction().commit();
        closeEM(em);
        return payor;
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.proxy.entities.IPayor

                throw e;
            }
           
            if (log.isTraceEnabled())
                log.trace("creating payor");
            IPayor payor = null;
            try {
                payor = createPayor(myEMF);
            } catch(Exception e) {
                log.error("failed to create payor successfuly.", e);
                throw e;
View Full Code Here

Examples of org.apache.openjpa.persistence.proxy.entities.IPayor

        }
       
        assertPayorsEqual(annuity.getPayors(), results.getPayors(),
                "Annuity Payor from Client is not equal to DB value", "Mismacth was found.");
        if (annuity.getPayors() != null) {
            IPayor clientPayor = null;
            for (int i=0; i<annuity.getPayors().size(); i++) {     
                found = false// reset
                clientPayor = annuity.getPayors().get(i);
                for (IPayor resultPayor : results.getPayors()) {
                    if (clientPayor.getId().equals(resultPayor.getId())){
                        found = true;
                        assertEqual(annuity.getPayors().get(i), resultPayor,
                        "Annuity payor from Client is not equal to DB value at location: " +i , "Mismacth was found");
                    }else{
                        continue;
                    }
                }
                if (!(found) && clientPayor != null) {
                    throw new RuntimeException("Annuity: Payor from client is not equal to DB.  " +
                            "Found payor with id: " + clientPayor.getId() +
                            " on the client side, but not in the database for annuity id:" + annuity.getId());
                   
                }
            }
        }
View Full Code Here

Examples of org.apache.openjpa.persistence.proxy.entities.IPayor

            throw new RuntimeException("Annuity: IPayor list not the same (payors was null)!");
        if (payors.size() != payors2.size())
            throw new RuntimeException("Annuity: IPayor list not the same (payors size not the same)! payors=" +
                payors.toArray().toString() + ", payors2=" + payors2.toString());
        for (int i = 0; i < payors.size(); i++) {
            IPayor payor = payors.get(i);
            boolean found = false;
            for (int j = 0; i < payors2.size(); j++) {
                try {
                    assertEqual(payor, payors2.get(j), string, string2);
                    found = true;
View Full Code Here

Examples of org.apache.openjpa.persistence.proxy.entities.IPayor

            }
        }
    }

    private void verifyPayorValues(OpenJPAEntityManagerFactorySPI myEMF, IPayor payor) throws Exception {
        IPayor results = null;
        results = findPayorById(myEMF, Payor.class, payor.getId());
        assertEqual(payor, results,
                "Payor from Client is not equal to DB value.", "Mismacth was found.");
    }
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.