db-ojb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mahler <thm...@web.de>
Subject Re: pre-store method/hook
Date Fri, 03 Jun 2005 21:46:34 GMT
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


Mime
View raw message