Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.RelatedToContract


        Criteria crit = new Criteria();
        crit.addEqualTo("pk", "C" + TIME);
        Query q = QueryFactory.newQuery(Contract.class, crit);
        Iterator it = _conn.getIteratorByQuery(q, LockType.WRITE_LOCK);
        Object retval = null;
        RelatedToContract r2c = new RelatedToContract();
        r2c.setPk("R2C" + TIME);
        r2c.setRelatedValue1("matt");
        r2c.setRelatedValue2(34);
        r2c.setRelatedValue3(new Timestamp(TIME));
        _conn.makePersistent(r2c);
        while (it.hasNext())
        {
            retval = it.next();
            ((Contract) retval).setRelatedToContract(r2c);
View Full Code Here


        contract.setContractValue2(1);
        contract.setContractValue3("contractvalue3");
        contract.setContractValue4(new Timestamp(System.currentTimeMillis()));
        database.makePersistent(contract);

        RelatedToContract rtc = new RelatedToContract();
        rtc.setPk("R" + System.currentTimeMillis());
        rtc.setRelatedValue1("test");
        rtc.setRelatedValue2(5);
        rtc.setRelatedValue3(new Timestamp(System.currentTimeMillis()));
        contract.setRelatedToContract(rtc);
        database.makePersistent(rtc);

        Version version = new Version();
        version.setPk("V" + System.currentTimeMillis());
View Full Code Here

        Criteria crit = new Criteria();
        crit.addEqualTo("pk", "C" + TIME);
        Query q = QueryFactory.newQuery(Contract.class, crit);
        Iterator it = _conn.getIteratorByQuery(q, LockType.WRITE_LOCK);
        Object retval = null;
        RelatedToContract r2c = new RelatedToContract();
        r2c.setPk("R2C" + TIME);
        r2c.setRelatedValue1("matt");
        r2c.setRelatedValue2(34);
        r2c.setRelatedValue3(new Timestamp(TIME));
        _conn.makePersistent(r2c);
        while (it.hasNext())
        {
            retval = it.next();
            ((Contract) retval).setRelatedToContract(r2c);
View Full Code Here

        contract.setContractValue2(1);
        contract.setContractValue3("contractvalue3");
        contract.setContractValue4(new Timestamp(System.currentTimeMillis()));
        database.makePersistent(contract);

        RelatedToContract rtc = new RelatedToContract();
        rtc.setPk("R" + System.currentTimeMillis());
        rtc.setRelatedValue1("test");
        rtc.setRelatedValue2(5);
        rtc.setRelatedValue3(new Timestamp(System.currentTimeMillis()));
        contract.setRelatedToContract(rtc);
        database.makePersistent(rtc);

        Version version = new Version();
        version.setPk("V" + System.currentTimeMillis());
View Full Code Here

TOP

Related Classes of org.apache.ojb.broker.RelatedToContract

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.