Class AbstractValueConverter
java.lang.Object
de.hybris.platform.odata2services.converter.AbstractValueConverter
- All Implemented Interfaces:
ValueConverter
- Direct Known Subclasses:
CollectionValueConverter
Base implementation of a
ValueConverter to be extended for reuse.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractValueConverter(@NotNull ODataEntryToIntegrationItemConverter entryConverter, @NotNull PayloadAttributeValueConverter valueConverter) A constructor injecting dependencies for reuse. -
Method Summary
Modifier and TypeMethodDescriptionprotected IntegrationItemtoIntegrationItem(@NotNull org.apache.olingo.odata2.api.processor.ODataContext context, @NotNull TypeDescriptor typeDesc, @NotNull org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, IntegrationItem container) Converts ODataEntry nested as an attribute value inside another ODataEntry to anIntegrationItemby delegating toODataEntryToIntegrationItemConverterprotected ObjecttoValue(ConversionParameters parameters) Converts a nested OData specific value to a value acceptable forIntegrationItemby delegating toPayloadAttributeValueConverter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.odata2services.converter.ValueConverter
convert, isApplicable
-
Constructor Details
-
AbstractValueConverter
protected AbstractValueConverter(@NotNull @NotNull ODataEntryToIntegrationItemConverter entryConverter, @NotNull @NotNull PayloadAttributeValueConverter valueConverter) A constructor injecting dependencies for reuse.- Parameters:
entryConverter- an instance ofODataEntryToIntegrationItemConverterto use.valueConverter- an instance ofPayloadAttributeValueConverterto use.
-
-
Method Details
-
toIntegrationItem
protected IntegrationItem toIntegrationItem(@NotNull @NotNull org.apache.olingo.odata2.api.processor.ODataContext context, @NotNull @NotNull TypeDescriptor typeDesc, @NotNull @NotNull org.apache.olingo.odata2.api.ep.entry.ODataEntry entry, IntegrationItem container) Converts ODataEntry nested as an attribute value inside another ODataEntry to anIntegrationItemby delegating toODataEntryToIntegrationItemConverter- Parameters:
context- OData context for the entry being converted.typeDesc- item type corresponding to the ODataEntry being converted.entry- a value of an ODataEntry attribute.container- an item in which the converted value will be set as an attribute value.- Returns:
- result of the
entryconversion, which will be nested as an attribute value inside thecontaineritem
-
toValue
Converts a nested OData specific value to a value acceptable forIntegrationItemby delegating toPayloadAttributeValueConverter. This method can be used by theValueConverters dealing with collection or map values, to convert elements of the Collection or values in the Map.- Parameters:
parameters- carry the value to be converted and the context for the value conversion.- Returns:
- a converted value.
-