Ah... perfect ;) That would work very similarly to my current system where I throw a veto exception on the bean properties.
Just what I need... now to try and implement it ;) - Brill Pappin ----- Original Message ----- From: "Ron Gallagher" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, March 30, 2003 1:45 PM Subject: Re: new to the api and have a question > > Hello all, > > > > I'm new as of today, to this api. > > > > I sat down Friday to write one ;) and then though "someone else must have > > tried this already"... and here it is! > > > > Anyway, I'm going through the documentation now, but I wanted to know if its > > possible to make an object immutable... for instance, I've got a country > > list and the data doesn't change, and I want to make sure that one of my > > developers can't alter the table (particularly in the production env). > > Currently in my own design I'm using a fairly simple JavaBean system, and a > > factory behind the beans... this allows the factory to throw a veto > > exception if the data is immutable and someone tried to change it. Does > > anything like that exist in this API? > > Have you looked at the PersistenceBrokerListener interface? It includes a beforeStore method that's invoked before any object is persisted. When beforeStore method is invoked, you just look at the object that's being stored. If it's a 'country' objec > t, simply throw an exception and the storage opertion will be aborted. > > Ron Gallagher > Atlanta, GA > [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
