EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.oxm.annotations
Annotation Type XmlIsSetNullPolicy


@Target(value={FIELD,METHOD})
@Retention(value=RUNTIME)
public @interface XmlIsSetNullPolicy

Purpose: Provide a means of using annotations to customise the handling of null values and their xml representation.

This annotation provides the user with a mechanism to customise the way that EclipseLink handles the reading and writing of null values. This version of NullPolicy makes use of an isSet method to differentiate between values that were explicitly set to null vs values which are null due to being unset. In this case the marshal behaviour specified by the nullRepresentationForXml will only be used if the property was set. A set is only performed during unmarshal if an element was present in the document. The following values can be specified:

See Also:
XmlNullPolicy, XmlMarshalNullRepresentation, XmlParameter

Required Element Summary
 java.lang.String isSetMethodName
           
 
Optional Element Summary
 boolean emptyNodeRepresentsNull
           
 XmlParameter[] isSetParameters
           
 XmlMarshalNullRepresentation nullRepresentationForXml
           
 boolean xsiNilRepresentsNull
           
 

Element Detail

isSetMethodName

public abstract java.lang.String isSetMethodName

xsiNilRepresentsNull

public abstract boolean xsiNilRepresentsNull
Default:
false

emptyNodeRepresentsNull

public abstract boolean emptyNodeRepresentsNull
Default:
false

nullRepresentationForXml

public abstract XmlMarshalNullRepresentation nullRepresentationForXml
Default:
org.eclipse.persistence.oxm.annotations.XmlMarshalNullRepresentation.ABSENT_NODE

isSetParameters

public abstract XmlParameter[] isSetParameters
Default:
{}

EclipseLink 2.2.0, build 'v20110202-r8913' API Reference