Class CqnToCloudSdkConverter
java.lang.Object
com.sap.cds.services.impl.odata.utils.CqnToCloudSdkConverter
Class to convert
CqnValue objects to cloud sdk Expressions.OperandSingle objects.-
Constructor Summary
ConstructorsConstructorDescriptionCqnToCloudSdkConverter(Object left, Object right, com.sap.cds.reflect.CdsStructuredType structType, ConversionContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoidconvert()static com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingleconvert(Object obj, com.sap.cds.reflect.CdsStructuredType structType, com.sap.cds.ql.cqn.CqnValue element, ConversionContext context) Converts the givenvalueby inferring type information from thecqnValuestatic com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingleconvert(Object obj, com.sap.cds.reflect.CdsStructuredType structType, com.sap.cds.reflect.CdsBaseType type, ConversionContext context) Converts the given object to aExpressions.OperandSinglestatic com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSingleconvert(Object obj, com.sap.cds.reflect.CdsStructuredType structType, ConversionContext context) Converts the given object to aExpressions.OperandSinglestatic com.sap.cloud.sdk.datamodel.odata.client.expression.FieldUntypedconvertRefToFieldUntyped(com.sap.cds.ql.cqn.CqnReference ref) com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSinglegetLeft()com.sap.cloud.sdk.datamodel.odata.client.expression.Expressions.OperandSinglegetRight()
-
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 aExpressions.OperandSingle- Parameters:
obj- the plain Java Object orCqnValueto convertstructType- theCdsStructuredType, required to resolve refscontext- theConversionContext- Returns:
- the converted value or
nullif 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 aExpressions.OperandSingle- Parameters:
obj- the plain Java Object orCqnValueto convertstructType- theCdsStructuredType, required to resolve refstype- the optional already knownCdsBaseTypeof the object, used as an additional hint, when converting the object.context- theConversionContext- Returns:
- the converted value or
nullif 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 givenvalueby inferring type information from thecqnValue- Parameters:
element- theCqnValueto infer the type information fromobj- the value to convertstructType- theCdsStructuredTypecontext- theConversionContext- Returns:
- the converted value
-
convertRefToFieldUntyped
public static com.sap.cloud.sdk.datamodel.odata.client.expression.FieldUntyped convertRefToFieldUntyped(com.sap.cds.ql.cqn.CqnReference ref)
-