Package org.apache.ojb.odmg

Examples of org.apache.ojb.odmg.TransactionImpl


    {
        this.pbKey = theDlist.getPBKey();
        this.m_dList = theDlist;
        this.dlistId = theDlist.getId();
        this.position = theDlist.size();
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (tx != null)
            oid = new Identity(theObject, tx.getBroker());
        else
        {
          PersistenceBroker broker = PersistenceBrokerFactory.defaultPersistenceBroker();
            oid = new Identity(theObject, broker);
            broker.close();
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

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

        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (tx != null)
        {
            tx.lock(entry, Transaction.WRITE);
        }
    }
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

    {
        DListEntry_2 entry = prepareEntry(element);
        elements.add(index, entry);
        this.size++;
        // if we are in a transaction: acquire locks !
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (checkForOpenTransaction(tx))
        {
            tx.lock(this, Transaction.WRITE);
            tx.lock(entry, Transaction.WRITE);
            tx.lock(element, Transaction.READ);
            entry.prepareForPersistency(tx.getBroker());
        }

        // changing the position markers of entries:
        int offset = 0;
        try
View Full Code Here

     */
    public Object remove(int index)
    {
        DListEntry_2 entry = (DListEntry_2) elements.get(index);
        // if we are in a transaction: acquire locks !
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if (checkForOpenTransaction(tx))
        {
            tx.markDelete(entry);
        }
        this.size--;
        elements.remove(index);
        // changing the position markers of entries:
        int offset = 0;
View Full Code Here

     */
    public Object remove(int index)
    {
        DListEntry entry = (DListEntry) elements.get(index);
        // if we are in a transaction: acquire locks !
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if ((tx != null) && (tx.isOpen()))
        {
            tx.markDelete(entry);
        }
        this.size--;
        elements.remove(index);
        // changing the position markers of entries:
        int offset = 0;
View Full Code Here

        DMapEntry entry = new DMapEntry(this, key, value);
        boolean ok = entries.add(entry);
        if (ok)
        {
            TransactionImpl tx = TxManagerFactory.instance().getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.lock(this, Transaction.WRITE);
                tx.lock(entry, Transaction.WRITE);
                tx.lock(key, Transaction.READ);
                tx.lock(value, Transaction.READ);
            }
            return null;
        }
        else
        {
View Full Code Here

        Object oldValue = null;
        if (correctEntry != null)
        {
            oldValue = correctEntry.getValue();
            i.remove();
            TransactionImpl tx = TxManagerFactory.instance().getTransaction();
            if ((tx != null) && (tx.isOpen()))
            {
                tx.markDelete(correctEntry);
            }
        }
        return oldValue;
    }
View Full Code Here

     */
    public Object remove(int index)
    {
        DListEntry entry = (DListEntry) elements.get(index);
        // if we are in a transaction: acquire locks !
        TransactionImpl tx = TxManagerFactory.instance().getTransaction();
        if ((tx != null) && (tx.isOpen()))
        {
            tx.markDelete(entry);
        }
        this.size--;
        elements.remove(index);
        // changing the position markers of entries:
        int offset = 0;
View Full Code Here

TOP

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

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.