Manikandan Thiagarajan
asked on
Could you please modify my program to insert multiple records
could you please modify my program to insert multiple records in Databas
could you please give me the code to insert multiple records using for loop,list and input DTO from junit test case
public void testAdd() {
System.out.println("testAd d");
CustomBillerDTO inputDTO = new CustomBillerDTO();
CustomBillerListDTO outputDTO = new CustomBillerListDTO();
CustomBillerListDTO outputListDTO = new CustomBillerListDTO();
List<CustomBillerDTO> arrInputList=new ArrayList<CustomBillerDTO> ();
AuditDTO auditDTO=new AuditDTO();
// inputDTO.setLegalVehicleCo de("LV17") ;
inputDTO.setBillerCode("NS EL18");
inputDTO.setBillUpLoadType ("Y");
inputDTO.setPayPressFlag(" 1");
auditDTO.setActiveStatusFl ag("AA");
auditDTO.setMakerCode("M") ;
auditDTO.setCheckerCode("C ");
auditDTO.setWorkBranchCode ("133");
auditDTO.setChannelSource( "1"); //ACC_CHA
auditDTO.setMakerRemarks(" MRE"); //ACC_MAKER
auditDTO.setCheckerRemarks ("CRE"); //ACC_CHEC
inputDTO.setCurrentActiveS tatusFlag( "A");
inputDTO.setAuditDTO(audit DTO);
arrInputList.add(inputDTO) ;
outputListDTO.setList(arrI nputList);
outputDTO=target.add(outpu tListDTO);
System.out.println("Added" );
}
}
could you please give me the code to insert multiple records using for loop,list and input DTO from junit test case
public void testAdd() {
System.out.println("testAd
CustomBillerDTO inputDTO = new CustomBillerDTO();
CustomBillerListDTO outputDTO = new CustomBillerListDTO();
CustomBillerListDTO outputListDTO = new CustomBillerListDTO();
List<CustomBillerDTO> arrInputList=new ArrayList<CustomBillerDTO>
AuditDTO auditDTO=new AuditDTO();
// inputDTO.setLegalVehicleCo
inputDTO.setBillerCode("NS
inputDTO.setBillUpLoadType
inputDTO.setPayPressFlag("
auditDTO.setActiveStatusFl
auditDTO.setMakerCode("M")
auditDTO.setCheckerCode("C
auditDTO.setWorkBranchCode
auditDTO.setChannelSource(
auditDTO.setMakerRemarks("
auditDTO.setCheckerRemarks
inputDTO.setCurrentActiveS
inputDTO.setAuditDTO(audit
arrInputList.add(inputDTO)
outputListDTO.setList(arrI
outputDTO=target.add(outpu
System.out.println("Added"
}
}
Which sentence inserts the object into database? I cant find it, please expalin.
And what does JUnit have to do with all of this?
ASKER
this code is insert the data into database
outputDTO=target.add(outpu tListDTO);
System.out.println("Added" );
outputDTO=target.add(outpu
System.out.println("Added"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
give me the code to insert multiple records