activate Draft
See activateDraft_(EntityValue, HttpHeaders, RequestOptions).
Return
(see linked method).
Parameters
Entity parameter.
See activateDraft_(EntityValue, HttpHeaders, RequestOptions).
Return
(see linked method).
Parameters
Entity parameter.
Headers parameter.
Activate a draft entity.
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.DataServiceAsync#makeDraftCopy_(com.sap.cloud.mobile.kotlin.odata.EntityValue, com.sap.cloud.mobile.kotlin.odata.http.HttpHeaders, com.sap.cloud.mobile.kotlin.odata.RequestOptions) DataServiceAsync.makeDraftCopy}, {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#withCreate() EntityValue.withCreate}, {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#withUpdate() EntityValue.withUpdate}, {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#withDeepCreate(com.sap.cloud.mobile.kotlin.odata.PropertyPath...) EntityValue.withDeepCreate}, {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#withDeepUpdate(com.sap.cloud.mobile.kotlin.odata.PropertyPath...) EntityValue.withDeepUpdate}.
- Example using proxy classes:
open fun activateDraftExample(): kotlin.Unit { val service = this.healthService; var patient = Patient(); patient.firstName = "Sherlock"; patient.lastName = "Holmes"; service.createEntity(patient.asDraft()); // Upload pending requests, but not the draft patient. service.upload(); // Associate a new draft appointment with the draft patient. val appointment = Appointment(); appointment.purpose = "General Checkup"; service.createRelatedEntity(appointment.asDraft(), patient, Patient.appointments); // Some time later... Activate the patient (and related appointments). patient = (service.activateDraft(patient.withDeepCreate(Patient.appointments)) as Patient); // Some time later... Upload the create of patient (and deep-created appointments). service.upload(); }
Return
Newly activated copy of the draft entity.
Parameters
Draft entity.
Optional request-specific headers.
Optional request-specific options.