0% found this document useful (0 votes)
10 views2 pages

Source DTO

The document outlines a Java code snippet that processes offer entries within solutions, mapping specific data types to a new format. It also includes XML bean definitions for various data transfer objects related to offers and solutions, detailing their properties and types. Additionally, a data mapper bean is defined for field mapping configuration.

Uploaded by

marocoujda2013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views2 pages

Source DTO

The document outlines a Java code snippet that processes offer entries within solutions, mapping specific data types to a new format. It also includes XML bean definitions for various data transfer objects related to offers and solutions, detailing their properties and types. Additionally, a data mapper bean is defined for field mapping configuration.

Uploaded by

marocoujda2013
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

amcofferDetailsData.getSolutions().

forEach(sol -> {
List<AMCSolutionDetailProductWsDTO> mappedOfferEntries =
sol.getOfferEntries().getOfferLinesList()
.stream()
.filter(offerEntry -> offerEntry instanceof
AMCSolutionDetailProductData)
.map(offerEntry ->
getDataMapper().map((AMCSolutionDetailProductData) offerEntry,
AMCSolutionDetailProductWsDTO.class, fields))
.collect(Collectors.toList());
sol.getOfferEntries().setOfferLinesList(mappedOfferEntries);
});

<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="beans.xsd">
<bean
class="com.arcelormittal.amc.amcoffersocc.dto.offer.AMCOfferDetailsWsDTO">
<property name="solutions"
type="java.util.List&lt;com.arcelormittal.amc.amcoffersocc.dto.offer.AMCSolutionWsD
TO>">
<description>Solutions</description>
</property>
</bean>

<bean class="com.arcelormittal.amc.amcoffersocc.dto.offer.AMCSolutionWsDTO">
<property name="offerEntries"
type="com.arcelormittal.amc.amcoffersocc.dto.offer.AMCOfferSpecificationsWsDTO">
<description>Offer entries</description>
</property>
</bean>

<bean
class="com.arcelormittal.amc.amcoffersocc.dto.offer.AMCOfferSpecificationsWsDTO">
<property name="offerLinesList"
type="java.util.List&lt;com.arcelormittal.amc.amcoffersocc.dto.offer.AMCOfferEntryS
pecificationWsDTO>">
<description>Offer lines list</description>
</property>
</bean>

<bean
class="com.arcelormittal.amc.amcoffersocc.dto.offer.AMCOfferEntrySpecificationWsDTO
">
<property name="entryType" type="String">
<description>Entry type</description>
</property>
<property name="solutionId" type="String">
<description>Solution id</description>
</property>
</bean>

<bean
class="com.arcelormittal.amc.amcoffersocc.dto.offer.AMCSolutionDetailProductWsDTO"
extends="com.arcelormittal.amc.amcoffersocc.dto.offer.AMCOfferEntrySpecificationWsD
TO">
<property name="entryNumber" type="Integer">
<description>Entry number</description>
</property>
</bean>
</beans>

<!-- Field mapping configuration -->


<bean id="dataMapper"

class="de.hybris.platform.webservicescommons.mapping.impl.DefaultDataMapper">
<property name="fieldSetBuilder" ref="fieldSetBuilder" />
</bean>

You might also like