Скажем, у меня есть java bean/объект со 100 полями (унаследованный или нет, в данном случае он не имеет значения). После операций обновления - в транзакции я хочу определить, какие поля изменены для отслеживания обновлений, таких как CVS. Каков самый простой способ сделать это? Любое предложение Framework? Должен ли я сделать два экземпляра этого объекта и перебрать все поля и сопоставить значения полей? Каким образом наилучший равный метод проявляется в таких ситуациях? Следующие equals() кажутся очень неудобными:
return (field1.equals(o.field1)) &&
(field2.equals(o.field2)) &&
(field3.equals(o.field3)) &&
...
(field100.equals(o.field100));