java.lang.Object
org.eclipse.persistence.internal.core.sessions.CoreAbstractRecord
org.eclipse.persistence.internal.sessions.AbstractRecord
org.eclipse.persistence.oxm.record.XMLRecord
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
,AbstractMarshalRecord<AbstractSession,
,DatabaseField, XMLMarshaller, NamespaceResolver> AbstractUnmarshalRecord<AbstractSession,
,DatabaseField, XMLUnmarshaller> XMLRecord<AbstractSession>
,DataRecord
- Direct Known Subclasses:
DOMRecord
,UnmarshalRecord
public abstract class XMLRecord
extends AbstractRecord
implements AbstractMarshalRecord<AbstractSession,DatabaseField,XMLMarshaller,NamespaceResolver>, AbstractUnmarshalRecord<AbstractSession,DatabaseField,XMLUnmarshaller>
PUBLIC:
Provides a Record/Map API on an XML DOM element.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
AbstractRecord.EntrySet, AbstractRecord.KeySet, AbstractRecord.NoEntry, AbstractRecord.RecordEntry, AbstractRecord.RecordEntryIterator, AbstractRecord.RecordKeyIterator, AbstractRecord.RecordValuesIterator, AbstractRecord.ValuesSet
Nested classes/interfaces inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord
XMLRecord.Nil
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Object
protected boolean
protected boolean
static final XMLRecord.Nil
INTERNAL: Nil: This is used to indicate that this field represents xsi:nil="true"protected AbstractSession
protected XMLUnmarshaller
Fields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
fields, lookupField, noEntry, nullValueInFields, size, sopObject, values
Fields inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord
DEFAULT_ATTRIBUTE_GROUP
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExtraNamespacesToNamespaceResolver
(Descriptor descriptor, CoreAbstractSession session, boolean allowOverride, boolean ignoreEqualResolvers) INTERNALboolean
addXsiTypeAndClassIndicatorIfRequired
(Descriptor descriptor, Descriptor referenceDescriptor, Field xmlField, boolean isRootElement) INTERNALboolean
addXsiTypeAndClassIndicatorIfRequired
(Descriptor descriptor, Descriptor referenceDescriptor, Field xmlField, Object originalObject, Object obj, boolean wasXMLRoot, boolean isRootElement) INTERNALvoid
Marshal an attribute for the give namespaceURI, localName, qualifiedName and valuevoid
attributeWithoutQName
(String namespaceURI, String localName, String prefix, String value) Marshal an attribute for the give namespaceURI, localName, preifx and valueabstract void
clear()
PUBLIC: Clear the sub-nodes of the DOM.boolean
PUBLIC: Check if the value is contained in the row.convertToXMLField
(List<DatabaseField> databaseFields) protected XMLField
convertToXMLField
(DatabaseField databaseField) INTERNAL: Convert a DatabaseField to an XMLFieldPUBLIC: Add the field-value pair to the row.get
(DatabaseField key) INTERNAL: Retrieve the value for the field.INTERNALINTERNAL:abstract Document
PUBLIC: Return the document.abstract Node
getDOM()
PUBLIC: Return the DOM.getIndicatingNoEntry
(String fieldName) INTERNAL: Retrieve the value for the field name.INTERNAL:abstract String
PUBLIC: Get the local name of the context root element.INTERNAL:char
INTERNAL: The character used to separate the prefix and uri portions when namespaces are presentabstract String
PUBLIC: Get the namespace URI for the context root element.INTERNAL:INTERNAL:boolean
boolean
boolean
INTERNAL: Determine if namespaces will be considered during marshal/unmarshal operations.boolean
void
namespaceDeclaration
(String prefix, String namespaceURI) Marshal a namespace declaration for the given prefix and urlPUBLIC: Add the field-value pair to the row.void
removeExtraNamespacesFromNamespaceResolver
(List<Namespace> extraNamespaces, CoreAbstractSession session) INTERNALresolveNamespacePrefix
(String prefix) void
setCurrentObject
(Object obj) INTERNAL:void
setCustomNamespaceMapper
(boolean customNamespaceMapper) void
void
setEqualNamespaceResolvers
(boolean equalNRs) void
setLeafElementType
(QName leafElementType) INTERNAL:void
setLeafElementType
(XPathQName leafElementType) INTERNAL:void
setMarshaller
(XMLMarshaller marshaller) INTERNAL:void
void
setOwningObject
(Object owningObject) INTERNAL:void
setSession
(AbstractSession session) void
setUnmarshaller
(XMLUnmarshaller unmarshaller) INTERNAL:void
setXOPPackage
(boolean isXOPPackage) abstract String
Return the XML string representation of the DOM.void
writeXsiTypeAttribute
(Descriptor descriptor, String typeUri, String typeLocal, String typePrefix, boolean addToNamespaceResolver) INTERNALvoid
writeXsiTypeAttribute
(Descriptor xmlDescriptor, XMLSchemaReference xmlRef, boolean addToNamespaceResolver) INTERNALMethods inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
add, clone, containsKey, containsKey, containsKey, containsValue, elements, entrySet, get, getField, getFields, getIndicatingNoEntry, getLookupField, getSopObject, getValues, getValues, getValues, hasNullValueInFields, hasSopObject, isEmpty, keys, keySet, mergeFrom, put, put, putAll, remove, remove, remove, replaceAt, replaceAt, resetSize, setFields, setNullValueInFields, setSopObject, setValues, size, toString, values
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord
put
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
unmarshaller
-
currentObject
-
session
-
hasCustomNamespaceMapper
protected boolean hasCustomNamespaceMapper -
equalNamespaceResolvers
protected boolean equalNamespaceResolvers -
NIL
INTERNAL: Nil: This is used to indicate that this field represents xsi:nil="true"
-
-
Constructor Details
-
XMLRecord
protected XMLRecord()
-
-
Method Details
-
get
PUBLIC: Add the field-value pair to the row.- Overrides:
get
in classAbstractRecord
-
put
PUBLIC: Add the field-value pair to the row.- Overrides:
put
in classAbstractRecord
-
attributeWithoutQName
public void attributeWithoutQName(String namespaceURI, String localName, String prefix, String value) Marshal an attribute for the give namespaceURI, localName, preifx and value- Specified by:
attributeWithoutQName
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
attribute
Marshal an attribute for the give namespaceURI, localName, qualifiedName and value- Specified by:
attribute
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
namespaceDeclaration
Marshal a namespace declaration for the given prefix and url- Specified by:
namespaceDeclaration
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
getLocalName
PUBLIC: Get the local name of the context root element. -
getNamespaceURI
PUBLIC: Get the namespace URI for the context root element. -
clear
public abstract void clear()PUBLIC: Clear the sub-nodes of the DOM.- Specified by:
clear
in interfaceMap
- Overrides:
clear
in classAbstractRecord
-
getDocument
PUBLIC: Return the document. -
contains
PUBLIC: Check if the value is contained in the row.- Overrides:
contains
in classAbstractRecord
-
getDOM
PUBLIC: Return the DOM.- Specified by:
getDOM
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
transformToXML
Return the XML string representation of the DOM. -
convertToXMLField
INTERNAL: Convert a DatabaseField to an XMLField -
convertToXMLField
-
get
INTERNAL: Retrieve the value for the field. If missing null is returned.- Specified by:
get
in interfaceAbstractUnmarshalRecord<AbstractSession,
DatabaseField, XMLUnmarshaller> - Overrides:
get
in classAbstractRecord
-
getIndicatingNoEntry
INTERNAL: Retrieve the value for the field name.- Overrides:
getIndicatingNoEntry
in classAbstractRecord
-
resolveNamespacePrefix
- Specified by:
resolveNamespacePrefix
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver> - Specified by:
resolveNamespacePrefix
in interfaceAbstractUnmarshalRecord<AbstractSession,
DatabaseField, XMLUnmarshaller>
-
getMarshaller
INTERNAL:- Specified by:
getMarshaller
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
setMarshaller
INTERNAL:- Specified by:
setMarshaller
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
getUnmarshaller
INTERNAL:- Specified by:
getUnmarshaller
in interfaceAbstractUnmarshalRecord<AbstractSession,
DatabaseField, XMLUnmarshaller>
-
setUnmarshaller
INTERNAL: -
setDocPresPolicy
-
getDocPresPolicy
-
getOwningObject
INTERNAL:- Specified by:
getOwningObject
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
setOwningObject
INTERNAL:- Specified by:
setOwningObject
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
getCurrentObject
INTERNAL: -
setCurrentObject
INTERNAL: -
getLeafElementType
INTERNAL:- Specified by:
getLeafElementType
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
setLeafElementType
INTERNAL:- Specified by:
setLeafElementType
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
setLeafElementType
INTERNAL:- Specified by:
setLeafElementType
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
setNamespaceResolver
- Specified by:
setNamespaceResolver
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
getNamespaceResolver
- Specified by:
getNamespaceResolver
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
getSession
- Specified by:
getSession
in interfaceXMLRecord<AbstractSession>
-
setSession
- Specified by:
setSession
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
setEqualNamespaceResolvers
public void setEqualNamespaceResolvers(boolean equalNRs) - Specified by:
setEqualNamespaceResolvers
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
hasEqualNamespaceResolvers
public boolean hasEqualNamespaceResolvers()- Specified by:
hasEqualNamespaceResolvers
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
isXOPPackage
public boolean isXOPPackage()- Specified by:
isXOPPackage
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
setXOPPackage
public void setXOPPackage(boolean isXOPPackage) - Specified by:
setXOPPackage
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
isNamespaceAware
public boolean isNamespaceAware()INTERNAL: Determine if namespaces will be considered during marshal/unmarshal operations.- Specified by:
isNamespaceAware
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver> - Specified by:
isNamespaceAware
in interfaceXMLRecord<AbstractSession>
- Since:
- 2.4
-
getNamespaceSeparator
public char getNamespaceSeparator()INTERNAL: The character used to separate the prefix and uri portions when namespaces are present- Specified by:
getNamespaceSeparator
in interfaceXMLRecord<AbstractSession>
- Since:
- 2.4
-
hasCustomNamespaceMapper
public boolean hasCustomNamespaceMapper()- Specified by:
hasCustomNamespaceMapper
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
setCustomNamespaceMapper
public void setCustomNamespaceMapper(boolean customNamespaceMapper) - Specified by:
setCustomNamespaceMapper
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver>
-
addExtraNamespacesToNamespaceResolver
public List<Namespace> addExtraNamespacesToNamespaceResolver(Descriptor descriptor, CoreAbstractSession session, boolean allowOverride, boolean ignoreEqualResolvers) INTERNAL- Specified by:
addExtraNamespacesToNamespaceResolver
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver> - Since:
- EclipseLink 2.5.0
-
addXsiTypeAndClassIndicatorIfRequired
public boolean addXsiTypeAndClassIndicatorIfRequired(Descriptor descriptor, Descriptor referenceDescriptor, Field xmlField, boolean isRootElement) INTERNAL- Specified by:
addXsiTypeAndClassIndicatorIfRequired
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver> - Since:
- EclipseLink 2.5.0
-
addXsiTypeAndClassIndicatorIfRequired
public boolean addXsiTypeAndClassIndicatorIfRequired(Descriptor descriptor, Descriptor referenceDescriptor, Field xmlField, Object originalObject, Object obj, boolean wasXMLRoot, boolean isRootElement) INTERNAL- Specified by:
addXsiTypeAndClassIndicatorIfRequired
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver> - Since:
- EclipseLink 2.5.0
-
removeExtraNamespacesFromNamespaceResolver
public void removeExtraNamespacesFromNamespaceResolver(List<Namespace> extraNamespaces, CoreAbstractSession session) INTERNAL- Specified by:
removeExtraNamespacesFromNamespaceResolver
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver> - Since:
- EclipseLink 2.5.0
-
writeXsiTypeAttribute
public void writeXsiTypeAttribute(Descriptor descriptor, String typeUri, String typeLocal, String typePrefix, boolean addToNamespaceResolver) INTERNAL- Specified by:
writeXsiTypeAttribute
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver> - Since:
- EclipseLink 2.5.0
-
writeXsiTypeAttribute
public void writeXsiTypeAttribute(Descriptor xmlDescriptor, XMLSchemaReference xmlRef, boolean addToNamespaceResolver) INTERNAL- Specified by:
writeXsiTypeAttribute
in interfaceAbstractMarshalRecord<AbstractSession,
DatabaseField, XMLMarshaller, NamespaceResolver> - Since:
- EclipseLink 2.5.0
-
getConversionManager
INTERNAL- Specified by:
getConversionManager
in interfaceXMLRecord<AbstractSession>
- Since:
- EclipseLink 2.6.0
-