Class AbstractValueConverter
- java.lang.Object
-
- de.hybris.platform.odata2services.converter.AbstractValueConverter
-
- All Implemented Interfaces:
ValueConverter
- Direct Known Subclasses:
CollectionValueConverter
public abstract class AbstractValueConverter extends java.lang.Object implements ValueConverter
Base implementation of aValueConverterto be extended for reuse.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractValueConverter(@NotNull ODataEntryToIntegrationItemConverter entryConverter, @NotNull PayloadAttributeValueConverter valueConverter)A constructor injecting dependencies for reuse.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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 java.lang.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, wait
-
Methods inherited from interface de.hybris.platform.odata2services.converter.ValueConverter
convert, isApplicable
-
-
-
-
Constructor Detail
-
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 Detail
-
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
protected java.lang.Object toValue(ConversionParameters parameters)
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.
-
-