Announcement Announcement Module
Collapse
No announcement yet.
Flatfileitemreader one line for many items Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Flatfileitemreader one line for many items

    Hi,

    I've a flatfile which may contain data that result into many objects : Sample :
    AAA;10;15;...

    That means i've to create 6 items :
    (AAA,10) (AAA,11) (AAA,12) (AAA,13) (AAA,14) (AAA,15)

    How can I do??

    the read method returns an item not a list. Otherwise the commit-interval will not have sense anymore...!!??

    Please could you help me

    Thanks

  • #2
    Can you post your configs?

    Comment


    • #3
      <bean id="offresReader" class="org.springframework.batch.item.file.FlatFil eItemReader" scope="step">
      <property name="resource" value="#{jobParameters['input.offres.file']}"/>
      <property name="lineMapper">
      <bean class="com.test.offres.OffreLineMapper">
      <property name="lineTokenizer">
      <bean class="org.springframework.batch.item.file.transfo rm.DelimitedLineTokenizer">
      <property name="delimiter" value=";"/>
      <property name="names" value="libelleProduit,codeProduit,codeSocDebut,cod eSocFin,texte,codeBanniere,url,dateDebut,dateFin"/>
      </bean>
      </property>
      <property name="fieldSetMapper">
      <bean class="com.test.offres.OffreFieldSetMapper"/>
      </property>
      </bean>
      </property>
      </bean>


      and data file :
      Test;AAA;10;15;test…;E003;toto.html;20120901;20120 930

      Comment


      • #4
        Nobody knows?

        Comment

        Working...
        X