Class AbstractTransaction

    • Method Detail

      • getId

        public String getId()
        Description copied from interface: TransactionIF
        INTERNAL: Gets the transaction id. This id is unique for a given StorageIF instance.
        Specified by:
        getId in interface TransactionIF
      • isActive

        public boolean isActive()
        Description copied from interface: TransactionIF
        INTERNAL: Returns true the transaction is active.
        Specified by:
        isActive in interface TransactionIF
      • validate

        public boolean validate()
        Description copied from interface: TransactionIF
        INTERNAL: Returns true if the transaction is valid.
        Specified by:
        validate in interface TransactionIF
      • begin

        public void begin()
        Description copied from interface: TransactionIF
        INTERNAL: Begins a new transaction.
        Specified by:
        begin in interface TransactionIF
      • commit

        public void commit()
        Description copied from interface: TransactionIF
        INTERNAL: Commits the changes performed in the transaction.
        Specified by:
        commit in interface TransactionIF
      • abort

        public void abort()
        Description copied from interface: TransactionIF
        INTERNAL: Aborts the changes performed in the transaction.
        Specified by:
        abort in interface TransactionIF
      • close

        public void close()
        Description copied from interface: TransactionIF
        INTERNAL: Releases all resources used by the transaction.
        Specified by:
        close in interface TransactionIF
      • flush

        public abstract void flush()
        Description copied from interface: TransactionIF
        INTERNAL: Stores all pending changes in the data repository. Note that the transaction is not commited.
        Specified by:
        flush in interface TransactionIF
      • transactionPreCommit

        protected abstract void transactionPreCommit()
      • transactionPostCommit

        protected abstract void transactionPostCommit()
      • transactionPreAbort

        protected abstract void transactionPreAbort()
      • transactionPostAbort

        protected abstract void transactionPostAbort()
      • loadField

        public <F> F loadField​(IdentityIF identity,
                               int field)
        Description copied from interface: TransactionIF
        INTERNAL: Called by PersistentIFs when the value of the specified field is requested. Note that the persistent object will be notified through the _p_setValue method, so there is usually no need to use the return value to set the instance member.
        Specified by:
        loadField in interface TransactionIF
        Returns:
        the field value that was loaded.
      • objectMerged

        public void objectMerged​(IdentityIF source,
                                 IdentityIF target)
        INTERNAL: Called by other transactions to notify this transaction of committed merges. Default implementation is empty.
        Parameters:
        source - The identity of the object merged into target
        target - The identity of the target object that was merged
        Since:
        5.4.0
      • getObject

        public PersistentIF getObject​(IdentityIF identity)
        Description copied from interface: TransactionIF
        INTERNAL: Gets the object instance with the given identity. If the identity is known not to exist in the data repository an exception will be thrown. Deleted objects will not be returned from this method.
        Specified by:
        getObject in interface TransactionIF
      • getObject

        public PersistentIF getObject​(IdentityIF identity,
                                      boolean acceptDeleted)
        Description copied from interface: TransactionIF
        INTERNAL: Gets the object instance with the given identity. If the identity is known not to exist in the data repository an exception will be thrown. Known and still existing object instances of deleted objects will be returned from this method if the acceptDeleted flag is true.
        Specified by:
        getObject in interface TransactionIF
      • checkIdentityMapAndCreateInstance

        protected PersistentIF checkIdentityMapAndCreateInstance​(IdentityIF identity)
      • executeQuery

        public Object executeQuery​(String name,
                                   Object[] params)
        Description copied from interface: TransactionIF
        INTERNAL: Executes the named query. The parameters given in the params parameter are used during the execution of the query.
        Specified by:
        executeQuery in interface TransactionIF
      • createQuery

        public QueryIF createQuery​(JDOQuery jdoquery,
                                   boolean resolve_identities)
        Description copied from interface: TransactionIF
        INTERNAL: Build a QueryIF from the specified JDO query instance.
        Specified by:
        createQuery in interface TransactionIF
      • registerQuery

        protected void registerQuery​(String name,
                                     QueryIF query)