Class ValidateCompositeDate.CompositeDateValidator

  extended by net.sourceforge.annovalidator.builtin.validators.ValidateCompositeDate.CompositeDateValidator
Enclosing class:

public static class ValidateCompositeDate.CompositeDateValidator
extends java.lang.Object

Class for validating objects annotated with the ValidateCompositeDate annotation.

Constructor Summary
Method Summary
 boolean validate(java.lang.Object target, DateUtil.CompositeDatePart[] dateParts, java.lang.String invalidDatePartErrorCode)
          Validates a composite date, with each of its parts specified by a different field in target.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ValidateCompositeDate.CompositeDateValidator()
Method Detail


public boolean validate(java.lang.Object target,
                        DateUtil.CompositeDatePart[] dateParts,
                        java.lang.String invalidDatePartErrorCode)
                 throws ReportedValidationException
Validates a composite date, with each of its parts specified by a different field in target.

target - The object containing the fields defined in dateParts.
dateParts - An array of CompositeDateParts defining all the fields in target that contain part of the date to be validated, and what part they contain.
invalidDatePartErrorCode - The error code to use if one of the date fields contains invalid data.
true if all the date parts identified in dateParts can be used to make a valid date and time, otherwise false.
ReportedValidationException - If one of the date fields contains an invalid value.

Copyright © 2008. All Rights Reserved.