public interface DraftService extends ApplicationService
ApplicationService
that handles draft enabled entities.Modifier and Type | Field and Description |
---|---|
static String |
EVENT_DRAFT_CANCEL |
static String |
EVENT_DRAFT_CREATE |
static String |
EVENT_DRAFT_EDIT |
static String |
EVENT_DRAFT_GC |
static String |
EVENT_DRAFT_NEW |
static String |
EVENT_DRAFT_PATCH |
static String |
EVENT_DRAFT_PREPARE |
static String |
EVENT_DRAFT_SAVE |
EVENT_CREATE, EVENT_DELETE, EVENT_READ, EVENT_UPDATE, EVENT_UPSERT
Modifier and Type | Method and Description |
---|---|
com.sap.cds.Result |
cancelDraft(com.sap.cds.ql.cqn.CqnDelete delete,
Iterable<Map<String,Object>> valueSets)
Deletes draft entities by executing the provided
delete statement. |
com.sap.cds.Result |
cancelDraft(com.sap.cds.ql.cqn.CqnDelete delete,
Map<String,Object> namedValues)
Deletes draft entities by executing the provided
delete statement. |
com.sap.cds.Result |
cancelDraft(com.sap.cds.ql.cqn.CqnDelete delete,
Object... paramValues)
Deletes draft entities by executing the provided
delete statement. |
com.sap.cds.Result |
editDraft(com.sap.cds.ql.cqn.CqnSelect select,
boolean preserveChanges,
Map<String,Object> namedValues)
Creates a new draft entity from an active entity.
|
com.sap.cds.Result |
editDraft(com.sap.cds.ql.cqn.CqnSelect select,
boolean preserveChanges,
Object... paramValues)
Creates a new draft entity from an active entity.
|
com.sap.cds.Result |
gcDrafts()
This method deletes all drafts that exist longer than the draft deletion timeout (
cds.drafts.deletionTimeout ). |
com.sap.cds.Result |
newDraft(com.sap.cds.ql.cqn.CqnInsert insert)
Creates a new draft entity by executing the
insert statement. |
com.sap.cds.Result |
patchDraft(com.sap.cds.ql.cqn.CqnUpdate update,
Iterable<Map<String,Object>> valueSets)
Updates draft entities by executing the
update statement. |
com.sap.cds.Result |
patchDraft(com.sap.cds.ql.cqn.CqnUpdate update,
Map<String,Object> namedValues)
Updates draft entities by executing the
update statement. |
com.sap.cds.Result |
patchDraft(com.sap.cds.ql.cqn.CqnUpdate update,
Object... paramValues)
Updates draft entities by executing the
update statement. |
com.sap.cds.Result |
prepareDraft(com.sap.cds.ql.cqn.CqnSelect select,
String sideEffectsQualifier,
Map<String,Object> namedValues)
Executes checks to validate the current draft entity.
|
com.sap.cds.Result |
prepareDraft(com.sap.cds.ql.cqn.CqnSelect select,
String sideEffectsQualifier,
Object... paramValues)
Executes checks to validate the current draft entity.
|
com.sap.cds.Result |
saveDraft(com.sap.cds.ql.cqn.CqnSelect select,
Map<String,Object> namedValues)
Saves a draft.
|
com.sap.cds.Result |
saveDraft(com.sap.cds.ql.cqn.CqnSelect select,
Object... paramValues)
Saves a draft.
|
getDefinition
static final String EVENT_DRAFT_EDIT
static final String EVENT_DRAFT_PREPARE
static final String EVENT_DRAFT_SAVE
static final String EVENT_DRAFT_NEW
static final String EVENT_DRAFT_PATCH
static final String EVENT_DRAFT_CANCEL
static final String EVENT_DRAFT_CREATE
static final String EVENT_DRAFT_GC
com.sap.cds.Result saveDraft(com.sap.cds.ql.cqn.CqnSelect select, Object... paramValues)
select
- the select statement specifying the entity to saveparamValues
- the optional positional parameter valuesResult
com.sap.cds.Result saveDraft(com.sap.cds.ql.cqn.CqnSelect select, Map<String,Object> namedValues)
select
- the select statement specifying the entity to savenamedValues
- the named parameter valuesResult
com.sap.cds.Result prepareDraft(com.sap.cds.ql.cqn.CqnSelect select, String sideEffectsQualifier, Object... paramValues)
select
- the statement specifying the draft to preparesideEffectsQualifier
- the side effects qualifierparamValues
- the optional positional parameter valuesResult
com.sap.cds.Result prepareDraft(com.sap.cds.ql.cqn.CqnSelect select, String sideEffectsQualifier, Map<String,Object> namedValues)
select
- the statement specifying the draft to preparesideEffectsQualifier
- the side effects qualifiernamedValues
- the named parameter valuesResult
com.sap.cds.Result editDraft(com.sap.cds.ql.cqn.CqnSelect select, boolean preserveChanges, Object... paramValues)
select
- the statement specifying the active entity to editpreserveChanges
- if true
changes will be preservedparamValues
- the optional positional parameter valuesResult
com.sap.cds.Result editDraft(com.sap.cds.ql.cqn.CqnSelect select, boolean preserveChanges, Map<String,Object> namedValues)
select
- the statement specifying the active entity to editpreserveChanges
- if true
changes will be preservednamedValues
- the named parameter valuesResult
com.sap.cds.Result newDraft(com.sap.cds.ql.cqn.CqnInsert insert)
insert
statement.insert
- the statement to executeResult
of the insertcom.sap.cds.Result patchDraft(com.sap.cds.ql.cqn.CqnUpdate update, Object... paramValues)
update
statement.update
- the statement to executeparamValues
- the optional positional parameter valuesResult
of the updatecom.sap.cds.Result patchDraft(com.sap.cds.ql.cqn.CqnUpdate update, Map<String,Object> namedValues)
update
statement.update
- the statement to executenamedValues
- the named parameter valuesResult
of the updatecom.sap.cds.Result patchDraft(com.sap.cds.ql.cqn.CqnUpdate update, Iterable<Map<String,Object>> valueSets)
update
statement.update
- the statement to executevalueSets
- the named parameter valuesResult
of the updatecom.sap.cds.Result cancelDraft(com.sap.cds.ql.cqn.CqnDelete delete, Object... paramValues)
delete
statement.delete
- the CqnDelete
to be executedparamValues
- the optional positional parameter valuesResult
of the deletecom.sap.cds.Result cancelDraft(com.sap.cds.ql.cqn.CqnDelete delete, Map<String,Object> namedValues)
delete
statement.delete
- the CqnDelete
to be executednamedValues
- the named parameter valuesResult
of the deletecom.sap.cds.Result cancelDraft(com.sap.cds.ql.cqn.CqnDelete delete, Iterable<Map<String,Object>> valueSets)
delete
statement.delete
- the statement to executevalueSets
- the named parameter valuesResult
of the deletecom.sap.cds.Result gcDrafts()
cds.drafts.deletionTimeout
).Result
containing the number of deleted entriesCopyright © 2022. All rights reserved.