Interface DraftEditEventContext

All Superinterfaces:
EventContext

public interface DraftEditEventContext extends EventContext
  • Field Details

  • Method Details

    • create

      static DraftEditEventContext create(String entityName)
      Creates an EventContext already overlayed with this interface. The event is set to be DraftService.EVENT_DRAFT_EDIT
      Parameters:
      entityName - the name of the entity
      Returns:
      the DraftEditEventContext
    • getService

      DraftService getService()
      Description copied from interface: EventContext
      Returns the 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.
      Specified by:
      getService in interface EventContext
      Returns:
      the Service (Consumption API) of the service, targeted by the EventContext.
    • getCqn

      com.sap.cds.ql.cqn.CqnSelect getCqn()
      Returns:
      the CqnSelect statement
    • setCqn

      void setCqn(com.sap.cds.ql.cqn.CqnSelect cqn)
      Sets the CqnSelect statement
      Parameters:
      cqn - the CqnSelect statement
    • setPreserveChanges

      @CdsName("PreserveChanges") void setPreserveChanges(boolean preserveChanges)
      Sets whether to preserve changes or not
      Parameters:
      preserveChanges - if true changes will be preserved
    • getPreserveChanges

      @CdsName("PreserveChanges") Boolean getPreserveChanges()
      Returns:
      true if changes should be preserved, false otherwise
    • getCqnNamedValues

      Map<String,Object> getCqnNamedValues()
      The CQN named values, for parameterized CqnSelect statements
      Returns:
      the CQN named values
    • setCqnNamedValues

      void setCqnNamedValues(Map<String,Object> namedValues)
      Sets the CQN named values, for parameterized CqnSelect statements
      Parameters:
      namedValues - the CQN named values
    • getResult

      com.sap.cds.Result getResult()
      Returns:
      the Result of the DraftService.EVENT_DRAFT_EDIT event
    • setResult

      void setResult(Iterable<? extends Map<String,?>> result)
      Sets the result of the DraftService.EVENT_DRAFT_EDIT event
      Parameters:
      result - a Result or a list of Maps, which will be transformed into a Result