public enum ClientUniquenessCheckCondition extends java.lang.Enum<ClientUniquenessCheckCondition> implements ValueEnum
isUnique
in a component listing multiple records such as a ListGrid, can we use the
component's fetched data set to check for uniqueness? Used by Validator.checkComponentData
. It is possible to check for uniqueness against a ListGrid's data set and "shortcut" the validation process in a couple of cases:
ResultSet
. Additionally, with the exception of the
special "forceBoth"
setting, component data will only be used to determine uniqueness if the following
conditions are met: while fetching data
, as opposed to manually instantiated
by the application developer. This is because with a hand-created ResultSet, you could provide any
set of records you want, so we don't know if they are an exact match for the default fetch operation on the
DataSource.checkComponentData
setting simply allows developers to optimize performance by catching duplicate values on the client before the save
operation is sent to the server, or avoid hitting the server at all during validation without saving
in cases where this is possible.Enum Constant and Description |
---|
BOTH
If the component has a
complete data cache that meets the
conditions outlined above, uniqueness checking will be performed against this data set only rather than querying the
dataSource to check for uniqueness. |
EARLYFAILONLY
If the component has a partial or complete data cache that meets the conditions outlined above, check for another
existing record in the cache with an identical field value.
|
FORCEBOTH
[Advanced Setting] As with
checkComponentData:"both" , if a component has a complete data cache , uniqueness checking will be peformed against this
data set instead of querying the dataSource. |
NONE
Never consult cached component data.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getValue() |
static ClientUniquenessCheckCondition |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ClientUniquenessCheckCondition[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ClientUniquenessCheckCondition NONE
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "none".
public static final ClientUniquenessCheckCondition EARLYFAILONLY
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "earlyFailOnly".
public static final ClientUniquenessCheckCondition BOTH
complete data cache
that meets the
conditions outlined above, uniqueness checking will be performed against this data set only rather than querying the
dataSource to check for uniqueness.
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "both".
public static final ClientUniquenessCheckCondition FORCEBOTH
checkComponentData:"both"
, if a component has a complete data cache
, uniqueness checking will be peformed against this
data set instead of querying the dataSource. However unlike checkComponentData:"both"
, the
"forceBoth"
setting enables this behavior even if the component's data object has a custom fetch operation
specified, or was created explicitly by application code instead of being automatically created as part of the standard
fetchData()
flow.
If this enumerated value is used in a Component XML
file or server-side DataSource descriptor (.ds.xml file), use the value "forceBoth".
public static ClientUniquenessCheckCondition[] values()
for (ClientUniquenessCheckCondition c : ClientUniquenessCheckCondition.values()) System.out.println(c);
public static ClientUniquenessCheckCondition valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null