public interface DraftEditEventContext extends EventContext
EventContext
for the DraftService.EVENT_DRAFT_EDIT
event.Modifier and Type | Field and Description |
---|---|
static String |
PRESERVE_CHANGES |
Modifier and Type | Method and Description |
---|---|
static DraftEditEventContext |
create(String entityName)
Creates an
EventContext already overlayed with this interface. |
com.sap.cds.ql.cqn.CqnSelect |
getCqn() |
Map<String,Object> |
getCqnNamedValues()
The CQN named values, for parameterized
CqnSelect statements |
Boolean |
getPreserveChanges() |
com.sap.cds.Result |
getResult() |
DraftService |
getService()
Returns the
Service (Consumption API) of the service, targeted by the EventContext . |
void |
setCqn(com.sap.cds.ql.cqn.CqnSelect cqn)
Sets the
CqnSelect statement |
void |
setCqnNamedValues(Map<String,Object> namedValues)
Sets the CQN named values, for parameterized
CqnSelect statements |
void |
setPreserveChanges(boolean preserveChanges)
Sets whether to preserve changes or not
|
void |
setResult(Iterable<? extends Map<String,?>> result)
Sets the result of the
DraftService.EVENT_DRAFT_EDIT event |
as, create, create, get, getAuthenticationInfo, getCdsRuntime, getChangeSetContext, getEvent, getFeatureTogglesInfo, getMessages, getModel, getParameterInfo, getServiceCatalog, getTarget, getUserInfo, isCompleted, keySet, put, setCompleted
static final String PRESERVE_CHANGES
static DraftEditEventContext create(String entityName)
EventContext
already overlayed with this interface. The event is set to be DraftService.EVENT_DRAFT_EDIT
entityName
- the name of the entityDraftEditEventContext
DraftService getService()
EventContext
Service
(Consumption API) of the service, targeted by the EventContext
.
This is the service, on which the Service.emit(EventContext)
method (or specialized Consumption API) was called.getService
in interface EventContext
Service
(Consumption API) of the service, targeted by the EventContext
.com.sap.cds.ql.cqn.CqnSelect getCqn()
CqnSelect
statementvoid setCqn(com.sap.cds.ql.cqn.CqnSelect cqn)
CqnSelect
statementcqn
- the CqnSelect
statement@CdsName(value="PreserveChanges") void setPreserveChanges(boolean preserveChanges)
preserveChanges
- if true
changes will be preserved@CdsName(value="PreserveChanges") Boolean getPreserveChanges()
true
if changes should be preserved, false
otherwiseMap<String,Object> getCqnNamedValues()
CqnSelect
statementsvoid setCqnNamedValues(Map<String,Object> namedValues)
CqnSelect
statementsnamedValues
- the CQN named valuescom.sap.cds.Result getResult()
Result
of the DraftService.EVENT_DRAFT_EDIT
eventvoid setResult(Iterable<? extends Map<String,?>> result)
DraftService.EVENT_DRAFT_EDIT
eventresult
- a Result
or a list of Maps, which will be transformed into a Result
Copyright © 2023. All rights reserved.