com.scooterframework.common.validation
Class Validators

java.lang.Object
  extended by com.scooterframework.common.validation.Validators
Direct Known Subclasses:
ActionValidators, ModelValidators

public abstract class Validators
extends java.lang.Object

Validators contains basic validation methods to validate data.

Validation can be done for inputs to a controller (ActionValidators) or data in a model (ModelValidators).

When a validatesXXX method has no messageKey as input, a default constant will be used as the message key. This default constant is one of the built-in message keys in a message property file. When input parameters of a validatesXXX method contain messageKey, but no associated value of the messageKey is found in any message property files, the messageKey itself is treated as a customized validation message.

Examples:
     public void validatesRecord() {
         //return: message is too short (minimum is 20 characters).
         validators().validatesLengthMinimum("message", 20);
         
         //return: Damn! Your post is too short.
         validators().validatesLengthMinimum("body", 300, "Damn! Your post is too short.");
     }
 


Field Summary
static java.lang.String ACCEPTED
           
static java.lang.String CANNOT_BE_BLANK
           
static java.lang.String CANNOT_BE_NULL
           
static java.lang.String CONFIRMATION
           
static java.lang.String EMAIL_PATTERN
           
static java.lang.String EXCEEDING_MAXIMUM
           
static java.lang.String EXCLUSION
           
static java.lang.String INCLUSION
           
static java.lang.String IS_EMAIL
           
static java.lang.String IS_EQUALTO
           
static java.lang.String IS_INSIDE
           
static java.lang.String IS_LARGERTHAN
           
static java.lang.String IS_LARGERTHAN_OR_EQUALTO
           
static java.lang.String IS_LESSTHAN
           
static java.lang.String IS_LESSTHAN_OR_EQUALTO
           
static java.lang.String IS_UNIQUE
           
static java.lang.String IS_WITHIN
           
static java.lang.String NOT_A_NUMBER
           
static java.lang.String OUTOF_RANGE
           
static java.lang.String TOO_LONG
           
static java.lang.String TOO_SHORT
           
static java.lang.String WRONG_LENGTH
           
 
Constructor Summary
Validators()
           
 
Method Summary
protected abstract  java.lang.Object getData(java.lang.String fieldName)
          Returns value for the specific fieldName.
protected abstract  ValidationResults getValidationResults()
          Returns validation result.
 void validatesAcceptanceOf(java.lang.String columnNames)
          Validates the fields match the accepted values.
 void validatesAcceptanceOf(java.lang.String columnNames, java.lang.String messageKey)
          Validates the fields match the accepted values.
 void validatesAcceptanceOf(java.lang.String columnNames, java.lang.String accept, java.lang.String messageKey)
          Validates the fields match the accepted values.
 void validatesConfirmationOf(java.lang.String columnNames)
          Validates the fields match their corresponding confirmation values.
 void validatesConfirmationOf(java.lang.String columnNames, boolean check)
          Validates the fields match their corresponding confirmation values.
 void validatesConfirmationOf(java.lang.String columnNames, java.lang.String messageKey)
          Validates the fields match their corresponding confirmation values.
 void validatesConfirmationOf(java.lang.String columnNames, java.lang.String messageKey, boolean check)
          Validates the fields match their corresponding confirmation values.
 void validatesExclusionOf(java.lang.String columnNames, boolean skipNull, java.lang.String exclusionValues)
          Validates each field excludes from the specified values.
 void validatesExclusionOf(java.lang.String columnNames, boolean skipNull, java.lang.String exclusionValues, java.lang.String messageKey)
          Validates each field excludes from the specified values.
 void validatesExclusionOf(java.lang.String columnNames, java.lang.String exclusionValues)
          Validates each field excludes from the specified values.
 void validatesInclusionOf(java.lang.String columnNames, boolean skipNull, java.lang.String inclusionValues)
          Validates each field matches one of the specified values.
 void validatesInclusionOf(java.lang.String columnNames, boolean skipNull, java.lang.String inclusionValues, java.lang.String messageKey)
          Validates each field matches one of the specified values.
 void validatesInclusionOf(java.lang.String columnNames, java.lang.String inclusionValues)
          Validates each field matches one of the specified values.
 void validatesIsEmail(java.lang.String columnNames)
          Validates the field data contains email only.
 void validatesIsEmail(java.lang.String columnNames, java.lang.String messageKey)
          Validates the field data contains email only.
 void validatesIsNumber(java.lang.String columnNames)
          Validates the field data contains number only.
 void validatesIsNumber(java.lang.String columnNames, java.lang.String messageKey)
          Validates the field data contains number only.
 void validatesLengthInRangeOf(java.lang.String columnNames, int length1, int length2)
          Validates the field length is in a specific range.
 void validatesLengthInRangeOf(java.lang.String columnNames, int length1, int length2, java.lang.String messageKey)
          Validates the field length is in a specific range.
 void validatesLengthMaximum(java.lang.String columnNames, int maximum)
          Validates the maximum length of a field.
 void validatesLengthMaximum(java.lang.String columnNames, int maximum, java.lang.String messageKey)
          Validates the maximum length of a field.
 void validatesLengthMinimum(java.lang.String columnNames, int minimum)
          Validates the minimum length of a field.
 void validatesLengthMinimum(java.lang.String columnNames, int minimum, java.lang.String messageKey)
          Validates the minimum length of a field.
 void validatesLengthOf(java.lang.String columnNames, int length)
          Validates the field length is as specified.
 void validatesLengthOf(java.lang.String columnNames, int length, java.lang.String messageKey)
          Validates the field length is as specified.
 void validatesNotNull(java.lang.String columnNames)
          Validates the field data is not null.
 void validatesNotNull(java.lang.String columnNames, java.lang.String messageKey)
          Validates the field data is not null.
 void validatesNumberIsEqualTo(java.lang.String columnNames, java.lang.Number number)
          Validates the field data is equal to a specific number.
 void validatesNumberIsEqualTo(java.lang.String columnNames, java.lang.Number number, java.lang.String messageKey)
          Validates the field data is equal to a specific number.
 void validatesNumberIsInsideRangeOf(java.lang.String columnNames, java.lang.Number number1, java.lang.Number number2)
          Validates the field data is in a specific range of (number1, number2).
 void validatesNumberIsInsideRangeOf(java.lang.String columnNames, java.lang.Number number1, java.lang.Number number2, java.lang.String messageKey)
          Validates the field data is in a specific range of (number1, number2).
 void validatesNumberIsLargerThan(java.lang.String columnNames, java.lang.Number number)
          Validates the field data is larger than a specific number.
 void validatesNumberIsLargerThan(java.lang.String columnNames, java.lang.Number number, java.lang.String messageKey)
          Validates the field data is larger than a specific number.
 void validatesNumberIsLargerThanOrEqualTo(java.lang.String columnNames, java.lang.Number number)
          Validates the field data is larger than or equal to a specific number.
 void validatesNumberIsLargerThanOrEqualTo(java.lang.String columnNames, java.lang.Number number, java.lang.String messageKey)
          Validates the field data is larger than or equal to a specific number.
 void validatesNumberIsLowerThan(java.lang.String columnNames, java.lang.Number number)
          Validates the field data is lower than a specific number.
 void validatesNumberIsLowerThan(java.lang.String columnNames, java.lang.Number number, java.lang.String messageKey)
          Validates the field data is lower than a specific number.
 void validatesNumberIsLowerThanOrEqualTo(java.lang.String columnNames, java.lang.Number number)
          Validates the field data is lower than or equal to a specific number.
 void validatesNumberIsLowerThanOrEqualTo(java.lang.String columnNames, java.lang.Number number, java.lang.String messageKey)
          Validates the field data is lower than or equal to a specific number.
 void validatesNumberIsWithinRangeOf(java.lang.String columnNames, java.lang.Number number1, java.lang.Number number2)
          Validates the field data is within a specific range of [number1, number2].
 void validatesNumberIsWithinRangeOf(java.lang.String columnNames, java.lang.Number number1, java.lang.Number number2, java.lang.String messageKey)
          Validates the field data is within a specific range of [number1, number2].
 void validatesNumberMaximum(java.lang.String columnNames, java.lang.Number max)
          Validates the field data does not exceed maximum.
 void validatesNumberMaximum(java.lang.String columnNames, java.lang.Number max, java.lang.String messageKey)
          Validates the field data does not exceed maximum.
 void validatesPresenceOf(java.lang.String columnNames)
          Validates the fields have non-blank values.
 void validatesPresenceOf(java.lang.String columnNames, boolean check)
          Validates the fields have non-blank values if check is true.
 void validatesPresenceOf(java.lang.String columnNames, java.lang.String messageKey)
          Validates the fields have non-blank values.
 void validatesPresenceOf(java.lang.String columnNames, java.lang.String messageKey, boolean check)
          Validates the fields have non-blank values if check is true.
 void validatesUniqenessOf(java.lang.String columnNames)
          Validates each field data is unique.
 void validatesUniqenessOf(java.lang.String columnNames, java.lang.String messageKey)
          Validates each field data is unique.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIRMATION

public static final java.lang.String CONFIRMATION
See Also:
Constant Field Values

ACCEPTED

public static final java.lang.String ACCEPTED
See Also:
Constant Field Values

INCLUSION

public static final java.lang.String INCLUSION
See Also:
Constant Field Values

EXCLUSION

public static final java.lang.String EXCLUSION
See Also:
Constant Field Values

CANNOT_BE_BLANK

public static final java.lang.String CANNOT_BE_BLANK
See Also:
Constant Field Values

CANNOT_BE_NULL

public static final java.lang.String CANNOT_BE_NULL
See Also:
Constant Field Values

NOT_A_NUMBER

public static final java.lang.String NOT_A_NUMBER
See Also:
Constant Field Values

EXCEEDING_MAXIMUM

public static final java.lang.String EXCEEDING_MAXIMUM
See Also:
Constant Field Values

IS_LESSTHAN_OR_EQUALTO

public static final java.lang.String IS_LESSTHAN_OR_EQUALTO
See Also:
Constant Field Values

IS_LESSTHAN

public static final java.lang.String IS_LESSTHAN
See Also:
Constant Field Values

IS_LARGERTHAN_OR_EQUALTO

public static final java.lang.String IS_LARGERTHAN_OR_EQUALTO
See Also:
Constant Field Values

IS_LARGERTHAN

public static final java.lang.String IS_LARGERTHAN
See Also:
Constant Field Values

IS_EQUALTO

public static final java.lang.String IS_EQUALTO
See Also:
Constant Field Values

IS_WITHIN

public static final java.lang.String IS_WITHIN
See Also:
Constant Field Values

IS_INSIDE

public static final java.lang.String IS_INSIDE
See Also:
Constant Field Values

IS_UNIQUE

public static final java.lang.String IS_UNIQUE
See Also:
Constant Field Values

IS_EMAIL

public static final java.lang.String IS_EMAIL
See Also:
Constant Field Values

TOO_LONG

public static final java.lang.String TOO_LONG
See Also:
Constant Field Values

TOO_SHORT

public static final java.lang.String TOO_SHORT
See Also:
Constant Field Values

WRONG_LENGTH

public static final java.lang.String WRONG_LENGTH
See Also:
Constant Field Values

OUTOF_RANGE

public static final java.lang.String OUTOF_RANGE
See Also:
Constant Field Values

EMAIL_PATTERN

public static final java.lang.String EMAIL_PATTERN
See Also:
Constant Field Values
Constructor Detail

Validators

public Validators()
Method Detail

validatesPresenceOf

public void validatesPresenceOf(java.lang.String columnNames)
Validates the fields have non-blank values.

Parameters:
columnNames - A string of column names separated by comma or blank

validatesPresenceOf

public void validatesPresenceOf(java.lang.String columnNames,
                                boolean check)
Validates the fields have non-blank values if check is true.

Parameters:
columnNames - a string of column names separated by comma or blank
check - a boolean variable to indicate whether to do the validation

validatesPresenceOf

public void validatesPresenceOf(java.lang.String columnNames,
                                java.lang.String messageKey)
Validates the fields have non-blank values.

Parameters:
columnNames - a string of column names separated by comma or blank
messageKey - key to a message in message resource files or a message

validatesPresenceOf

public void validatesPresenceOf(java.lang.String columnNames,
                                java.lang.String messageKey,
                                boolean check)
Validates the fields have non-blank values if check is true.

Parameters:
columnNames - a string of column names separated by comma or blank
messageKey - key to a message in message resource files or a message
check - a boolean variable to indicate whether to do the validation

validatesConfirmationOf

public void validatesConfirmationOf(java.lang.String columnNames)
Validates the fields match their corresponding confirmation values. A field's confirmation field name is "${field_name}_confirmation".

Parameters:
columnNames - A string of column names separated by comma or blank

validatesConfirmationOf

public void validatesConfirmationOf(java.lang.String columnNames,
                                    boolean check)
Validates the fields match their corresponding confirmation values. A field's confirmation field name is "${field_name}_confirmation".

Parameters:
columnNames - a string of column names separated by comma or blank
check - a boolean variable to indicate whether to do the validation

validatesConfirmationOf

public void validatesConfirmationOf(java.lang.String columnNames,
                                    java.lang.String messageKey)
Validates the fields match their corresponding confirmation values. A field's confirmation field name is "${field_name}_confirmation".

Parameters:
columnNames - a string of column names separated by comma or blank
messageKey - key to a message in message resource files or a message

validatesConfirmationOf

public void validatesConfirmationOf(java.lang.String columnNames,
                                    java.lang.String messageKey,
                                    boolean check)
Validates the fields match their corresponding confirmation values. A field's confirmation field name is "${field_name}_confirmation".

Parameters:
columnNames - a string of column names separated by comma or blank
messageKey - key to a message in message resource files or a message
check - a boolean variable to indicate whether to do the validation

validatesAcceptanceOf

public void validatesAcceptanceOf(java.lang.String columnNames)
Validates the fields match the accepted values. This method is usually used for validating acceptance of service agreement checkbox. The default accepted value is "1".

Parameters:
columnNames - a string of column names separated by comma or blank

validatesAcceptanceOf

public void validatesAcceptanceOf(java.lang.String columnNames,
                                  java.lang.String messageKey)
Validates the fields match the accepted values. This method is usually used for validating acceptance of service agreement checkbox. The default accepted value is "1".

Parameters:
columnNames - a string of column names separated by comma or blank
messageKey - key to a message in message resource files or a message

validatesAcceptanceOf

public void validatesAcceptanceOf(java.lang.String columnNames,
                                  java.lang.String accept,
                                  java.lang.String messageKey)
Validates the fields match the accepted values. This method is usually used for validating acceptance of service agreement checkbox. The default accepted value is "1".

Parameters:
columnNames - a string of column names separated by comma or blank
accept - the acceptance value
messageKey - key to a message in message resource files or a message

validatesInclusionOf

public void validatesInclusionOf(java.lang.String columnNames,
                                 java.lang.String inclusionValues)
Validates each field matches one of the specified values.
 Examples:
      validatesInclusionOf(gender, true, "Male, Female", "Please specify your gender.");//gender can be either "Male" or "Female" or null.
      validatesInclusionOf(status, "Open, Close", "validation.inclusion");//status must be either "Open" or "Close", not null.
      validatesInclusionOf(status, "Open, Close, null", "validation.inclusion");//status must be either "Open" or "Close" or null.
 

Parameters:
columnNames - a string of column names separated by comma or blank
inclusionValues - the inclusion values separated by comma

validatesInclusionOf

public void validatesInclusionOf(java.lang.String columnNames,
                                 boolean skipNull,
                                 java.lang.String inclusionValues)
Validates each field matches one of the specified values.
 Examples:
      validatesInclusionOf(gender, true, "Male, Female", "Please specify your gender.");//gender can be either "Male" or "Female" or null.
      validatesInclusionOf(status, "Open, Close", "validation.inclusion");//status must be either "Open" or "Close", not null.
      validatesInclusionOf(status, "Open, Close, null", "validation.inclusion");//status must be either "Open" or "Close" or null.
 

Parameters:
columnNames - a string of column names separated by comma or blank
skipNull - if true skip the validation when the column value is null, default is false.
inclusionValues - the inclusion values separated by comma

validatesInclusionOf

public void validatesInclusionOf(java.lang.String columnNames,
                                 boolean skipNull,
                                 java.lang.String inclusionValues,
                                 java.lang.String messageKey)
Validates each field matches one of the specified values.
 Examples:
      validatesInclusionOf(gender, true, "Male, Female", "Please specify your gender.");//gender can be either "Male" or "Female" or null.
      validatesInclusionOf(status, "Open, Close", "validation.inclusion");//status must be either "Open" or "Close", not null.
      validatesInclusionOf(status, "Open, Close, null", "validation.inclusion");//status must be either "Open" or "Close" or null.
 

Parameters:
columnNames - a string of column names separated by comma or blank
skipNull - if true skip the validation when the column value is null, default is false.
inclusionValues - the inclusion values separated by comma
messageKey - key to a message in message resource files or a message

validatesExclusionOf

public void validatesExclusionOf(java.lang.String columnNames,
                                 java.lang.String exclusionValues)
Validates each field excludes from the specified values.
 Examples:
      validatesExclusionOf(gender, true, "Female", "No female please.");//gender can be either "Male" or null.
      validatesExclusionOf(status, "Open, Close", "validation.exclusion");//status cannot be "Open" or "Close".
      validatesExclusionOf(status, "Open, Close, null", "validation.exclusion");//status cannot be "Open" or "Close" or null.
 

Parameters:
columnNames - a string of column names separated by comma or blank
exclusionValues - the exclusion values separated by comma

validatesExclusionOf

public void validatesExclusionOf(java.lang.String columnNames,
                                 boolean skipNull,
                                 java.lang.String exclusionValues)
Validates each field excludes from the specified values.
 Examples:
      validatesExclusionOf(gender, true, "Female", "No female please.");//gender can be either "Male" or null.
      validatesExclusionOf(status, "Open, Close", "validation.exclusion");//status cannot be "Open" or "Close".
      validatesExclusionOf(status, "Open, Close, null", "validation.exclusion");//status cannot be "Open" or "Close" or null.
 

Parameters:
columnNames - a string of column names separated by comma or blank
skipNull - if true skip the validation when the column value is null, default is false.
exclusionValues - the exclusion values separated by comma

validatesExclusionOf

public void validatesExclusionOf(java.lang.String columnNames,
                                 boolean skipNull,
                                 java.lang.String exclusionValues,
                                 java.lang.String messageKey)
Validates each field excludes from the specified values.
 Examples:
      validatesExclusionOf(gender, true, "Female", "No female please.");//gender can be either "Male" or null.
      validatesExclusionOf(status, "Open, Close", "validation.exclusion");//status cannot be "Open" or "Close".
      validatesExclusionOf(status, "Open, Close, null", "validation.exclusion");//status cannot be "Open" or "Close" or null.
 

Parameters:
columnNames - a string of column names separated by comma or blank
skipNull - if true skip the validation when the column value is null, default is false.
exclusionValues - the exclusion values separated by comma
messageKey - key to a message in message resource files or a message

validatesNotNull

public void validatesNotNull(java.lang.String columnNames)
Validates the field data is not null.

Parameters:
columnNames - A string of column names separated by comma or blank

validatesNotNull

public void validatesNotNull(java.lang.String columnNames,
                             java.lang.String messageKey)
Validates the field data is not null.

Parameters:
columnNames - a string of column names separated by comma or blank
messageKey - key to a message in message resource files or a message

validatesIsEmail

public void validatesIsEmail(java.lang.String columnNames)
Validates the field data contains email only.

Parameters:
columnNames - a string of column names separated by comma or blank

validatesIsEmail

public void validatesIsEmail(java.lang.String columnNames,
                             java.lang.String messageKey)
Validates the field data contains email only.

Parameters:
columnNames - a string of column names separated by comma or blank
messageKey - key to a message in message resource files or a message

validatesIsNumber

public void validatesIsNumber(java.lang.String columnNames)
Validates the field data contains number only.

Parameters:
columnNames - a string of column names separated by comma or blank

validatesIsNumber

public void validatesIsNumber(java.lang.String columnNames,
                              java.lang.String messageKey)
Validates the field data contains number only.

Parameters:
columnNames - a string of column names separated by comma or blank
messageKey - key to a message in message resource files or a message

validatesNumberMaximum

public void validatesNumberMaximum(java.lang.String columnNames,
                                   java.lang.Number max)
Validates the field data does not exceed maximum.

Parameters:
columnNames - a string of column names separated by comma or blank
max - a maximum number

validatesNumberMaximum

public void validatesNumberMaximum(java.lang.String columnNames,
                                   java.lang.Number max,
                                   java.lang.String messageKey)
Validates the field data does not exceed maximum.

Parameters:
columnNames - a string of column names separated by comma or blank
max - a maximum number
messageKey - key to a message in message resource files or a message

validatesNumberIsLowerThanOrEqualTo

public void validatesNumberIsLowerThanOrEqualTo(java.lang.String columnNames,
                                                java.lang.Number number)
Validates the field data is lower than or equal to a specific number.

Parameters:
columnNames - a string of column names separated by comma or blank
number - a specific number

validatesNumberIsLowerThanOrEqualTo

public void validatesNumberIsLowerThanOrEqualTo(java.lang.String columnNames,
                                                java.lang.Number number,
                                                java.lang.String messageKey)
Validates the field data is lower than or equal to a specific number.

Parameters:
columnNames - a string of column names separated by comma or blank
number - a specific number
messageKey - key to a message in message resource files or a message

validatesNumberIsLowerThan

public void validatesNumberIsLowerThan(java.lang.String columnNames,
                                       java.lang.Number number)
Validates the field data is lower than a specific number.

Parameters:
columnNames - a string of column names separated by comma or blank
number - a specific number

validatesNumberIsLowerThan

public void validatesNumberIsLowerThan(java.lang.String columnNames,
                                       java.lang.Number number,
                                       java.lang.String messageKey)
Validates the field data is lower than a specific number.

Parameters:
columnNames - a string of column names separated by comma or blank
number - a specific number
messageKey - key to a message in message resource files or a message

validatesNumberIsLargerThanOrEqualTo

public void validatesNumberIsLargerThanOrEqualTo(java.lang.String columnNames,
                                                 java.lang.Number number)
Validates the field data is larger than or equal to a specific number.

Parameters:
columnNames - a string of column names separated by comma or blank
number - a specific number

validatesNumberIsLargerThanOrEqualTo

public void validatesNumberIsLargerThanOrEqualTo(java.lang.String columnNames,
                                                 java.lang.Number number,
                                                 java.lang.String messageKey)
Validates the field data is larger than or equal to a specific number.

Parameters:
columnNames - a string of column names separated by comma or blank
number - a specific number
messageKey - key to a message in message resource files or a message

validatesNumberIsLargerThan

public void validatesNumberIsLargerThan(java.lang.String columnNames,
                                        java.lang.Number number)
Validates the field data is larger than a specific number.

Parameters:
columnNames - a string of column names separated by comma or blank
number - a specific number

validatesNumberIsLargerThan

public void validatesNumberIsLargerThan(java.lang.String columnNames,
                                        java.lang.Number number,
                                        java.lang.String messageKey)
Validates the field data is larger than a specific number.

Parameters:
columnNames - a string of column names separated by comma or blank
number - a specific number
messageKey - key to a message in message resource files or a message

validatesNumberIsEqualTo

public void validatesNumberIsEqualTo(java.lang.String columnNames,
                                     java.lang.Number number)
Validates the field data is equal to a specific number.

Parameters:
columnNames - a string of column names separated by comma or blank
number - a specific number

validatesNumberIsEqualTo

public void validatesNumberIsEqualTo(java.lang.String columnNames,
                                     java.lang.Number number,
                                     java.lang.String messageKey)
Validates the field data is equal to a specific number.

Parameters:
columnNames - a string of column names separated by comma or blank
number - a specific number
messageKey - key to a message in message resource files or a message

validatesNumberIsWithinRangeOf

public void validatesNumberIsWithinRangeOf(java.lang.String columnNames,
                                           java.lang.Number number1,
                                           java.lang.Number number2)
Validates the field data is within a specific range of [number1, number2].

Parameters:
columnNames - a string of column names separated by comma or blank
number1 - a specific number
number2 - a specific number

validatesNumberIsWithinRangeOf

public void validatesNumberIsWithinRangeOf(java.lang.String columnNames,
                                           java.lang.Number number1,
                                           java.lang.Number number2,
                                           java.lang.String messageKey)
Validates the field data is within a specific range of [number1, number2].

Parameters:
columnNames - a string of column names separated by comma or blank
number1 - a specific number
number2 - a specific number
messageKey - key to a message in message resource files or a message

validatesNumberIsInsideRangeOf

public void validatesNumberIsInsideRangeOf(java.lang.String columnNames,
                                           java.lang.Number number1,
                                           java.lang.Number number2)
Validates the field data is in a specific range of (number1, number2).

Parameters:
columnNames - a string of column names separated by comma or blank
number1 - a specific number
number2 - a specific number

validatesNumberIsInsideRangeOf

public void validatesNumberIsInsideRangeOf(java.lang.String columnNames,
                                           java.lang.Number number1,
                                           java.lang.Number number2,
                                           java.lang.String messageKey)
Validates the field data is in a specific range of (number1, number2).

Parameters:
columnNames - a string of column names separated by comma or blank
number1 - a specific number
number2 - a specific number
messageKey - key to a message in message resource files or a message

validatesLengthMaximum

public void validatesLengthMaximum(java.lang.String columnNames,
                                   int maximum)
Validates the maximum length of a field.

Parameters:
columnNames - a string of column names separated by comma or blank
maximum - the maximum length

validatesLengthMaximum

public void validatesLengthMaximum(java.lang.String columnNames,
                                   int maximum,
                                   java.lang.String messageKey)
Validates the maximum length of a field.

Parameters:
columnNames - a string of column names separated by comma or blank
maximum - the maximum length
messageKey - key to a message in message resource files or a message

validatesLengthMinimum

public void validatesLengthMinimum(java.lang.String columnNames,
                                   int minimum)
Validates the minimum length of a field.

Parameters:
columnNames - a string of column names separated by comma or blank
minimum - the minimum length

validatesLengthMinimum

public void validatesLengthMinimum(java.lang.String columnNames,
                                   int minimum,
                                   java.lang.String messageKey)
Validates the minimum length of a field.

Parameters:
columnNames - a string of column names separated by comma or blank
minimum - the minimum length
messageKey - key to a message in message resource files or a message

validatesLengthInRangeOf

public void validatesLengthInRangeOf(java.lang.String columnNames,
                                     int length1,
                                     int length2)
Validates the field length is in a specific range.

Parameters:
columnNames - a string of column names separated by comma or blank
length1 - the minimum length
length2 - the maximum length

validatesLengthInRangeOf

public void validatesLengthInRangeOf(java.lang.String columnNames,
                                     int length1,
                                     int length2,
                                     java.lang.String messageKey)
Validates the field length is in a specific range.

Parameters:
columnNames - a string of column names separated by comma or blank
length1 - the minimum length
length2 - the maximum length
messageKey - key to a message in message resource files or a message

validatesLengthOf

public void validatesLengthOf(java.lang.String columnNames,
                              int length)
Validates the field length is as specified.

Parameters:
columnNames - a string of column names separated by comma or blank
length - the correct length

validatesLengthOf

public void validatesLengthOf(java.lang.String columnNames,
                              int length,
                              java.lang.String messageKey)
Validates the field length is as specified.

Parameters:
columnNames - a string of column names separated by comma or blank
length - the correct length
messageKey - key to a message in message resource files or a message

validatesUniqenessOf

public void validatesUniqenessOf(java.lang.String columnNames)
Validates each field data is unique.

Parameters:
columnNames - a string of column names separated by comma or blank

validatesUniqenessOf

public void validatesUniqenessOf(java.lang.String columnNames,
                                 java.lang.String messageKey)
Validates each field data is unique.

Parameters:
columnNames - a string of column names separated by comma or blank
messageKey - key to a message in message resource files or a message

getValidationResults

protected abstract ValidationResults getValidationResults()
Returns validation result.

Returns:
validation result

getData

protected abstract java.lang.Object getData(java.lang.String fieldName)
Returns value for the specific fieldName. See implementing classes for details of this method.

Parameters:
fieldName -
Returns:
value for the field