boolean isThereMinExclusive = (_minExclusive != null);
boolean isThereMaxInclusive = (_maxInclusive != null);
boolean isThereMaxExclusive = (_maxExclusive != null);
if (isThereMinExclusive && isThereMinInclusive) {
throw new ValidationException("both minInclusive and minExclusive"
+"are set up");
}
if (isThereMaxExclusive && isThereMaxInclusive) {
throw new ValidationException("both maxInclusive and maxExclusive"
+"are set up");
}
if (isThereMinInclusive) {
if ( (dateTime.compareTo(_minInclusive) != DateTimeBase.GREATER_THAN) &&
!dateTime.equals(_minInclusive) ) {
String err = dateTime + " must be greater than (or equal to) the minimum allowable ";
err += "value of " + _minInclusive;
throw new ValidationException(err);
}
}
if (isThereMinExclusive) {
if (dateTime.compareTo(_minExclusive) != DateTimeBase.GREATER_THAN) {
String err = dateTime + " must be greater than the minimum allowable ";
err += "value of " + _minExclusive;
throw new ValidationException(err);
}
}
if (isThereMaxInclusive) {
if ( (dateTime.compareTo(_maxInclusive) != DateTimeBase.LESS_THAN) &&
!dateTime.equals(_maxInclusive) ) {
String err = dateTime + " must be less than (or equal to) the maximum allowable ";
err += "value of " + _maxInclusive;
throw new ValidationException(err);
}
}
if (isThereMaxExclusive) {
if (dateTime.compareTo(_maxExclusive) != DateTimeBase.LESS_THAN) {
String err = dateTime + " must be less than the maximum allowable ";
err += "value of " + _maxExclusive;
throw new ValidationException(err);
}
}
//use the pattern validator
/*if (hasPattern()) {