Enum XMLNullRepresentationType

java.lang.Object
java.lang.Enum<XMLNullRepresentationType>
org.eclipse.persistence.oxm.mappings.nullpolicy.XMLNullRepresentationType
All Implemented Interfaces:
Serializable, Comparable<XMLNullRepresentationType>

public enum XMLNullRepresentationType extends Enum<XMLNullRepresentationType>
Description: An enum that is used within a Node Null Policy to determine what to marshal for a null node.
We define 3 final instances available to the user (XSI_NIL, ABSENT_NODE(default) and EMPTY_NODE.
Node Null Policy
Flag Description
XSI_NIL Nillable: Write out an xsi:nil="true" attribute.
ABSENT_NODE(default) Optional: Write out no node.
EMPTY_NODE Required: Write out an empty <node/> or node="" node.
See Also:
  • Enum Constant Details

    • XSI_NIL

      public static final XMLNullRepresentationType XSI_NIL
      Write out an xsi:nil="true" attribute. Nillable policy behavior.
    • ABSENT_NODE

      public static final XMLNullRepresentationType ABSENT_NODE
      Do not write out anything (default optional policy behavior).
    • EMPTY_NODE

      public static final XMLNullRepresentationType EMPTY_NODE
      Write out an empty node. Required policy behavior
  • Method Details

    • values

      public static XMLNullRepresentationType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static XMLNullRepresentationType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null