Package com.sap.cds.services.impl.draft
Class DraftServiceImpl
java.lang.Object
com.sap.cds.services.ServiceDelegator
com.sap.cds.services.utils.services.AbstractCqnService
com.sap.cds.services.impl.cds.AbstractCdsDefinedService
com.sap.cds.services.impl.cds.ApplicationServiceImpl
com.sap.cds.services.impl.draft.DraftServiceImpl
- All Implemented Interfaces:
ApplicationService,CqnService,DraftService,Service
-
Field Summary
Fields inherited from class com.sap.cds.services.utils.services.AbstractCqnService
runtimeFields inherited from interface com.sap.cds.services.cds.CqnService
EVENT_CREATE, EVENT_DELETE, EVENT_READ, EVENT_UPDATE, EVENT_UPSERTFields inherited from interface com.sap.cds.services.draft.DraftService
EVENT_ACTIVE_READ, EVENT_DRAFT_CANCEL, EVENT_DRAFT_CREATE, EVENT_DRAFT_EDIT, EVENT_DRAFT_GC, EVENT_DRAFT_NEW, EVENT_DRAFT_PATCH, EVENT_DRAFT_PREPARE, EVENT_DRAFT_READ, EVENT_DRAFT_SAVE -
Constructor Summary
ConstructorsConstructorDescriptionDraftServiceImpl(CdsProperties.Application.ApplicationServiceConfig config, CdsRuntime runtime) -
Method Summary
Modifier and TypeMethodDescriptioncom.sap.cds.ResultcancelDraft(com.sap.cds.ql.cqn.CqnDelete delete, Iterable<Map<String, Object>> valueSets) com.sap.cds.ResultcancelDraft(com.sap.cds.ql.cqn.CqnDelete delete, Object... paramValues) com.sap.cds.ResultcancelDraft(com.sap.cds.ql.cqn.CqnDelete delete, Map<String, Object> namedValues) com.sap.cds.ResultcreateDraft(com.sap.cds.ql.cqn.CqnInsert insert, boolean hasActiveEntity) Creates a draft entity by executing theinsertstatement.static DraftServiceImplcom.sap.cds.Resultcom.sap.cds.ResulteditDraft(com.sap.cds.ql.cqn.CqnSelect select, boolean preserveChanges, Map<String, Object> namedValues) com.sap.cds.ResultgcDrafts()com.sap.cds.ResultnewDraft(com.sap.cds.ql.cqn.CqnInsert insert) com.sap.cds.ResultpatchDraft(com.sap.cds.ql.cqn.CqnUpdate update, Iterable<Map<String, Object>> valueSets) com.sap.cds.ResultpatchDraft(com.sap.cds.ql.cqn.CqnUpdate update, Object... paramValues) com.sap.cds.ResultpatchDraft(com.sap.cds.ql.cqn.CqnUpdate update, Map<String, Object> namedValues) com.sap.cds.ResultprepareDraft(com.sap.cds.ql.cqn.CqnSelect select, String sideEffectsQualifier, Object... paramValues) com.sap.cds.ResultprepareDraft(com.sap.cds.ql.cqn.CqnSelect select, String sideEffectsQualifier, Map<String, Object> namedValues) com.sap.cds.ResultreadActive(com.sap.cds.ql.cqn.CqnSelect select, Object... paramValues) Reads the active draft-enabled entities.com.sap.cds.ResultreadActive(com.sap.cds.ql.cqn.CqnSelect select, Map<String, Object> namedValues) Reads the active draft-enabled entities.com.sap.cds.ResultReads the inactive draft-enabled entities.com.sap.cds.ResultReads the inactive draft-enabled entities.com.sap.cds.Resultcom.sap.cds.ResultMethods inherited from class com.sap.cds.services.impl.cds.AbstractCdsDefinedService
getDefinition, run, run, run, run, runMethods inherited from class com.sap.cds.services.utils.services.AbstractCqnService
getTargetEntity, list, run, run, run, run, runMethods inherited from class com.sap.cds.services.ServiceDelegator
after, before, emit, getDelegatedService, getName, onMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sap.cds.services.cds.ApplicationService
getDefinition
-
Constructor Details
-
DraftServiceImpl
public DraftServiceImpl(CdsProperties.Application.ApplicationServiceConfig config, CdsRuntime runtime)
-
-
Method Details
-
saveDraft
- Specified by:
saveDraftin interfaceDraftService
-
saveDraft
public com.sap.cds.Result saveDraft(com.sap.cds.ql.cqn.CqnSelect select, Map<String, Object> namedValues) - Specified by:
saveDraftin interfaceDraftService
-
prepareDraft
public com.sap.cds.Result prepareDraft(com.sap.cds.ql.cqn.CqnSelect select, String sideEffectsQualifier, Object... paramValues) - Specified by:
prepareDraftin interfaceDraftService
-
prepareDraft
public com.sap.cds.Result prepareDraft(com.sap.cds.ql.cqn.CqnSelect select, String sideEffectsQualifier, Map<String, Object> namedValues) - Specified by:
prepareDraftin interfaceDraftService
-
editDraft
public com.sap.cds.Result editDraft(com.sap.cds.ql.cqn.CqnSelect select, boolean preserveChanges, Object... paramValues) - Specified by:
editDraftin interfaceDraftService
-
editDraft
public com.sap.cds.Result editDraft(com.sap.cds.ql.cqn.CqnSelect select, boolean preserveChanges, Map<String, Object> namedValues) - Specified by:
editDraftin interfaceDraftService
-
newDraft
public com.sap.cds.Result newDraft(com.sap.cds.ql.cqn.CqnInsert insert) - Specified by:
newDraftin interfaceDraftService
-
patchDraft
- Specified by:
patchDraftin interfaceDraftService
-
patchDraft
public com.sap.cds.Result patchDraft(com.sap.cds.ql.cqn.CqnUpdate update, Map<String, Object> namedValues) - Specified by:
patchDraftin interfaceDraftService
-
patchDraft
public com.sap.cds.Result patchDraft(com.sap.cds.ql.cqn.CqnUpdate update, Iterable<Map<String, Object>> valueSets) - Specified by:
patchDraftin interfaceDraftService
-
cancelDraft
public com.sap.cds.Result cancelDraft(com.sap.cds.ql.cqn.CqnDelete delete, Iterable<Map<String, Object>> valueSets) - Specified by:
cancelDraftin interfaceDraftService
-
cancelDraft
- Specified by:
cancelDraftin interfaceDraftService
-
cancelDraft
public com.sap.cds.Result cancelDraft(com.sap.cds.ql.cqn.CqnDelete delete, Map<String, Object> namedValues) - Specified by:
cancelDraftin interfaceDraftService
-
gcDrafts
public com.sap.cds.Result gcDrafts()- Specified by:
gcDraftsin interfaceDraftService
-
downcast
-
readActive
Reads the active draft-enabled entities. Only intended for internal usage. Triggered as part of draft-based implementation ofCqnService.EVENT_READ. Instance based authorization or implicit sorting don't explicitly react on this event.- Parameters:
select- theCqnSelectto be executedparamValues- the optional positional parameter values- Returns:
- the
Resultof the query
-
readActive
public com.sap.cds.Result readActive(com.sap.cds.ql.cqn.CqnSelect select, Map<String, Object> namedValues) Reads the active draft-enabled entities. Only intended for internal usage. Triggered as part of draft-based implementation ofCqnService.EVENT_READ. Instance based authorization or implicit sorting don't explicitly react on this event.- Parameters:
select- theCqnSelectto be executednamedValues- the named parameter values- Returns:
- the
Resultof the query
-
readDraft
Reads the inactive draft-enabled entities. Only intended for internal usage. Triggered as part of draft-based implementation ofCqnService.EVENT_READ. Instance based authorization or implicit sorting don't explicitly react on this event.- Parameters:
select- theCqnSelectto be executedparamValues- the optional positional parameter values- Returns:
- the
Resultof the query
-
readDraft
public com.sap.cds.Result readDraft(com.sap.cds.ql.cqn.CqnSelect select, Map<String, Object> namedValues) Reads the inactive draft-enabled entities. Only intended for internal usage. Triggered as part of draft-based implementation ofCqnService.EVENT_READ. Instance based authorization or implicit sorting don't explicitly react on this event.- Parameters:
select- theCqnSelectto be executednamedValues- the named parameter values- Returns:
- the
Resultof the query
-
createDraft
public com.sap.cds.Result createDraft(com.sap.cds.ql.cqn.CqnInsert insert, boolean hasActiveEntity) Creates a draft entity by executing theinsertstatement. During execution of this method, no draft fields will be added. Hence, they must already be contained in the data of theinsertstatement.- Parameters:
insert- the statement to execute- Returns:
- the
Resultof the statement
-