Class EntityValidator


  • public class EntityValidator
    extends Object
    Validates an entity, a list of property validators is kept which are called one by one for a passed entity instance and its property values.
    Author:
    mtaal
    • Constructor Detail

      • EntityValidator

        public EntityValidator()
    • Method Detail

      • validate

        public void validate​(Object entityObject)
        Validates the values of the properties of the entityObject. The validation messages are collected into one ValidationException.
        Parameters:
        entityObject - the entity instance
        Throws:
        ValidationException
      • getEntity

        public Entity getEntity()
      • setEntity

        public void setEntity​(Entity entity)
      • initialize

        public void initialize()
        Initializes this EntityValidator by creating a validator for each Property.