public final class ParameterValidator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ASSERT_NONE_MESSAGE |
static java.lang.String |
ASSERT_ONE_MESSAGE |
static java.lang.String |
ASSERT_ONE_OR_LESS_MESSAGE |
Modifier and Type | Method and Description |
---|---|
static void |
assertNone(java.lang.String paramName,
ParameterList parameters)
Ensure a parameter doesn't occur in the specified list.
|
static void |
assertNullOrEqual(Parameter param,
ParameterList parameters) |
static void |
assertOne(java.lang.String paramName,
ParameterList parameters)
Ensure a parameter occurs once.
|
static void |
assertOneOrLess(java.lang.String paramName,
ParameterList parameters)
Ensure a parameter occurs no more than once.
|
public static final java.lang.String ASSERT_NONE_MESSAGE
public static final java.lang.String ASSERT_ONE_OR_LESS_MESSAGE
public static final java.lang.String ASSERT_ONE_MESSAGE
public static void assertOneOrLess(java.lang.String paramName, ParameterList parameters) throws ValidationException
paramName
- the parameter nameparameters
- a list of parameters to queryValidationException
- when the specified parameter occurs more than oncepublic static void assertOne(java.lang.String paramName, ParameterList parameters) throws ValidationException
paramName
- the parameter nameparameters
- a list of parameters to queryValidationException
- when the specified parameter does not occur oncepublic static void assertNone(java.lang.String paramName, ParameterList parameters) throws ValidationException
paramName
- the name of a parameterparameters
- a list of parametersValidationException
- thrown when the specified property
is found in the list of propertiespublic static void assertNullOrEqual(Parameter param, ParameterList parameters) throws ValidationException
param
- a parameter instanceparameters
- a list of parametersValidationException
- where the assertion fails