comparing a list with added components and a list with static code example
Example: compare list from db and list from request
List<String> compareObjects(PartInfo filePart, PartInfo dbPart) {
List<String> different = new LinkedList<String>();
if (!filePart.getNumber().equals(dbPart.getNumber())) {
different.add("number");
}
//repeat for all your fields
return different;
}
#Note: Check differences for each field ob each object from 2 list only