Interface UserServiceTransactionManager

All Known Subinterfaces:
UserServiceEventContext, UserServiceProcessEventOutcomeContext<S>

public interface UserServiceTransactionManager
This class provides methods to execute transactions from a user service.
Since:
5.8.0
  • Method Details

    • save

      ProcedureResult save(ObjectKey... objectKeys)
      Updates or creates a list of previously registered objects. The user interface will automatically report error messages. All updates and creations are executed in the same transaction.

      Calling this method is similar to calling save(true, objectKeys).

      Parameters:
      objectKeys - the keys of the objects to update or create. The object must be a record or a dataset.
      Returns:
      the result of the execution.
      Throws:
      UserServiceException - if:
      • An object does not exist,
      • An object is not a record or a dataset,
      • Objects are not all from the same dataspace.
      See Also:
    • save

      ProcedureResult save(boolean addErrorMessageIfException, ObjectKey... objectKeys)
      Updates or creates a list of previously registered objects. All updates and creations are executed in the same transaction.

      If one of the object key represents a record which have been previously deleted, this method will not save it, but will display a warning instead.

      Parameters:
      addErrorMessageIfException - specifies whether the user interface automatically reports an error message whenever the execution has encountered an error.
      objectKeys - the keys of the objects to update or create. The object must be a record or a dataset.
      Returns:
      the result of the execution.
      Throws:
      UserServiceException - if:
      • An object does not exist,
      • An object is not a record or a dataset,
      • Objects are not all from the same dataspace.
    • createTransaction

      UserServiceTransaction createTransaction()
      Creates an instance of UserServiceTransaction object that allows to mix in a single transaction: record creations, record or dataset updates and custom procedure executions.
      Returns:
      the new UserServiceTransaction object.