lundi 20 juillet 2015

How to track with ormlite that database changes were made?

I am working with the com.j256.ormlite package.

My goal is to have a working-databasefile and a file the user can save with an UI-button to. To reach this goal I intent to track changes in the workingfile at the database abstraction layer and notify the user when he closes the program, that there is unsaved data.

How could I track if changes are made?

My first intution is writing a decorator for the Dao Interface and wrap the Dao Creation in a single method, which uses my decorator.

The decorator could modify all update & delete methods. But the dao seems to support transactions and seems to be a complext and long interface.

How would you best solve my probelm?

Aucun commentaire:

Enregistrer un commentaire