I have a requirement to read a row from a flat file and create a java object of that row and then do a column by column comparision of the data retrieved from a database table , if there is a difference between the flat file row and the database row than only i have to update the record otherwise discard the record
we use hibernate for reading the records from DB
Note: the java object might also contain child objects for example Student Object , might contain a sub object as Subjects
I don�t know is the ready to use code available. But you can always write own framework for
1.Parse the file for records and create java object with getter/setter method (like Java Bean) 2.Create mapping file to store mapping between record and hibernate object. 3.Read mapping file and compare record object values with hibernate object (need to handle casting properly, it can be configured in mapping file). 4.Get the result and take appropriate action.