Entity Value
Encapsulates an OData entity value.
Constructors
Construct a new entity value. This constructor is intended for use by custom entity value subclasses. Use {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#ofType(com.sap.cloud.mobile.kotlin.odata.EntityType, com.sap.cloud.mobile.kotlin.odata.core.SparseIndexMap?) EntityValue.ofType} for regular construction.
Properties
Functions
Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#isDraft EntityValue.isDraft} to true.
Bind an entity to a property of the current entity.
This can be used before DataService.createEntity or DataService.updateEntity to create or update the bindings of navigation properties.
Return a copy of this entity value (only structural properties are copied).
Copy the values of all key properties from a specified entity into this entity.
Return a clone of this value if it (together with all value subcomponents) is possibly mutable, or return this value if it (together with all value subcomponents) is definitely immutable. The resulting value might share mutable metadata with this query.
Copy structural/dynamic property values from source entity value into this entity value.
Set a flag to mark this entity to be copied by a subsequent DataService.makeDraftCopy call, in preparation for a later DataService.activateDraft call that will create the entity.
Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to paths to null.
Set a flag to mark this entity to be copied by a subsequent DataService.makeDraftCopy call, in preparation for a later DataService.activateDraft call that will create the entity.
Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to paths if paths is non-empty, otherwise set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to null.
If paths is empty, the subsequent deep create should include composition children (recursively) which are specified with on-delete-cascade.
Set a flag to mark this entity to be copied by a subsequent DataService.makeDraftCopy call, in preparation for a later DataService.activateDraft call that will update the entity.
Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to paths if paths is non-empty, otherwise set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to null.
If paths is empty, the subsequent deep update should include composition children (recursively) which are specified with on-delete-cascade.
- See Also:
-
Update Related Entities When Updating an Entity, {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#bindEntity(com.sap.cloud.mobile.kotlin.odata.EntityValue, com.sap.cloud.mobile.kotlin.odata.Property) EntityValue.bindEntity}, {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#unbindEntity(com.sap.cloud.mobile.kotlin.odata.EntityValue?, com.sap.cloud.mobile.kotlin.odata.Property, kotlin.Boolean) EntityValue.unbindEntity}.
Set a flag to mark this entity to be copied by a subsequent DataService.makeDraftCopy call, in preparation for a later DataService.activateDraft call that will update the entity.
Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to paths to null.
Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#isDraft EntityValue.isDraft} to true, and set the primary key for this entity to a value likely to be suitable for a local offline draft.
For key properties of type int', this will be a value > 2000000000 offset by an amount determined from current UTC dateTime (month/day/hour/minute/second). For key properties of type long', this will be a value > 9000000000000000000 offset by an amount determined from current UTC dateTime (month/day/hour/minute/second).
For key properties of type string', 'binary' or 'guid', this will be a random GUID value converted to the appropriate type. For key properties of type string' where the {@link com.sap.cloud.mobile.kotlin.odata.Property#maxLength Property.maxLength} is insufficient to hold a GUID (between 10 and 31 inclusive), then the value will be the string equivalent of the value that would be used for type 'long' or 'int', whichever should fit.
For key properties of type `binary' where the {@link com.sap.cloud.mobile.kotlin.odata.Property#maxLength Property.maxLength} is insufficient to hold a complete GUID (less than 16 bytes), then a random GUID value will be truncated to fit.
Key properties of any other data type will not be set.
For internal use only.
Change the entity set for this entity.
Having a non-null entity set is optional if only one entity set in the DataService uses the entity type,
but is required (before DataService.createEntity is called) if multiple entity sets use the same entity type.
Return true if the value of property property is new or changed, relative to {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#oldEntity EntityValue.oldEntity}.
For internal use only.
Remember a snapshot of the values of structural/dynamic properties of this entity in {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#oldEntity EntityValue.oldEntity}. Snapshots are used to detect which properties have changed when an update is to be issued.
- See Also:
-
{@link com.sap.cloud.mobile.kotlin.odata.DataType#isMutable DataType.isMutable}.
Convert this data value to a string. If the {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#dataType EntityValue.dataType} is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used. JSON format is used for structured values (arrays and objects).
Unbind an entity from a property of the current entity.
This can be used before DataService.createEntity or DataService.updateEntity to create or update the bindings of navigation properties.
Set a flag to mark this entity to be created by a subsequent DataService.activateDraft call.
Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to paths to null.
Set a flag to mark this entity to be created by a subsequent DataService.activateDraft call, or by a DataService.createEntity call that should perform a deep create.
Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to paths if paths is non-empty, otherwise set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to null.
If paths is empty, the subsequent deep create should include composition children (recursively) which are specified with on-delete-cascade.
Set a flag to mark this entity to be updated by a subsequent DataService.activateDraft call, or by a DataService.updateEntity call that should perform a deep update.
Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to paths if paths is non-empty, otherwise set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to null.
If paths is empty, the subsequent deep update should include composition children (recursively) which are specified with on-delete-cascade.
- See Also:
-
Update Related Entities When Updating an Entity, {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#bindEntity(com.sap.cloud.mobile.kotlin.odata.EntityValue, com.sap.cloud.mobile.kotlin.odata.Property) EntityValue.bindEntity}, {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#unbindEntity(com.sap.cloud.mobile.kotlin.odata.EntityValue?, com.sap.cloud.mobile.kotlin.odata.Property, kotlin.Boolean) EntityValue.unbindEntity}.
Change the primary key for this entity.
Set a flag to mark this entity to be updated by a subsequent DataService.activateDraft call.
Set {@link com.sap.cloud.mobile.kotlin.odata.EntityValue#cascadePaths EntityValue.cascadePaths} to paths to null.