Class ETagHelper

java.lang.Object
com.sap.cds.adapter.odata.v2.utils.ETagHelper

public class ETagHelper extends Object
  • Constructor Details

    • ETagHelper

      public ETagHelper()
  • Method Details

    • getETagElement

      public static Optional<com.sap.cds.reflect.CdsElement> getETagElement(String entityName, com.sap.cds.reflect.CdsModel cdsModel)
    • getETagElement

      public static Optional<com.sap.cds.reflect.CdsElement> getETagElement(com.sap.cds.reflect.CdsEntity entity)
    • isETagHeaderInRequest

      public static boolean isETagHeaderInRequest(CdsODataRequest odataRequest)
    • hasIfNoneMatchHeaderWithAsteriskValue

      public static boolean hasIfNoneMatchHeaderWithAsteriskValue(CdsODataRequest request)
    • getETagPredicate

      public static com.sap.cds.ql.cqn.CqnPredicate getETagPredicate(CdsODataRequest request, com.sap.cds.reflect.CdsElement etagElement)
    • checkReadPreconditions

      public static boolean checkReadPreconditions(String eTag, String ifMatchHeaders, String ifNoneMatchHeaders) throws ErrorStatusException
      Throws:
      ErrorStatusException
    • getEtag

      public static String getEtag(Map<String,Object> data, com.sap.cds.reflect.CdsEntity entity)
      Parameters:
      data - the data
      entity - the CdsEntity
      Returns:
      The etag value retrieved from data or null if no value could be retrieved or no etag is specified for the entity