Package org.openbravo.base.validation
Class EntityValidator
- java.lang.Object
-
- org.openbravo.base.validation.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 Summary
Constructors Constructor Description EntityValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Entity
getEntity()
void
initialize()
Initializes this EntityValidator by creating a validator for eachProperty
.void
setEntity(Entity entity)
void
validate(Object entityObject)
Validates the values of the properties of the entityObject.
-
-
-
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 eachProperty
.
-
-