Interface TransactionIF

  • All Known Implementing Classes:
    AbstractTransaction, ROTransaction, RWTransaction

    public interface TransactionIF
    INTERNAL: Interface that manages object transactions using the proxy framework.

    This class is similar to the JDO PersistenceManager, StateManager and Transaction interfaces.

    • Method Detail

      • getId

        String getId()
        INTERNAL: Gets the transaction id. This id is unique for a given StorageIF instance.
      • getStorageAccess

        StorageAccessIF getStorageAccess()
        INTERNAL: Gets the storage access used by the transaction.
      • getObjectAccess

        ObjectAccessIF getObjectAccess()
        INTERNAL: Gets the object access used by the transaction.
      • getAccessRegistrar

        AccessRegistrarIF getAccessRegistrar()
        INTERNAL: Gets the access registrar used by the transaction.
      • isReadOnly

        boolean isReadOnly()
        INTERNAL: Returns true if this is a read-only transaction.
      • isActive

        boolean isActive()
        INTERNAL: Returns true the transaction is active.
      • isClean

        boolean isClean()
        INTERNAL: Returns true the transaction is clean, i.e. no changes have been made.
      • validate

        boolean validate()
        INTERNAL: Returns true if the transaction is valid.
      • begin

        void begin()
        INTERNAL: Begins a new transaction.
      • commit

        void commit()
        INTERNAL: Commits the changes performed in the transaction.
      • abort

        void abort()
        INTERNAL: Aborts the changes performed in the transaction.
      • close

        void close()
        INTERNAL: Releases all resources used by the transaction.
      • flush

        void flush()
        INTERNAL: Stores all pending changes in the data repository. Note that the transaction is not commited.
      • getObject

        PersistentIF getObject​(IdentityIF identity)
        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.
      • getObject

        PersistentIF getObject​(IdentityIF identity,
                               boolean acceptDeleted)
        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.
      • assignIdentity

        void assignIdentity​(PersistentIF object)
      • create

        void create​(PersistentIF object)
        INTERNAL: Registers the object with the transaction and marks it for creation in the data repository.
      • delete

        void delete​(PersistentIF identity)
        INTERNAL: Unregisters the object with the transaction and marks it for deletion in the data repository.
      • objectDirty

        void objectDirty​(PersistentIF object)
        INTERNAL: Called by PersistentIFs when the object's data has changed.
      • objectRead

        void objectRead​(IdentityIF identity)
      • objectCreated

        void objectCreated​(PersistentIF object)
      • objectDeleted

        void objectDeleted​(PersistentIF object)
      • loadField

        <F> F loadField​(IdentityIF object,
                        int field)
                 throws IdentityNotFoundException
        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.
        Returns:
        the field value that was loaded.
        Throws:
        IdentityNotFoundException - if the identity was not found.
      • isObjectLoaded

        boolean isObjectLoaded​(IdentityIF identity)
        EXPERIMENTAL:
      • isFieldLoaded

        boolean isFieldLoaded​(IdentityIF identity,
                              int field)
        EXPERIMENTAL:
      • isObjectClean

        boolean isObjectClean​(IdentityIF identity)
      • executeQuery

        Object executeQuery​(String name,
                            Object[] params)
        INTERNAL: Executes the named query. The parameters given in the params parameter are used during the execution of the query.
      • createQuery

        QueryIF createQuery​(JDOQuery jdoquery,
                            boolean resolve_identities)
        INTERNAL: Build a QueryIF from the specified JDO query instance.