Examples of ojbIterator()


Examples of org.apache.ojb.broker.ManageableCollection.ojbIterator()

         * try doing this as part of one transaction, ODMG should figure out
         * which order to delete in.
         */
        all = (ManageableCollection) query.execute();
        // Iterator over the restricted articles objects
        it = all.ojbIterator();
        Effectiveness eff = null;
        Version ver = null;
        Contract contract = null;
        /**
         * should mark all these objects for delete then on commit
View Full Code Here

Examples of org.apache.ojb.broker.ManageableCollection.ojbIterator()

         * run query again, should get 0 results.
         */
        query.create("select contracts from " + org.apache.ojb.broker.Contract.class.getName());
        ManageableCollection allContracts = (ManageableCollection) query.execute();
        allContracts = (ManageableCollection) query.execute();
        it = allContracts.ojbIterator();
        if (it.hasNext())
        {
            fail("all contracts should have been removed, we found one.");
        }
    }
View Full Code Here

Examples of org.apache.ojb.broker.ManageableCollection.ojbIterator()

        query.create(sql);

        ManageableCollection allEffectiveness = (ManageableCollection) query.execute();

        // Iterator over the restricted articles objects
        java.util.Iterator it = allEffectiveness.ojbIterator();
        int i = 0;
        while (it.hasNext())
        {
            Effectiveness value = (Effectiveness) it.next();
            /**
 
View Full Code Here

Examples of org.apache.ojb.broker.ManageableCollection.ojbIterator()

        query.create(sql);
        query.bind("version1");
        tx.begin();
        ManageableCollection results = (ManageableCollection) query.execute();
        // Iterator over the restricted articles objects
        java.util.Iterator it = results.ojbIterator();
        Version ver1 = null;
        while (it.hasNext())
        {
            ver1 = (Version) it.next();
            if (!ver1.getContract().getPk().equals(contract2.getPk()))
View Full Code Here

Examples of org.apache.ojb.broker.ManageableCollection.ojbIterator()

        query2.create(sql2);
        query2.bind("version2");
        tx.begin();
        results = (ManageableCollection) query2.execute();
        // Iterator over the restricted articles objects
        java.util.Iterator it2 = results.ojbIterator();
        Version ver2 = null;
        while (it2.hasNext())
        {
            ver2 = (Version) it2.next();
            if (!ver2.getContract().getPk().equals(contract.getPk()))
View Full Code Here

Examples of org.apache.ojb.broker.ManageableCollection.ojbIterator()

                }
            }

            // BRJ: fire LifeCycleEvents after execution of RetrievalTasks
            // to ensure objects are fully materialized
            Iterator resultIter = result.ojbIterator();
            while (resultIter.hasNext())
            {
                Object obj = resultIter.next();
                afterLookupEvent.setTarget(obj);
                pb.fireBrokerEvent(afterLookupEvent);
View Full Code Here

Examples of org.apache.ojb.broker.ManageableCollection.ojbIterator()

            query.create(sql);

            ManageableCollection result = (ManageableCollection) query.execute();

            // Iterator over the restricted articles objects
            java.util.Iterator it = result.ojbIterator();
            int i = 0;
            while (it.hasNext())
            {
                Object[] res = (Object[]) it.next();
                String firstname = (String) res[0];
View Full Code Here

Examples of org.apache.ojb.broker.ManageableCollection.ojbIterator()

        OQLQuery query = odmg.newOQLQuery();
        String sql = "select allArticles from " + PerformanceArticle.class.getName() + " where articleId between " + new Integer(offsetId) + " and " + new Integer(offsetId + articleCount);
        query.create(sql);
        long start = System.currentTimeMillis();
        ManageableCollection collection = (ManageableCollection) query.execute();
        Iterator iter = collection.ojbIterator();
        int fetchCount = 0;
        while (iter.hasNext())
        {
            fetchCount++;
            PerformanceArticle a = (PerformanceArticle) iter.next();
View Full Code Here

Examples of org.apache.ojb.broker.ManageableCollection.ojbIterator()

        OQLQuery query = odmg.newOQLQuery();
        int i = 0;
        query.create("select bidirectionalAssociationObjectA from " + BidirectionalAssociationObjectA.class.getName() + " where pk=$1");
        query.bind("A"+currentTime);
        ManageableCollection all = (ManageableCollection) query.execute();
        java.util.Iterator it = all.ojbIterator();
        while (it.hasNext())
        {
            i++;
            a = (BidirectionalAssociationObjectA) it.next();
            if (a.getRelatedB() == null)
View Full Code Here

Examples of org.apache.ojb.broker.ManageableCollection.ojbIterator()

        query = odmg.newOQLQuery();
        i = 0;
        query.create("select bidirectionalAssociationObjectB from " + BidirectionalAssociationObjectB.class.getName() + " where pk=$1");
        query.bind("B"+currentTime);
        all = (ManageableCollection) query.execute();
        it = all.ojbIterator();
        while (it.hasNext())
        {
            i++;
            b = (BidirectionalAssociationObjectB) it.next();
            if (b.getRelatedA() == null)
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.