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 TypeMethodDescriptionvoidcancel()Defines how the underlying resource of thisChangeSetMembercan be cancelled (rolled back)voidcomplete()Defines how the underlying resource of thisChangeSetMembercan be completed (committed)getName()The name should be directly linked to the resource theChangeSetMembermanages, e.g.booleanDefines, if the underlying resource of thisChangeSetMemberwas requested to be cancelled (rolled back).
-
Method Details
-
getName
String getName()The name should be directly linked to the resource theChangeSetMembermanages, e.g. thePersistenceServicename. 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 thisChangeSetMembercan be completed (committed) -
cancel
void cancel()Defines how the underlying resource of thisChangeSetMembercan be cancelled (rolled back) -
isMarkedForCancel
boolean isMarkedForCancel()Defines, if the underlying resource of thisChangeSetMemberwas requested to be cancelled (rolled back). Please note that usually aChangeSetContextis 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.
-