Hi,
I have a contract domain object. The contract object contains SETs of contract Line items and other various properties that my app uses.
At present, calculating the contract cost is done via a call to a getTotalContractCost() method. This is transient method. The method checks the dependent objects as necessary. This works well.
Now the users want to store the contract cost in the db.
I need advice on how to accomplish this.
What i would like to do (i think) is that every time Hibernate detects that the object is dirty to also update the contract cost field. That way i do not have to worry about what fields were changed in the contract.
Is this possible?
Thanks
R
|