Interface Transaction

    • Method Detail

      • getId

        String getId()
        Gets the unique identifier of the transaction.
        Returns:
        the unique identifier of the transaction.
      • getState

        TransactionState getState()
        Returns the current state of the transaction.
        Returns:
        the current state of the transaction.
      • getRepository

        <T> ObjectRepository<T> getRepository​(Class<T> type)
        Gets an ObjectRepository to perform transactional operations on it.
        Type Parameters:
        T - the type parameter
        Parameters:
        type - the type
        Returns:
        the repository
      • getRepository

        <T> ObjectRepository<T> getRepository​(Class<T> type,
                                              String key)
        Gets an ObjectRepository to perform transactional operations on it.
        Type Parameters:
        T - the type parameter
        Parameters:
        type - the type
        key - the key
        Returns:
        the repository
      • getRepository

        <T> ObjectRepository<T> getRepository​(EntityDecorator<T> entityDecorator)
        Gets an ObjectRepository to perform transactional operations on it.
        Type Parameters:
        T - the type parameter
        Parameters:
        entityDecorator - the entityDecorator
        Returns:
        the repository
      • getRepository

        <T> ObjectRepository<T> getRepository​(EntityDecorator<T> entityDecorator,
                                              String key)
        Gets an ObjectRepository to perform transactional operations on it.
        Type Parameters:
        T - the type parameter
        Parameters:
        entityDecorator - the entityDecorator
        key - the key
        Returns:
        the repository
      • commit

        void commit()
        Completes the transaction and commits the data to the underlying store.
      • rollback

        void rollback()
        Rolls back the transaction, discarding any changes made during the transaction.