Package org.apache.ojb.broker

Examples of org.apache.ojb.broker.PerformanceArticle


        _kit = TestKit.getTestInstance();
        _conn = _kit.acquireConnection(PersistenceBrokerFactory.getDefaultKey());
        arr = new PerformanceArticle[articleCount];
        for (int i = 0; i < articleCount; i++)
        {
            PerformanceArticle a = createArticle(offsetId + i);
            arr[i] = a;
        }
    }
View Full Code Here


     * @return the created PerformanceArticle object
     * @param id the primary key value for the new object
     */
    private PerformanceArticle createArticle(int id)
    {
        PerformanceArticle a = new PerformanceArticle();
        a.setArticleId(id);
        a.setArticleName("New Performance Article " + id);
        a.setMinimumStock(100);
        a.setOrderedUnits(17);
        a.setPrice(0.45);
        a.setProductGroupId(1);
        a.setStock(234);
        a.setSupplierId(4);
        a.setUnit("bottle");
        return a;
    }
View Full Code Here

        tx.begin();
        for (int i = 0; i < articleCount; i++)
        {
            Object[] pks = {new Integer(offsetId + i)};
            Identity oid = new Identity(PerformanceArticle.class, PerformanceArticle.class,pks);
            PerformanceArticle a = (PerformanceArticle) _conn.getObjectByIdentity(oid, LockType.NO_LOCK);
        }
        tx.commit();
        long stop = System.currentTimeMillis();
        logger.info("querying " + articleCount + " Objects: " + (stop - start) + " msec");
    }
View Full Code Here

        Iterator iter = _conn.getIteratorByQuery(q, LockType.NO_LOCK);
        int fetchCount = 0;
        while (iter.hasNext())
        {
            fetchCount++;
            PerformanceArticle a = (PerformanceArticle) iter.next();
        }
    tx.commit();
        long stop = System.currentTimeMillis();
        logger.info("fetching " + fetchCount + " Objects: " + (stop - start) + " msec");
    }
View Full Code Here

    {
        databaseName = TestHelper.DEF_DATABASE_NAME;
        arr = new PerformanceArticle[articleCount];
        for (int i = 0; i < articleCount; i++)
        {
            PerformanceArticle a = createArticle(offsetId + i);
            arr[i] = a;
        }
    }
View Full Code Here

     * @return the created PerformanceArticle object
     * @param id the primary key value for the new object
     */
    private PerformanceArticle createArticle(int id)
    {
        PerformanceArticle a = new PerformanceArticle();
        a.setArticleId(id);
        a.setArticleName("New Performance Article " + id);
        a.setMinimumStock(100);
        a.setOrderedUnits(17);
        a.setPrice(0.45);
        a.setProductGroupId(1);
        a.setStock(234);
        a.setSupplierId(4);
        a.setUnit("bottle");
        return a;
    }
View Full Code Here

        Iterator iter = collection.ojbIterator();
        int fetchCount = 0;
        while (iter.hasNext())
        {
            fetchCount++;
            PerformanceArticle a = (PerformanceArticle) iter.next();
        }
        long stop = System.currentTimeMillis();
        db.close();
        logger.info("fetching " + fetchCount + " Objects: " + (stop - start) + " msec");
    }
View Full Code Here

TOP

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

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.