public enum ValidationMode extends Enum<ValidationMode>
JTransaction
.Enum Constant and Description |
---|
AUTOMATIC
Objects are enqueued for validation automatically (if necessary) when they are modified.
|
DISABLED
Validation is disabled.
|
MANUAL
Objects are enqueued for validation only when
JObject.revalidate(java.lang.Class<?>...) is explicitly invoked. |
Modifier and Type | Method and Description |
---|---|
static ValidationMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ValidationMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ValidationMode DISABLED
JObject.revalidate(java.lang.Class<?>...)
is invoked.public static final ValidationMode MANUAL
JObject.revalidate(java.lang.Class<?>...)
is explicitly invoked.public static final ValidationMode AUTOMATIC
In this mode, objects are enqueued for validation whenever JObject.revalidate(java.lang.Class<?>...)
is invoked; in addition,
objects are enqueued for validation automatically as if by JObject.revalidate(java.lang.Class<?>...)
when:
@OnValidate
annoted method@OnValidate
annoted method
Note that the presence of a @OnValidate
annotation on a method
does not in itself result in automatic validation when any field changes (it merely specifies an action
to take when validation occurs). To trigger revalidation after field changes, add
@OnChange
-annotated method(s) that invoke
this.revalidate()
.
Note that AUTOMATIC
enqueues as if by JObject.revalidate(java.lang.Class<?>...)
, i.e., the
Default
validation group applies. Therefore, if a constraint has explicit groups()
,
and none extend Default
, then it will not be applied automatically.
public static ValidationMode[] values()
for (ValidationMode c : ValidationMode.values()) System.out.println(c);
public static ValidationMode 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 nullCopyright © 2016. All rights reserved.