Class ODataUtils

java.lang.Object
com.sap.cds.services.utils.ODataUtils

public class ODataUtils extends Object
A utility class providing OData related helper methods.
  • Constructor Details

    • ODataUtils

      public ODataUtils()
  • Method Details

    • toODataName

      public static String toODataName(String cdsEntityName)
      Converts a given CDS entity name into an OData entity name.
      Parameters:
      cdsEntityName - the CDS entity name
      Returns:
      the OData entity name
    • toODataTarget

      public static String toODataTarget(String bindingParameter, String parameter, com.sap.cds.ql.cqn.CqnReference ref, boolean v2)
      Converts the given parameters and CqnReference to an OData V2 or V4 target string
      Parameters:
      bindingParameter - the binding parameter of the action or function, or null
      parameter - the parameter of the MessageTarget, or null
      ref - the CqnReference of the MessageTarget, or null
      v2 - false, if the target string is for OData V4, true if it is for OData V2
      Returns:
      the OData target string