Class CqnToCloudSdkConverter

java.lang.Object
com.sap.cds.services.impl.odata.utils.CqnToCloudSdkConverter

public class CqnToCloudSdkConverter extends Object
Class to convert CqnValue objects to cloud sdk Expressions.OperandSingle objects.
  • Constructor Summary

    Constructors
    Constructor
    Description
    CqnToCloudSdkConverter(Object left, Object right, com.sap.cds.reflect.CdsStructuredType structType, ConversionContext context)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    static com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingle
    convert(Object obj, com.sap.cds.reflect.CdsStructuredType structType, com.sap.cds.ql.cqn.CqnValue element, ConversionContext context)
    Converts the given value by inferring type information from the cqnValue
    static com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingle
    convert(Object obj, com.sap.cds.reflect.CdsStructuredType structType, com.sap.cds.reflect.CdsBaseType type, ConversionContext context)
    Converts the given object to a Expressions.OperandSingle
    static com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingle
    convert(Object obj, com.sap.cds.reflect.CdsStructuredType structType, ConversionContext context)
    Converts the given object to a Expressions.OperandSingle
    static com.sap.cloud.sdk.datamodel.odata.client.expression.FieldUntyped
    convertRefToFieldUntyped(com.sap.cds.ql.cqn.CqnReference ref)
     
    com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingle
     
    com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingle
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CqnToCloudSdkConverter

      public CqnToCloudSdkConverter(Object left, Object right, com.sap.cds.reflect.CdsStructuredType structType, ConversionContext context)
  • Method Details

    • convert

      public void convert()
    • getLeft

      public com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingle getLeft()
    • getRight

      public com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingle getRight()
    • convert

      public static com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingle convert(Object obj, com.sap.cds.reflect.CdsStructuredType structType, ConversionContext context)
      Converts the given object to a Expressions.OperandSingle
      Parameters:
      obj - the plain Java Object or CqnValue to convert
      structType - the CdsStructuredType, required to resolve refs
      context - the ConversionContext
      Returns:
      the converted value or null if the value could not be converted
    • convert

      public static com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingle convert(Object obj, com.sap.cds.reflect.CdsStructuredType structType, com.sap.cds.reflect.CdsBaseType type, ConversionContext context)
      Converts the given object to a Expressions.OperandSingle
      Parameters:
      obj - the plain Java Object or CqnValue to convert
      structType - the CdsStructuredType, required to resolve refs
      type - the optional already known CdsBaseType of the object, used as an additional hint, when converting the object.
      context - the ConversionContext
      Returns:
      the converted value or null if the value could not be converted
    • convert

      public static com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingle convert(Object obj, com.sap.cds.reflect.CdsStructuredType structType, com.sap.cds.ql.cqn.CqnValue element, ConversionContext context)
      Converts the given value by inferring type information from the cqnValue
      Parameters:
      element - the CqnValue to infer the type information from
      obj - the value to convert
      structType - the CdsStructuredType
      context - the ConversionContext
      Returns:
      the converted value
    • convertRefToFieldUntyped

      public static com.sap.cloud.sdk.datamodel.odata.client.expression.FieldUntyped convertRefToFieldUntyped(com.sap.cds.ql.cqn.CqnReference ref)