keeping the history of table in java

后端 未结 11 1685
误落风尘
误落风尘 2020-12-10 09:54

I need the sample program in Java for keeping the history of table if user inserted, updated and deleted on that table. Can anybody help in this?

Thanks in advance

11条回答
  •  囚心锁ツ
    2020-12-10 10:52

    You could try creating say a List of the objects from the table (Assuming you have objects for the data). Which will allow you to loop through the list and compare to the current data in the table? You will then be able to see if any changes occurred.

    You can even create another list with a object that contains an enumerator that gives you the action (DELETE, UPDATE, CREATE) along with the new data.

    Haven't done this before, just a idea.

提交回复
热议问题