@Test public void testCheckMinMaxDate_haserror() throws ParseException { ValidationResult validationResult = new ValidationResult(); UpdateValidateUtil.checkNotEmptyAndValidMinMaxDate( "0001-01-01T00:00:00Z", "eventDate", validationResult); assertTrue(validationResult.hasError()); }
public static void checkNotEmptyAndValidMinMaxDate(String dateString, String fieldName, ValidationResult validationResult) { checkNotEmpty(dateString, fieldName, validationResult); checkValidAndMinMaxDate(dateString, UpdateValidateUtil.minValForDateTimeColum, UpdateValidateUtil.maxValForDateTimeColum, fieldName, validationResult); }
UpdateValidateUtil { public static void checkNotEmptyAndValidMinMaxDate(String dateString, String fieldName, ValidationResult validationResult) { checkNotEmpty(dateString, fieldName, validationResult); checkValidAndMinMaxDate(dateString, UpdateValidateUtil.minValForDateTimeColum, UpdateValidateUtil.maxValForDateTimeColum, fieldName, validationResult); } }
UpdateValidateUtil { public static void checkNotEmptyAndValidMinMaxDate(String dateString, String fieldName, ValidationResult validationResult) { checkNotEmpty(dateString, fieldName, validationResult); checkValidAndMinMaxDate(dateString, UpdateValidateUtil.minValForDateTimeColum, UpdateValidateUtil.maxValForDateTimeColum, fieldName, validationResult); } private  UpdateValidateUtil(); }
UpdateValidateUtil { public static void checkNotEmptyAndValidMinMaxDate(String dateString, String fieldName, ValidationResult validationResult) { checkNotEmpty(dateString, fieldName, validationResult); checkValidAndMinMaxDate(dateString, UpdateValidateUtil.minValForDateTimeColum, UpdateValidateUtil.maxValForDateTimeColum, fieldName, validationResult); } private  UpdateValidateUtil(); static void checkNotEmpty(String value, String fieldName,
            ValidationResult validationResult); static void checkNotNull(Object value, String fieldName,
            ValidationResult validationResult); static void checkNotEmpty(List<String> values, String fieldName,
            ValidationResult validationResult); static void checkMaxLength(String value, int maxLength,
            String fieldName, ValidationResult validationResult); static void checkMinMaxInt(Integer value, int minValue,
            long maxValue, String fieldName, ValidationResult validationResult); static void checkMinMaxLong(Long value, int minValue,
            long maxValue, String fieldName, ValidationResult validationResult); static void checkMinMaxDate(Date value, Date minValue,
            Date maxValue, String fieldName, ValidationResult validationResult); static void checkValidAndMinMaxDate(String dateString,
            Date minValue, Date maxValue, String fieldName,
            ValidationResult validationResult); static void checkNotEmptyAndValidMinMaxDate(String dateString,
            String fieldName, ValidationResult validationResult); }
UpdateValidateUtil { public static void checkNotEmptyAndValidMinMaxDate(String dateString, String fieldName, ValidationResult validationResult) { checkNotEmpty(dateString, fieldName, validationResult); checkValidAndMinMaxDate(dateString, UpdateValidateUtil.minValForDateTimeColum, UpdateValidateUtil.maxValForDateTimeColum, fieldName, validationResult); } private  UpdateValidateUtil(); static void checkNotEmpty(String value, String fieldName,
            ValidationResult validationResult); static void checkNotNull(Object value, String fieldName,
            ValidationResult validationResult); static void checkNotEmpty(List<String> values, String fieldName,
            ValidationResult validationResult); static void checkMaxLength(String value, int maxLength,
            String fieldName, ValidationResult validationResult); static void checkMinMaxInt(Integer value, int minValue,
            long maxValue, String fieldName, ValidationResult validationResult); static void checkMinMaxLong(Long value, int minValue,
            long maxValue, String fieldName, ValidationResult validationResult); static void checkMinMaxDate(Date value, Date minValue,
            Date maxValue, String fieldName, ValidationResult validationResult); static void checkValidAndMinMaxDate(String dateString,
            Date minValue, Date maxValue, String fieldName,
            ValidationResult validationResult); static void checkNotEmptyAndValidMinMaxDate(String dateString,
            String fieldName, ValidationResult validationResult); static final String ERROR_PROP_NAME_PREFIX_EVENT; static final String ERROR_PROP_NAME_PREFIX_PUBLICID; static final String ERROR_PROP_NAME_PREFIX_REMARK; static final String ERROR_PROP_NAME_PREFIX_LINK; static final String ERROR_PROP_NAME_PREFIX_ENTITY; static final String ERROR_PROP_NAME_PREFIX_ENTITY_ADDR; static final String ERROR_PROP_NAME_PREFIX_ENTITY_TEL; static final int MAX_LENGTH_LANG; static final int MAX_LENGTH_PORT43; static final int MAX_LENGTH_UNICODENAME; static final int MAX_LENGTH_HANDLE; static final int MAX_LENGTH_STATUS; static final int MAX_LENGTH_LDHNAME; static final int MAX_LENGTH_255; static final int MAX_LENGTH_2048; static final int MIN_VAL_FOR_INT_COLUMN; static final int MAX_VAL_FOR_INT_COLUMN; static final int MIN_VAL_FOR_TINYINT_COLUMN; static final int MAX_VAL_FOR_TINYINT_COLUMN; static final int MIN_VAL_FOR_BIGINT_COLUMN; static final long MAX_VAL_FOR_BIGINT_COLUMN; static Date minValForDateTimeColum; static Date maxValForDateTimeColum; static final int MAX_LENGTH_VERSION; }