|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<PojoPathMode>
net.sf.mmm.util.pojo.path.api.PojoPathMode
public enum PojoPathMode
This Enum contains the available modes for using a
PojoPathNavigator. The PojoPathMode has influence on how the
PojoPathNavigator deals with (intermediate) null values.
| Enum Constant Summary | |
|---|---|
CREATE_IF_NULL
This mode causes the PojoPathNavigator to
create
Pojos if they are null. |
|
FAIL_IF_NULL
This mode causes the PojoPathNavigator to fail with an
PojoPathSegmentIsNullException if an intermediate
Pojo is null. |
|
RETURN_IF_NULL
This mode causes the PojoPathNavigator to return null
if an intermediate Pojo is
null. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final PojoPathMode CREATE_IF_NULL
PojoPathNavigator to
create
Pojos if they are null. This
applies to intermediate Pojos as well as
the final result of the PojoPath.type of
the according setter.component-type of the according getter.Lists 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
Lists 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.
| Method Detail |
|---|
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 name
NullPointerException - if the argument is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||