|
Oracle Fusion Middleware Java API Reference for Oracle TopLink 11g Release 1 (11.1.1) E28847-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
org.eclipse.persistence.oxm.mappings.nullpolicy.AbstractNullPolicy
public abstract class AbstractNullPolicy
PUBLIC: Description: This node null policy allows for the handling of various representations of null in XML documents.
Null policies have 2 concrete implementations:
| Unmarshal Flag | Description |
|---|---|
| isSetPerformedForAbsentNode | This umarshal flag represents whether a set is done for absent nodes only. |
| isNullRepresentedByEmptyNode | If this unmarshal flag is false for empty nodes we set an empty Object for composite mappings, otherwise we set to null. |
| isNullRepresentedByXsiNil | If this unmarshal flag is false for xsi:nil nodes we ignore the xsi:nil attribute and treat as an empty node. Otherwise we set to null. |
| Marshal Enum | XMLNullRepresentationType 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. |
Usage:
NullCapableValue| Field Summary | |
|---|---|
protected static java.lang.String |
COLON_W_SCHEMA_NIL_ATTRIBUTE |
protected boolean |
isNullRepresentedByEmptyNodeThis state flag determines how we unmarshal empty nodes. true = Perform a set(null) or primitive type equivalent. false = (default) Perform a set(new Object()). |
protected boolean |
isNullRepresentedByXsiNilThis state flag determines how we unmarshal xsi:nil nodes. |
protected boolean |
isSetPerformedForAbsentNodeThis state flag determines how we unmarshal absent nodes. true = (default) Perform a set(null). false = Do not perform a set(null). |
protected XMLNullRepresentationType |
marshalNullRepresentationThis enum instance determines what to write out during a marshal operation. |
protected static java.lang.String |
TRUE |
protected static java.lang.String |
XSI_NIL_ATTRIBUTE |
| Constructor Summary | |
|---|---|
AbstractNullPolicy() |
|
| Method Summary | |
|---|---|
boolean |
compositeObjectMarshal(XMLRecord record, java.lang.Object object, XMLField field, org.eclipse.persistence.internal.sessions.AbstractSession session)INTERNAL: When using the DOM Platform, this method is responsible for marshalling null values for the XML Composite Object Mapping. |
boolean |
compositeObjectMarshal(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, Session session, NamespaceResolver namespaceResolver)INTERNAL: When using the SAX Platform, this method is responsible for marshalling null values for the XML Composite Object Mapping. |
void |
directMarshal(org.eclipse.persistence.internal.helper.DatabaseField field, XMLRecord record, java.lang.Object object) |
boolean |
directMarshal(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment, MarshalRecord marshalRecord, java.lang.Object object, Session session, NamespaceResolver namespaceResolver)INTERNAL: When using the SAX or DOM Platform, this method is responsible for marshalling null values for the XML Direct Mapping. |
boolean |
getIsSetPerformedForAbsentNode() |
XMLNullRepresentationType |
getMarshalNullRepresentation()Get the enum that determines what XML to write when a null value is encountered. |
boolean |
isNullRepresentedByEmptyNode() |
boolean |
isNullRepresentedByXsiNil() |
protected java.lang.String |
processNamespaceResolverForXSIPrefix(NamespaceResolver namespaceResolver, MarshalRecord marshalRecord)INTERNAL: Private function to process or create an entry in the NamespaceResolver for the xsi prefix. |
void |
setMarshalNullRepresentation(XMLNullRepresentationType anEnumInstance)Set the enum that determines what XML to write when a null value is encountered. |
void |
setNullRepresentedByEmptyNode(boolean bisNullRepresentedByEmptyNode) |
void |
setNullRepresentedByXsiNil(boolean bIsNullRepresentedByXsiNil) |
boolean |
valueIsNull(org.xml.sax.Attributes attributes)INTERNAL: When using the SAX or DOM Platform during unmarshal operations. |
boolean |
valueIsNull(org.w3c.dom.Element element)INTERNAL: When using the DOM Platform during unmarshal operations. |
abstract void |
xPathNode(org.eclipse.persistence.internal.oxm.XPathNode xPathNode, org.eclipse.persistence.internal.oxm.NullCapableValue nullCapableValue)INTERNAL: When using the SAX Platform this allows a NodeValue to be registered to receive events from the TreeObjectBuilder. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String TRUE
protected static final java.lang.String COLON_W_SCHEMA_NIL_ATTRIBUTE
protected static final java.lang.String XSI_NIL_ATTRIBUTE
protected boolean isSetPerformedForAbsentNode
protected boolean isNullRepresentedByEmptyNode
protected boolean isNullRepresentedByXsiNil
protected XMLNullRepresentationType marshalNullRepresentation
| Constructor Detail |
|---|
public AbstractNullPolicy()
| Method Detail |
|---|
public XMLNullRepresentationType getMarshalNullRepresentation()
enumValue -public void setMarshalNullRepresentation(XMLNullRepresentationType anEnumInstance)
enumValue -
public boolean directMarshal(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
MarshalRecord marshalRecord,
java.lang.Object object,
Session session,
NamespaceResolver namespaceResolver)
xPathFragment -marshalRecord -object -session -namespaceResolver -
public boolean compositeObjectMarshal(org.eclipse.persistence.internal.oxm.XPathFragment xPathFragment,
MarshalRecord marshalRecord,
java.lang.Object object,
Session session,
NamespaceResolver namespaceResolver)
xPathFragment -marshalRecord -object -session -namespaceResolver -
public boolean compositeObjectMarshal(XMLRecord record,
java.lang.Object object,
XMLField field,
org.eclipse.persistence.internal.sessions.AbstractSession session)
record -object -field -public boolean valueIsNull(org.xml.sax.Attributes attributes)
attributes -public boolean valueIsNull(org.w3c.dom.Element element)
public abstract void xPathNode(org.eclipse.persistence.internal.oxm.XPathNode xPathNode,
org.eclipse.persistence.internal.oxm.NullCapableValue nullCapableValue)
xPathNode -nullCapableValue -public boolean getIsSetPerformedForAbsentNode()
public boolean isNullRepresentedByEmptyNode()
public void setNullRepresentedByEmptyNode(boolean bisNullRepresentedByEmptyNode)
bIsNullRepresentedByEmptyNode -public boolean isNullRepresentedByXsiNil()
public void setNullRepresentedByXsiNil(boolean bIsNullRepresentedByXsiNil)
isNullRepresentedByXsiNil -
protected java.lang.String processNamespaceResolverForXSIPrefix(NamespaceResolver namespaceResolver,
MarshalRecord marshalRecord)
namespaceResolver -
public void directMarshal(org.eclipse.persistence.internal.helper.DatabaseField field,
XMLRecord record,
java.lang.Object object)
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||