Examples of newTransaction()


Examples of org.odmg.Implementation.newTransaction()

     * @return The product if found
     */
    public static Product findProductByName(String name) throws Exception
    {
        Implementation impl = OJB.getInstance();
        Transaction    tx   = impl.newTransaction();

        tx.begin();

        OQLQuery query = impl.newOQLQuery();

View Full Code Here

Examples of org.odmg.Implementation.newTransaction()

     * @param number  The number of items to sell
     */
    public static void sellProduct(Product product, int number)
    {
        Implementation impl = OJB.getInstance();
        Transaction    tx   = impl.newTransaction();

        tx.begin();

        tx.lock(product, Transaction.WRITE);
        product.setStock(product.getStock() -  number);
View Full Code Here

Examples of org.odmg.Implementation.newTransaction()

     * @param product The product to delete
     */
    public static void deleteProduct(Product product)
    {
        Implementation impl = OJB.getInstance();
        Transaction    tx = impl.newTransaction();

        tx.begin();

        Database db = impl.getDatabase(product);

View Full Code Here

Examples of org.odmg.Implementation.newTransaction()

     * @param product The product to update in the database
     */
    public static void persistChanges(Product product)
    {
        Implementation impl = OJB.getInstance();
        TransactionExt tx  = (TransactionExt)impl.newTransaction();

        tx.begin();
        tx.markDirty(product);
        tx.commit();
    }
View Full Code Here

Examples of org.ozoneDB.ExternalDatabase.newTransaction()

        XMLContainer container = XMLContainer.forName( db, id );
        if (container == null) {
            container = XMLContainer.newContainer( db, id );
        }
       
        ExternalTransaction tx = db.newTransaction();
        try {
            long start = System.currentTimeMillis();
    
            tx.begin();
            start = System.currentTimeMillis();                   
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.