Hibernate can meet your validation needs

Annotations make easier data validation possible
This looks like a great way to perform validation with Hibernate.

Take a look:

http://www-128.ibm.com/developerworks/java/library/j-hibval.html

1 Comment

Filed under Java

One response to “Hibernate can meet your validation needs

  1. I’m unconvinced your persistence layer is the correct place to be specifying validation rules! Hibernate (et al, today) love to subscribe to this level-mixing annotations craze, ignoring the fact that an annotation is just as much a concrete dependency as some actual code (note that you have to *import* annotation classes as if they were interfaces).

    Spring-Hibernate deals with some of the issues mentioned in this article in that SQLExceptions are generally mapped to more usefully categorised exception types, and Spring Validation deals with the rest, in providing a “reusable” and minimal way of specifying validation rules that are not coupled to any particular technology.

    How could I finish without a plug for RSF:P while inheriting all the Spring Validation goodness, RSF also allows “POJO validators” which don’t even have a Spring dependence.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s