JPA 2 adds support for integration with the Bean Validation API.
Constraints that are defined for entity and embeddable classes by using annotations can be checked automatically on PrePersist, PreUpdate and PreRemove JPA lifecycle events.
Integration with the Validation API is not supported yet by ObjectDB.
ObjectDB Support