public enum ValidateType extends Enum<ValidateType>
Enum Constant and Description |
---|
ADD |
ALL |
ENRICH |
GET |
LIST |
NONE |
REMOVE |
SCALAR |
SELECT |
UPDATE |
Modifier and Type | Method and Description |
---|---|
void |
assertValidate(Object params)
Use validator (JSR 303) to perform validation against domain model,
when some constraint is violated
ConstraintException is throw |
static <T> void |
assertValidate(Object params,
Class<T> validateGroup)
Use validator (JSR 303) to perform validation against domain model
|
static void |
assertValidate(Object params,
ValidateType validateType)
Use validator (JSR 303) to perform validation against domain model
|
static ValidateType |
get(String type) |
abstract Class<?> |
getValidateGroup() |
Map<String,String> |
validate(Object params)
Use validator (JSR 303) to perform validation against domain model
|
static <T> Map<String,String> |
validate(Object params,
Class<T> validateGroup)
Use validator (JSR 303) to perform validation against domain model
|
static Map<String,String> |
validate(Object params,
ValidateType validateType)
Use validator (JSR 303) to perform validation against domain model
|
static ValidateType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ValidateType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ValidateType NONE
public static final ValidateType ALL
public static final ValidateType GET
public static final ValidateType LIST
public static final ValidateType SELECT
public static final ValidateType SCALAR
public static final ValidateType ADD
public static final ValidateType UPDATE
public static final ValidateType ENRICH
public static final ValidateType REMOVE
public static ValidateType[] values()
for (ValidateType c : ValidateType.values()) System.out.println(c);
public static ValidateType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract Class<?> getValidateGroup()
public static ValidateType get(String type)
type
- of validatetype
, ValidateType.NONE if doesn't matchpublic void assertValidate(Object params)
ConstraintException
is throwparams
- the domain model to validateConstraintException
- when some constraint is violatedpublic Map<String,String> validate(Object params)
params
- the domain model to validatepublic static void assertValidate(Object params, ValidateType validateType)
params
- the domain model to validatevalidateType
- type of validationConstraintException
- when some constraint is violatedpublic static <T> void assertValidate(Object params, Class<T> validateGroup)
params
- the domain model to validatevalidateGroup
- type of validationConstraintException
- when some constraint is violatedpublic static Map<String,String> validate(Object params, ValidateType validateType)
params
- the domain model to validatevalidateType
- type of validationpublic static <T> Map<String,String> validate(Object params, Class<T> validateGroup)
params
- the domain model to validatevalidateGroup
- type of validationCopyright © 2012–2020 jkniv, copyleft code. All rights reserved.