Class VdmEntity<EntityT>

java.lang.Object
com.sap.cloud.sdk.datamodel.odatav4.core.VdmObject<EntityT>
com.sap.cloud.sdk.datamodel.odatav4.core.VdmEntity<EntityT>
Type Parameters:
EntityT - The entity type.

public abstract class VdmEntity<EntityT> extends VdmObject<EntityT>
Base class for an OData entity.
  • Constructor Details

    • VdmEntity

      public VdmEntity()
  • Method Details

    • all

      @Nonnull protected static <EntityT> SimpleProperty<EntityT> all()
      Select all properties of an entity.
      Type Parameters:
      EntityT - The entity type.
      Returns:
      A selector for all entity fields.
    • getVersionIdentifier

      @Nonnull public io.vavr.control.Option<String> getVersionIdentifier()
      Getter for the version identifier of this entity.

      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.

      Returns:
      The version identifier.
    • setVersionIdentifier

      public void setVersionIdentifier(@Nullable String versionIdentifier)
      Setter for the version identifier of this entity.

      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.

      Parameters:
      versionIdentifier - The version identifier of this entity.
    • getEntityCollection

      @Nonnull protected abstract String getEntityCollection()
      Used by request builders and navigation property methods to construct OData requests.
      Returns:
      EDMX name of the entity collection identifier.
    • getDefaultServicePath

      @Nullable protected String getDefaultServicePath()
      Used by request builders and navigation property methods to construct OData requests.
      Returns:
      Default context path to the OData service. In other words, everything in between the protocol://hostname:port and the OData resource name (entity set, $metadata, etc.)
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class VdmObject<EntityT>
    • canEqual

      protected boolean canEqual(@Nullable Object other)
      Overrides:
      canEqual in class VdmObject<EntityT>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class VdmObject<EntityT>