Package com.sap.cds.services.draft
Interface DraftEditEventContext
- All Superinterfaces:
EventContext
The
EventContext
for the DraftService.EVENT_DRAFT_EDIT
event.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DraftEditEventContext
Creates anEventContext
already overlayed with this interface.com.sap.cds.ql.cqn.CqnSelect
getCqn()
The CQN named values, for parameterizedCqnSelect
statementscom.sap.cds.Result
Returns theService
(Consumption API) of the service, targeted by theEventContext
.void
setCqn
(com.sap.cds.ql.cqn.CqnSelect cqn) Sets theCqnSelect
statementvoid
setCqnNamedValues
(Map<String, Object> namedValues) Sets the CQN named values, for parameterizedCqnSelect
statementsvoid
setPreserveChanges
(boolean preserveChanges) Sets whether to preserve changes or notvoid
Sets the result of theDraftService.EVENT_DRAFT_EDIT
eventMethods inherited from interface com.sap.cds.services.EventContext
as, get, getAuthenticationInfo, getCdsRuntime, getChangeSetContext, getEvent, getFeatureTogglesInfo, getMessages, getModel, getParameterInfo, getServiceCatalog, getTarget, getUserInfo, isCompleted, keySet, put, setCompleted
-
Field Details
-
PRESERVE_CHANGES
- See Also:
-
-
Method Details
-
create
Creates anEventContext
already overlayed with this interface. The event is set to beDraftService.EVENT_DRAFT_EDIT
- Parameters:
entityName
- the name of the entity- Returns:
- the
DraftEditEventContext
-
getService
DraftService getService()Description copied from interface:EventContext
Returns theService
(Consumption API) of the service, targeted by theEventContext
. This is the service, on which theService.emit(EventContext)
method (or specialized Consumption API) was called.- Specified by:
getService
in interfaceEventContext
- Returns:
- the
Service
(Consumption API) of the service, targeted by theEventContext
.
-
getCqn
com.sap.cds.ql.cqn.CqnSelect getCqn()- Returns:
- the
CqnSelect
statement
-
setCqn
void setCqn(com.sap.cds.ql.cqn.CqnSelect cqn) Sets theCqnSelect
statement- Parameters:
cqn
- theCqnSelect
statement
-
setPreserveChanges
@CdsName("PreserveChanges") void setPreserveChanges(boolean preserveChanges) Sets whether to preserve changes or not- Parameters:
preserveChanges
- iftrue
changes will be preserved
-
getPreserveChanges
- Returns:
true
if changes should be preserved,false
otherwise
-
getCqnNamedValues
The CQN named values, for parameterizedCqnSelect
statements- Returns:
- the CQN named values
-
setCqnNamedValues
Sets the CQN named values, for parameterizedCqnSelect
statements- Parameters:
namedValues
- the CQN named values
-
getResult
com.sap.cds.Result getResult()- Returns:
- the
Result
of theDraftService.EVENT_DRAFT_EDIT
event
-
setResult
Sets the result of theDraftService.EVENT_DRAFT_EDIT
event- Parameters:
result
- aResult
or a list of Maps, which will be transformed into aResult
-