Interface CdsUpdateEventContext

All Superinterfaces:
EventContext

public interface CdsUpdateEventContext extends EventContext
The specialized EventContext to be used for CqnService.EVENT_UPDATE
  • Method Details

    • create

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

      CqnService 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.CqnUpdate getCqn()
      Returns:
      the CqnUpdate statement
    • setCqn

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

      Iterable<Map<String,Object>> getCqnValueSets()
      Returns:
      the CQN value sets, to enable batched CqnUpdate statements
    • setCqnValueSets

      void setCqnValueSets(Iterable<Map<String,Object>> valueSets)
      Sets the CQN value sets, to enable batched CqnUpdate statements
      Parameters:
      valueSets - the CQN value sets
    • getResult

      com.sap.cds.Result getResult()
      Returns:
      the Result of the CqnService.EVENT_UPDATE event
    • setResult

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