EntityT
- The entity type.@Beta public abstract class VdmEntity<EntityT> extends VdmObject<EntityT>
changedOriginalFields, ODATA_TYPE_ANNOTATIONS, ODATA_VERSION_ANNOTATIONS
Constructor and Description |
---|
VdmEntity() |
Modifier and Type | Method and Description |
---|---|
protected static <EntityT> SimpleProperty<EntityT> |
all()
Select all properties of an entity.
|
protected void |
attachToService(String servicePath,
HttpDestinationProperties destination)
Sets the service path and destination for the fetch commands of this entity.
|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
protected String |
getDefaultServicePath()
Used by request builders and navigation property methods to construct OData requests.
|
protected HttpDestinationProperties |
getDestinationForFetch()
Convenience field for reusing the same destination with multiple requests (e.g.
|
protected abstract String |
getEntityCollection()
Used by request builders and navigation property methods to construct OData requests.
|
protected String |
getServicePathForFetch()
The service path only used for the fetch commands of this entity.
|
io.vavr.control.Option<String> |
getVersionIdentifier()
Getter for the version identifier of this entity.
|
int |
hashCode() |
protected void |
setDestinationForFetch(HttpDestinationProperties destinationForFetch)
Convenience field for reusing the same destination with multiple requests (e.g.
|
protected void |
setServicePathForFetch(String servicePathForFetch)
The service path only used for the fetch commands of this entity.
|
void |
setVersionIdentifier(String versionIdentifier)
Setter for the version identifier of this entity.
|
fromMap, getAnnotationProperties, getChangedFields, getCustomField, getCustomField, getCustomFieldNames, getCustomFields, getKey, getOdataType, getSetOfCustomFields, getSetOfFields, getSetOfNavigationProperties, getType, hasCustomField, hasCustomField, rememberChangedField, resetChangedFields, setCustomField, setCustomField, toMap, toMapOfCustomFields, toMapOfFields, toMapOfNavigationProperties, toString
@Nonnull protected static <EntityT> SimpleProperty<EntityT> all()
EntityT
- The entity type.@Nonnull public io.vavr.control.Option<String> getVersionIdentifier()
This identifier can be used to compare this entity with a remote one. As not the whole entity has to be sent this reduces the request overhead.
Actual use cases can be checking whether this entity is still current with regards to the remote entity, and ensuring that a update/delete operation is done on the expected version of the remote entity.
public void setVersionIdentifier(@Nullable String versionIdentifier)
This identifier can be used to compare this entity with a remote one. As not the whole entity has to be sent this reduces the request overhead.
Actual use cases can be checking whether this entity is still current with regards to the remote entity, and ensuring that a update/delete operation is done on the expected version of the remote entity.
versionIdentifier
- The version identifier of this entity.@Nonnull protected abstract String getEntityCollection()
@Nullable protected String getDefaultServicePath()
protocol://hostname:port
and the OData resource name (entity set, $metadata
, etc.)protected void attachToService(@Nullable String servicePath, @Nonnull HttpDestinationProperties destination)
Note: Use with caution, as this can easily break the fetch calls on this entity. See the interface of the corresponding service for the default service path.
servicePath
- Optional parameter. New service path to apply to this entity and any associated entities that were
previously fetched. If a null value is provided and the service path has never been set, then the
service path will be set to the default defined in the corresponding service interface.destination
- New destination to apply to this entity and any associated entities that were previously fetched.protected String getServicePathForFetch()
Note: Use with caution, as this can easily break the fetch call on this entity. See the interface of the corresponding service for the default service path.
protected void setServicePathForFetch(String servicePathForFetch)
Note: Use with caution, as this can easily break the fetch call on this entity. See the interface of the corresponding service for the default service path.
protected HttpDestinationProperties getDestinationForFetch()
protected void setDestinationForFetch(HttpDestinationProperties destinationForFetch)
Copyright © 2021 SAP SE. All rights reserved.