Package org.apache.ojb.odmg

Examples of org.apache.ojb.odmg.TransactionImpl$CascadeSettingException


    public PBKey getPBKey()
    {
        if(pbKey == null)
        {
            TransactionImpl tx = getTransaction();
            if(tx != null && tx.isOpen())
            {
                pbKey = tx.getBroker().getPBKey();
            }
        }
        return pbKey;
    }
View Full Code Here


    public PBKey getPBKey()
    {
        if(pbKey == null)
        {
            TransactionImpl tx = getTransaction();
            if(tx != null && tx.isOpen())
            {
                pbKey = tx.getBroker().getPBKey();
            }
        }
        return pbKey;
    }
View Full Code Here

        {
            return realSubject;
        }
        else
        {
            TransactionImpl tx = getTransaction();
            if(tx != null && tx.isOpen())
            {
                prepareRealSubject(tx.getBroker());
                if(realSubject != null)
                {
                    RuntimeObject rt = new RuntimeObject(realSubject, tx, false);
                    tx.lockAndRegister(rt, Transaction.READ, tx.getRegistrationList());
                }
            }
            else
            {
                PBKey aPbKey = getPBKey();
View Full Code Here

     * @see java.util.Iterator#remove()
     */
    public void remove()
    {
        iter.remove();
        TransactionImpl tx = dSet.getTransaction();
        if (tx != null)
        {
            tx.markDelete(currentEntry);
        }
        currentEntry = null;
    }
View Full Code Here

    {
        DListEntry entry = new DListEntry(this.dlist, obj);
        entry.setPosition(this.nextIndex() - 1);
        iter.add(entry);

        TransactionImpl tx = dlist.getTransaction();
        if (tx != null)
        {
            RuntimeObject rt = new RuntimeObject(entry, tx, true);
            tx.lockAndRegister(rt, Transaction.WRITE, false, tx.getRegistrationList());
        }
    }
View Full Code Here

     * @see java.util.ListIterator#remove()
     */
    public void remove()
    {
        iter.remove();
        TransactionImpl tx = dlist.getTransaction();
        if (tx != null)
        {
            tx.markDelete(currentEntry);
        }
        currentEntry = null;
    }
View Full Code Here

        {
            this.size++;
            DSetEntry entry = new DSetEntry(this, o);
            elements.add(entry);
            // if we are in a transaction: get locks !
            TransactionImpl tx = getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(o, Transaction.READ);
            }
            return true;
        }
        else
        {
View Full Code Here

    {
        DListEntry_2 entry = new DListEntry_2(this.dlist, obj);
        entry.setPosition(this.nextIndex() - 1);
        iter.add(entry);

        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (tx != null)
        {
            tx.lock(entry, Transaction.WRITE);
            entry.prepareForPersistency(tx.getBroker());
        }
    }
View Full Code Here

     * method.
     */
    public void remove()
    {
        iter.remove();
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (tx != null)
        {
            tx.markDelete(currentEntry);
        }
        currentEntry = null;
    }
View Full Code Here

    /**
     * setValue method comment.
     */
    public Object setValue(Object obj)
    {
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (tx != null)
        {
            tx.lock(this, Transaction.WRITE);
        }
        valueRealSubject = obj;
        PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
        valueOID = new Identity(obj,broker);
        broker.close();
View Full Code Here

TOP

Related Classes of org.apache.ojb.odmg.TransactionImpl$CascadeSettingException

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.