@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface EntityValidators
@EntityValidator
associated to the same entity. Applies to entities.
Example:
@Entity @EntityValidators({ @EntityValidator(value=org.openxava.test.validators.CheapProductValidator.class, properties= { @PropertyValue(name="limit", value="100"), @PropertyValue(name="description"), @PropertyValue(name="unitPrice") }), @EntityValidator(value=org.openxava.test.validators.ExpensiveProductValidator.class, properties= { @PropertyValue(name="limit", value="1000"), @PropertyValue(name="description"), @PropertyValue(name="unitPrice") }), @EntityValidator(value=org.openxava.test.validators.ForbiddenPriceValidator.class, properties= { @PropertyValue(name="forbiddenPrice", value="555"), @PropertyValue(name="unitPrice") }, onlyOnCreate=true ) }) public class Product { ...Since 6.1 @EntityValidator is repeatable, so you don't need to use @EntityValidators any more.
Modifier and Type | Required Element and Description |
---|---|
EntityValidator[] |
value |
public abstract EntityValidator[] value