Quote:
So i think this interface implementation is not topic here, i think that this toipic is about performance...
No! Please read the topic subject!
This topic is about
memory optimizatoin and I have already proposed a solution : provide two types of interfaces for constraints instead of one:
- the basic one that does not need initialization and provides only the way to validate (Constraint)
and
- the extended one which adds the initialization aspect (ExtendedConstraint/ InitializableConstraint/ InitializedConstraint is a bad name for a java interface)
So, the memory is ok now - the extended constraint interface provides the way to do the initialization and is a marker on the other hand to help implemetaitions to not waste memory.
The other thing is what is the best interface for a constraint focusing only on the validation aspect.
So now I'm isolating this problem in a separate topic:
http://forum.hibernate.org/viewtopic.php?p=2394268