public enum PojoPathMode extends Enum<PojoPathMode>
Enum
contains the available modes for using a PojoPathNavigator
. The
PojoPathMode
has influence on how the PojoPathNavigator
deals with (intermediate)
null
values.Enum Constant and Description |
---|
CREATE_IF_NULL
|
FAIL_IF_NULL
This mode causes the
PojoPathNavigator to fail with an PojoPathSegmentIsNullException if
an intermediate Pojo is null . |
RETURN_IF_NULL
|
Modifier and Type | Method and Description |
---|---|
static PojoPathMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PojoPathMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PojoPathMode CREATE_IF_NULL
PojoPathNavigator
to
create
Pojo
s if they are null
. This applies to intermediate
Pojo
s as well as the final result of the PojoPath
. type
of the according setter.component-type
of the according
getter. List
s need to be declared using generics. If the «Index» is greater
or equal to the size
of the
ordered container, its size is increased as necessary. For List
s this is done by
adding
null
-values. For arrays a compliant setter has to
be present. Then a copy
of the original array
will be created with the required size.PojoPathFunction.create(Object, String, PojoPathContext)
.PojoFactory
provided by the PojoPathContext
.public static final PojoPathMode FAIL_IF_NULL
PojoPathNavigator
to fail with an PojoPathSegmentIsNullException
if
an intermediate Pojo
is null
. However if only the last
segment of the PojoPath
evaluates to null
, then null
is returned. If an
«Index» is greater or equal to the
size
of the ordered
container,a NlsIndexOutOfBoundsException is thrown.public static final PojoPathMode RETURN_IF_NULL
PojoPathNavigator
to return null
if an intermediate
Pojo
is null
. This also applies for ordered containers if
«Index» is greater or equal to the containers
size
.public static PojoPathMode[] values()
for (PojoPathMode c : PojoPathMode.values()) System.out.println(c);
public static PojoPathMode 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 © 2001–2014 mmm-Team. All rights reserved.