For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > May 2006 > Sanity check "set" for a persistent field?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Sanity check "set" for a persistent field?
Robert William Vesterman

2006-05-11, 7:01 pm

How does one perform a sanity check on a "set" method of an entity bean's EJB?

For example, let's say it's an Integer. I might want to add some code somewhere that's something like:

if (newval.intValue() < 0)
throw new IllegalArgumentException("Blah blah blah");

But I can't just add that to the persistent field's "set" method in the bean class, because such methods are abstract.

Thanks in advance for any help.

Bob Vesterman.
--
This is the est of all sig files.
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com