You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Thad Welch <TW...@wyeth.com> on 2005/06/03 17:33:10 UTC
pre-store method/hook
hello,
does anyone know how to implement a pre-store method/hook in OJB for
individual domain classes. the pre-store method will be invoked before
OJB's store() and would validate the domain object's data before
database saving. i'm using OJB's cascade save/auto-update feature so
explicitly calling a pre-store method before OJB's store wouldn't cover
all objects saved by cascading.
thanks,
thad
Re: pre-store method/hook
Posted by Thomas Mahler <th...@web.de>.
Hi Thad,
let your domain class implement o.a.ojb.broker.PersistenceBrokerAware
and implent the callback methods beforeUpdate and beforeStore.
For details refer to the JavaDoc:
http://db.apache.org/ojb/api/org/apache/ojb/broker/PersistenceBrokerAware.html
cheers,
Thomas
Thad Welch wrote:
>
> hello,
>
> does anyone know how to implement a pre-store method/hook in OJB for
> individual domain classes. the pre-store method will be invoked before
> OJB's store() and would validate the domain object's data before
> database saving. i'm using OJB's cascade save/auto-update feature so
> explicitly calling a pre-store method before OJB's store wouldn't cover
> all objects saved by cascading.
>
> thanks,
> thad
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org