Package com.sap.cds.services.changeset
Interface ChangeSetMember
- All Known Implementing Classes:
ChangeSetMemberDelegate
public interface ChangeSetMember
A
ChangeSetMember
links a certain resource to a ChangeSetContext
.
It defines how this resource is completed (committed) or cancelled (rolled back).
A common implementation of a ChangeSetMember
is the ChangeSetMemberDelegate
, which wraps a given TransactionManager
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
cancel()
Defines how the underlying resource of thisChangeSetMember
can be cancelled (rolled back)void
complete()
Defines how the underlying resource of thisChangeSetMember
can be completed (comitted)getName()
The name should be directly linked to the resource theChangeSetMember
manages, e.g.boolean
Defines, if the underlying resource of thisChangeSetMember
was requested to be cancelled (rolled back).
-
Method Details
-
getName
String getName()The name should be directly linked to the resource theChangeSetMember
manages, e.g. thePersistenceService
name. It can be used to ensure that a resource is only registered once on a givenChangeSetContext
.- Returns:
- the name of the
ChangeSetMember
-
complete
void complete()Defines how the underlying resource of thisChangeSetMember
can be completed (comitted) -
cancel
void cancel()Defines how the underlying resource of thisChangeSetMember
can be cancelled (rolled back) -
isMarkedForCancel
boolean isMarkedForCancel()Defines, if the underlying resource of thisChangeSetMember
was requested to be cancelled (rolled back). Please note that usually aChangeSetContext
is marked for cancel as a whole throughChangeSetContext.markForCancel()
This method is mainly intended if there is some other (outside) API available, that could set the cancellation marker on the underlying resource.- Returns:
- true, if the underlying resource was marked for cancellation through some (outside) API.
-