Package com.sap.cds.services.impl.draft
Class DraftCreateEventContextImpl
java.lang.Object
com.sap.cds.services.impl.EventContextDelegator
com.sap.cds.services.impl.draft.DraftCreateEventContextImpl
- All Implemented Interfaces:
DraftCreateEventContext,EventContext
public class DraftCreateEventContextImpl
extends EventContextDelegator
implements DraftCreateEventContext
Implementation of the
EventContext for the DraftService.EVENT_DRAFT_CREATE event.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.sap.cds.ql.cqn.CqnInsertgetCqn()com.sap.cds.ResultvoidsetCqn(com.sap.cds.ql.cqn.CqnInsert cqn) Sets theCqnInsertstatementvoidsetHasActiveEntity(boolean hasActiveEntity) Set totrueif the draft is created from an existing active entity (edit scenario),falseotherwise (new scenario)voidSets the result of theDraftService.EVENT_DRAFT_CREATEeventMethods inherited from class com.sap.cds.services.impl.EventContextDelegator
as, get, getAuthenticationInfo, getCdsRuntime, getChangeSetContext, getDelegatedEventContext, getEvent, getFeatureTogglesInfo, getMessages, getModel, getParameterInfo, getServiceCatalog, getTarget, getUserInfo, isCompleted, keySet, put, setCompletedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
Constructor Details
-
DraftCreateEventContextImpl
-
-
Method Details
-
getService
- Specified by:
getServicein interfaceDraftCreateEventContext- Specified by:
getServicein interfaceEventContext- Overrides:
getServicein classEventContextDelegator
-
getCqn
public com.sap.cds.ql.cqn.CqnInsert getCqn()- Specified by:
getCqnin interfaceDraftCreateEventContext- Returns:
- the
CqnInsertstatement
-
setCqn
public void setCqn(com.sap.cds.ql.cqn.CqnInsert cqn) Sets theCqnInsertstatement- Specified by:
setCqnin interfaceDraftCreateEventContext- Parameters:
cqn- theCqnInsertstatement
-
getHasActiveEntity
- Specified by:
getHasActiveEntityin interfaceDraftCreateEventContext- Returns:
trueif the draft is created from an existing active entity (edit scenario),falseotherwise (new scenario)
-
setHasActiveEntity
public void setHasActiveEntity(boolean hasActiveEntity) Set totrueif the draft is created from an existing active entity (edit scenario),falseotherwise (new scenario)- Specified by:
setHasActiveEntityin interfaceDraftCreateEventContext- Parameters:
hasActiveEntity-trueif the draft is created from an existing active entity (edit scenario),falseotherwise (new scenario)
-
getResult
public com.sap.cds.Result getResult()- Specified by:
getResultin interfaceDraftCreateEventContext- Returns:
- the
Resultof theDraftService.EVENT_DRAFT_CREATEevent
-
setResult
Sets the result of theDraftService.EVENT_DRAFT_CREATEevent- Specified by:
setResultin interfaceDraftCreateEventContext- Parameters:
result- aResultor a list of Maps, which will be transformed into aResult
-