public enum NullValueMappingStrategy extends java.lang.Enum<NullValueMappingStrategy>
null values passed to mapping methods.| Enum Constant and Description |
|---|
DEFAULT
When given via
Mapper.nullValueMappingStrategy(), causes the setting specified via
MapperConfig.nullValueMappingStrategy() to be applied, if present. |
RETURN_DEFAULT
If
null is passed to a mapping method, a default value will be returned. |
RETURN_NULL
If
null is passed to a mapping method, null will be returned. |
| Modifier and Type | Method and Description |
|---|---|
static NullValueMappingStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static NullValueMappingStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NullValueMappingStrategy RETURN_NULL
null is passed to a mapping method, null will be returned. That's the default behavior if no
alternative strategy is configured globally, for given mapper or method.public static final NullValueMappingStrategy RETURN_DEFAULT
null is passed to a mapping method, a default value will be returned. The value depends on the kind of
the annotated method:
Mapping.expression() or Mapping.constant() will be populated based on the
given expression or constant. Note that expressions must be prepared to deal with null values in this
case.public static final NullValueMappingStrategy DEFAULT
Mapper.nullValueMappingStrategy(), causes the setting specified via
MapperConfig.nullValueMappingStrategy() to be applied, if present.
When given on specific mapping methods (e.g. via @ BeanMapping#nullValueMappingStrategy()}), causes the setting
specified via () to be applied, if present.
Otherwise causes RETURN_NULL to be applied.
public static NullValueMappingStrategy[] values()
for (NullValueMappingStrategy c : NullValueMappingStrategy.values()) System.out.println(c);
public static NullValueMappingStrategy 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 nullCopyright © 2012-2015. All Rights Reserved.