String filePath = "D:\IDM\Sailpoint\sailpoint7.3\AuthEMP.csv"
File file = new File(filePath);
FileReader fileReader = new FileReader(file);CSVReader csvReader = new CSVReader(fileReader);
List<String> inValidRecords = new ArrayList<String>());
List<String> headersList = new ArrayList<String>(Arrays.asList(csvReader.readNext()));
List<String[]> listOfRecords = csvReader.readAll();
for(Strin[] record : listOfRecords){
if(record != null){
boolean isValid = updateMethod(record[headersList.indexOf("userLogin")],record[headersList.indexOf("employeeNumber")],record[headersList.indexOf("justification")],record[headersList.indexOf("endDate")]);
if(!isValid){
System.ou.println("Adding record to invalid List : UserLogin = "+record[headersList.indexOf("userLogin")] +", UPI= "+ record[headersList.indexOf("employeeNumber")]);
inValidRecords.add(record);
}
}
}
No comments:
Post a Comment