Thanks, Steve. 'update = false' seems like the workaround I am looking for.
Seb to answer your question, this relates to a larger architectural issue. We have two applications that will be used to automate different parts of a larger organizational workflow. Each application currently has it's own database and is not located on the same physical machine. However, we want to be able to synchronize certain data across applications (for instance lists of states, provences, and countries for use in UI choices).
The current scheme is to store these lists of UI choices in the database and then synchronize the tables to the other database. So, in the application I am developing I was hoping that I would be able to use objects with final properties to represent these list elements so that the properties could not be modified after they were set to a value loaded from the db at object initialization time and thereby would not get modified or updated in the database.
It is currently unacceptable to us to hard code the values into the application using an enum, or constants class type solution. So, making the class properties final seemed like the natural solution to me. If anyone could provide alternate suggestions for handling this problem or references where I could find examples, it would be appreciated.
Thanks,
-Jesse
|