I would like to perform operations on an object before the object is
persisted. One thing I would like to do is set a transactionDate
field. I want the field to be set on the server side so all records can
be set to the same date. What I mean by that is I do not want to set
the date as the user flips through wizard pages and have the dates vary
by seconds.
My base object for all data model objects is CDataModel. I first tried
this:
public class CDataModel
{
protected void prepareStore()
{
// perform pre store operations
}
public final void store()
{
prepareStore();
COJBManager.getBroker().store(this);
}
}
However, this does not work for relationships. If A has a instance of B
and I call A.store() the performStore() code will of course not execute
for B.
Is there anyway in I can manage to allow code to be executed for certain
objects before it is created in the db?
-chris worley
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]