From: Gavin_King/Cirrus%<CI...@ci...> - 2002-09-02 04:16:29
|
Would anyone have a use for a new callback interface public interface Validatable { public void validate() throws ValidationException; } that would be called just before saving or updating an object's state? The object wouldn't be allowed to adjust it's own state from inside validate(), just throw an exception if it's invariants were violated. I've wondered about this a few times, but it never passed the bloat test really.... (Remember, i'm trying to avoid turning Hibernate into a framework.) However, if its a thing that would be used its sooo easy to implement. |