Package com.hybris.ymkt.common.odata
Class ODataConvertEdmService
java.lang.Object
com.hybris.ymkt.common.odata.ODataConvertEdmService
Convert object value into well typed, well formated OData value.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertEdm(Object value, org.apache.olingo.odata2.api.edm.EdmTyped property) Convert, align, adjust Java Object to the Olingo library input field requirements.
Round/truncate number/date according to the EDM precision. Truncate String according to the max length. Convert String into proper Java Objects. etc.protected ObjectconvertEdmDateTime(Object value, org.apache.olingo.odata2.api.edm.EdmElement element) protected ObjectconvertEdmDateTime(String s, org.apache.olingo.odata2.api.edm.EdmElement element) protected ObjectconvertEdmDateTimeOffset(Object value, org.apache.olingo.odata2.api.edm.EdmElement element) protected ObjectconvertEdmDecimal(Object value, org.apache.olingo.odata2.api.edm.EdmElement element) protected ObjectconvertEdmInt32(Object value, org.apache.olingo.odata2.api.edm.EdmElement element) protected ObjectconvertEdmString(Object value, org.apache.olingo.odata2.api.edm.EdmElement element)
-
Field Details
-
MAX_VALUE
-
UTC
-
-
Constructor Details
-
ODataConvertEdmService
public ODataConvertEdmService()
-
-
Method Details
-
convertEdm
public Object convertEdm(Object value, org.apache.olingo.odata2.api.edm.EdmTyped property) throws org.apache.olingo.odata2.api.edm.EdmException Convert, align, adjust Java Object to the Olingo library input field requirements.
- Round/truncate number/date according to the EDM precision.
- Truncate String according to the max length.
- Convert String into proper Java Objects.
- etc.
- Parameters:
value- object valueproperty-EdmTypedof the OData value mapped field- Returns:
- OData value
- Throws:
org.apache.olingo.odata2.api.edm.EdmException-EdmException
-
convertEdmDateTime
protected Object convertEdmDateTime(Object value, org.apache.olingo.odata2.api.edm.EdmElement element) throws org.apache.olingo.odata2.api.edm.EdmException - Throws:
org.apache.olingo.odata2.api.edm.EdmException
-
convertEdmDateTime
protected Object convertEdmDateTime(String s, org.apache.olingo.odata2.api.edm.EdmElement element) throws org.apache.olingo.odata2.api.edm.EdmException - Throws:
org.apache.olingo.odata2.api.edm.EdmException
-
convertEdmDateTimeOffset
protected Object convertEdmDateTimeOffset(Object value, org.apache.olingo.odata2.api.edm.EdmElement element) throws org.apache.olingo.odata2.api.edm.EdmException - Throws:
org.apache.olingo.odata2.api.edm.EdmException
-
convertEdmDecimal
protected Object convertEdmDecimal(Object value, org.apache.olingo.odata2.api.edm.EdmElement element) throws org.apache.olingo.odata2.api.edm.EdmException - Throws:
org.apache.olingo.odata2.api.edm.EdmException
-
convertEdmInt32
protected Object convertEdmInt32(Object value, org.apache.olingo.odata2.api.edm.EdmElement element) throws org.apache.olingo.odata2.api.edm.EdmException - Throws:
org.apache.olingo.odata2.api.edm.EdmException
-
convertEdmString
protected Object convertEdmString(Object value, org.apache.olingo.odata2.api.edm.EdmElement element) throws org.apache.olingo.odata2.api.edm.EdmException - Throws:
org.apache.olingo.odata2.api.edm.EdmException
-