I must remove the data from a particular database and put it in an XML file.
>
& Lt; Property name = "whereClause" value = "co_id in WHERE (select contact_all from contact_ where customer_id =: CUSTOMER_ID) and cs.dn_id = d.dn_id and cs.sncode = 1 and CS.MAIN_DIRNUM = 'X'" / Gt; & Lt; Property name = "sort key" value = "MSISDN" /> & Lt; / Bean & gt; & Lt; / Property & gt; & Lt; Property Name = "Parameter Valve" & gt; & Lt; Map & gt; & Lt; Entry key = "CUSTOMER_ID" value = "# {Job parameter ['CUSTOMER_ID']}" /> & Lt; / Map & gt; & Lt; / Property & gt; & Lt; Property Name = "Page Size" Value = "10" /> & Lt; Property name = "rowmapper" & gt; & Lt; Bean class = "com.ooredoo.model.inputDB.MSISDNRowMapper" /> & Lt; / Property & gt; & Lt; / Bean & gt; & Lt ;! - Author for msisdn - & gt; & Lt; Bean id = "dbItemWriter2" class = "org.springframework.batch.item.xml.StaxEventItemWriter" & gt; & Lt; Property name = "resource" value = "file: xml / outputs / donneesfacturefromdb.xml" /> & Lt; Property Name = "Marshall" Ref = "DBMershiller 2" /> & Lt; Property Name = "Root Tagname" value = "Factor" /> & Lt; / Bean & gt; & Lt ;! - msisdn for Marshall - & gt; & Lt; Bean id = "dbMarshaller2" class = "org.springframework.oxm.xstream.XStreamMarshaller" & gt; & Lt; Property name = "alias" & gt; & Lt; Util: map id = "aliases" & gt; & Lt; Entry key = "msisdn" value = "com.ooredoo.model.inputDB.MSISDN" /> & Lt; / Util: map & gt; & Lt; / Property & gt; & Lt; / Bean & gt;
Can I create all this config (and similar Java classes) for every query?
Edit:
I used a query "A" (and this has worked) from the database It is configured to remove the data. So my question is: Do I have to write a single configuration (reader, writer, marshaler ... etc) for every query, or maybe I can write a group of "questions" which one executed after the other And your results can be written in an XML file.
I think you Many readers who have each question need to be made and then using the overall pattern Must chain them together.
HH
Comments
Post a Comment