com.jgoodies.validation.tutorial.validator
Class OrderValidator
java.lang.Object
com.jgoodies.validation.tutorial.validator.OrderValidator
- All Implemented Interfaces:
- com.jgoodies.validation.Validator<Order>
public final class OrderValidator
- extends Object
- implements com.jgoodies.validation.Validator<Order>
Validates Orders. This Validator style is the first choice
for a domain object validation. It allows to use different validators
for the same domain class. This can be useful if you have strict and
relaxed validator for different validation contexts, such as saving (strict)
and printing (relaxed). If the domain class validates itself (as in
the ValidatingOrder), it is more difficult to implement this feature,
or it may be more difficult to understand.
- Version:
- $Revision: 1.7 $
- Author:
- Karsten Lentzsch
- See Also:
ValidatingOrder
Method Summary |
com.jgoodies.validation.ValidationResult |
validate(Order order)
Validates this Validator's Order and returns the result
as an instance of ValidationResult . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrderValidator
public OrderValidator()
validate
public com.jgoodies.validation.ValidationResult validate(Order order)
- Validates this Validator's Order and returns the result
as an instance of
ValidationResult
.
- Specified by:
validate
in interface com.jgoodies.validation.Validator<Order>
- Parameters:
order
- the Order to be validated
- Returns:
- the ValidationResult of the order validation
Copyright © 2003-2008 JGoodies Karsten Lentzsch. All Rights Reserved.