Class DOMRecord
java.lang.Object
org.eclipse.persistence.internal.core.sessions.CoreAbstractRecord
org.eclipse.persistence.internal.sessions.AbstractRecord
org.eclipse.persistence.oxm.record.XMLRecord
org.eclipse.persistence.oxm.record.DOMRecord
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
,org.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.sessions.AbstractSession,
,org.eclipse.persistence.internal.helper.DatabaseField, XMLMarshaller, NamespaceResolver> org.eclipse.persistence.internal.oxm.record.AbstractUnmarshalRecord<org.eclipse.persistence.internal.sessions.AbstractSession,
,org.eclipse.persistence.internal.helper.DatabaseField, XMLUnmarshaller> org.eclipse.persistence.internal.oxm.record.TransformationRecord
,org.eclipse.persistence.internal.oxm.record.XMLRecord<org.eclipse.persistence.internal.sessions.AbstractSession>
,Record
- Direct Known Subclasses:
EISDOMRecord
public class DOMRecord
extends XMLRecord
implements org.eclipse.persistence.internal.oxm.record.TransformationRecord
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
org.eclipse.persistence.internal.sessions.AbstractRecord.EntrySet, org.eclipse.persistence.internal.sessions.AbstractRecord.KeySet, org.eclipse.persistence.internal.sessions.AbstractRecord.NoEntry, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordEntry, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordEntryIterator, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordKeyIterator, org.eclipse.persistence.internal.sessions.AbstractRecord.RecordValuesIterator, org.eclipse.persistence.internal.sessions.AbstractRecord.ValuesSet
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K extends Object,
V extends Object> Nested classes/interfaces inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord
org.eclipse.persistence.internal.oxm.record.XMLRecord.Nil
-
Field Summary
Fields inherited from class org.eclipse.persistence.oxm.record.XMLRecord
currentObject, equalNamespaceResolvers, hasCustomNamespaceMapper, NIL, session, unmarshaller
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
ConstructorDescriptionINTERNAL: Default constructor.INTERNAL: Create a record with the root element name.INTERNAL: Create a record with the root element name get the namespace URI from the namespaceResolver.DOMRecord
(String rootElementName, NamespaceResolver namespaceResolver) INTERNAL: Create a record with the root element name get the namespace URI from the namespaceResolver.DOMRecord
(String localRootElementName, NamespaceResolver namespaceResolver, Node parent) INTERNAL: Create a record with the local root element name, that is a child of the parent.INTERNAL: Create a record with the local root element name, that is a child of the parent.INTERNAL: Create a record with the element.INTERNAL: Create a record with the element. -
Method Summary
Modifier and TypeMethodDescriptionvoid
INTERNAL: Add the field-value pair to the document.buildNestedRow
(Element element) INTERNAL: Build the nested record, this can be overwriten by subclasses to use their subclass instance.void
clear()
PUBLIC: Clear the sub-nodes of the DOM.clone()
INTERNAL: Clone the row and its values.boolean
PUBLIC: Check if the value is contained in the row.boolean
containsKey
(org.eclipse.persistence.internal.helper.DatabaseField key) INTERNAL: Check if the field is contained in the row.createNewDocument
(String defaultRootElementName) INTERNAL: Creates a new Document and returns the root element of that documentcreateNewDocument
(String defaultRootElementName, String namespaceURI) INTERNAL: Creates a new Document and returns the root element of that documententrySet()
PUBLIC:get
(org.eclipse.persistence.internal.helper.DatabaseField key) INTERNAL: Retrieve the value for the field.PUBLIC: Return the document.getDOM()
PUBLIC: Return the DOM.INTERNAL: This should not be used, but added some support for it as is called from some places such as sdk call used in the descriptor to define operation not supported, may also be called from toplin in some places.getIndicatingNoEntry
(org.eclipse.persistence.internal.helper.DatabaseField key) INTERNAL: Given a DatabaseField return the corresponding value from the documentgetIndicatingNoEntry
(org.eclipse.persistence.internal.helper.DatabaseField key, boolean shouldReturnNode) getIndicatingNoEntry
(org.eclipse.persistence.internal.helper.DatabaseField key, boolean shouldReturnNode, boolean checkForXsiNil) PUBLIC: Get the local name of the context root element.PUBLIC: Get the namespace URI for the context root element.org.eclipse.persistence.internal.oxm.ReferenceResolver
INTERNAL: The ReferenceResolver that is leveraged by key based mappings.INTERNAL: This should not be used, but added some support for it as is called from some places such as sdk call used in the descriptor to define operation not supported, may also be called from TopLink in some places.INTERNAL: Retrieve the value for the field name.getValues
(org.eclipse.persistence.internal.helper.DatabaseField key) INTERNAL: Given a DatabaseField, return the corresponding values from the documentgetValues
(org.eclipse.persistence.internal.helper.DatabaseField key, AbstractNullPolicy nullPolicy) getValuesIndicatingNoEntry
(List<org.eclipse.persistence.internal.helper.DatabaseField> keys) getValuesIndicatingNoEntry
(List<org.eclipse.persistence.internal.helper.DatabaseField> keys, boolean shouldReturnNodes) getValuesIndicatingNoEntry
(org.eclipse.persistence.internal.helper.DatabaseField key) getValuesIndicatingNoEntry
(org.eclipse.persistence.internal.helper.DatabaseField key, boolean shouldReturnNodes) INTERNAL: Given a DatabaseField, return the corresponding values from the documentgetValuesIndicatingNoEntry
(org.eclipse.persistence.internal.helper.DatabaseField key, boolean shouldReturnNodes, AbstractNullPolicy nullPolicy) getValuesIndicatingNoEntry
(org.eclipse.persistence.internal.helper.DatabaseField key, AbstractNullPolicy nullPolicy) keySet()
PUBLIC: Return the set of element names from the DOM.PUBLIC: Add the field-value pair to the row.INTERNAL: Set the field value into the DOM.remove
(org.eclipse.persistence.internal.helper.DatabaseField key) INTERNAL: Remove the field key from the row.void
INTERNAL: replaces the value at index with valueresolveNamespacePrefix
(String prefix) void
resolveReferences
(org.eclipse.persistence.internal.core.sessions.CoreAbstractSession abstractSession, IDResolver idResolver) INTERNAL: If the UnmarshalRecord has a ReferenceResolver, tell it to resolve its references.void
void
INTERNAL: Sets the dom and updated document to be the owner document of the given elementprotected void
INTERNAL: Setting fields vector will not update the document so this is not supportedvoid
setReferenceResolver
(org.eclipse.persistence.internal.oxm.ReferenceResolver referenceResolver) INTERNAL: Set the ReferenceResolver that will be leveraged by key based mappings.void
setSession
(org.eclipse.persistence.internal.sessions.AbstractSession session) protected void
INTERNAL: Setting values vector will not update the document so this is not supportedint
size()
Return the number of elements in the DOM.toString()
INTERNAL: Print the dom XML string.void
transformFromXML
(Reader reader) Set the XML from an XML reader.void
transformFromXML
(String xml) Set the XML from an XML string.void
transformToWriter
(Writer writer) Write the XML string representation of the DOM.Return the XML string representation of the DOM.values()
PUBLIC: Return the collection of element values from the DOM.Methods inherited from class org.eclipse.persistence.oxm.record.XMLRecord
addExtraNamespacesToNamespaceResolver, addXsiTypeAndClassIndicatorIfRequired, addXsiTypeAndClassIndicatorIfRequired, attribute, attributeWithoutQName, convertToXMLField, convertToXMLField, get, getConversionManager, getCurrentObject, getDocPresPolicy, getIndicatingNoEntry, getLeafElementType, getMarshaller, getNamespaceResolver, getNamespaceSeparator, getOwningObject, getSession, getUnmarshaller, hasCustomNamespaceMapper, hasEqualNamespaceResolvers, isNamespaceAware, isXOPPackage, namespaceDeclaration, put, removeExtraNamespacesFromNamespaceResolver, setCurrentObject, setCustomNamespaceMapper, setDocPresPolicy, setEqualNamespaceResolvers, setLeafElementType, setLeafElementType, setMarshaller, setNamespaceResolver, setOwningObject, setUnmarshaller, setXOPPackage, writeXsiTypeAttribute, writeXsiTypeAttribute
Methods inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
containsKey, containsKey, containsValue, elements, get, getField, getLookupField, getSopObject, hasNullValueInFields, hasSopObject, isEmpty, keys, mergeFrom, putAll, remove, remove, replaceAt, resetSize, setNullValueInFields, setSopObject
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
DOMRecord
public DOMRecord()INTERNAL: Default constructor. -
DOMRecord
INTERNAL: Create a record with the root element name. -
DOMRecord
INTERNAL: Create a record with the root element name get the namespace URI from the namespaceResolver. -
DOMRecord
INTERNAL: Create a record with the root element name get the namespace URI from the namespaceResolver. -
DOMRecord
INTERNAL: Create a record with the local root element name, that is a child of the parent. -
DOMRecord
INTERNAL: Create a record with the local root element name, that is a child of the parent. Lookup the namespace URI from the namespaceResolver. -
DOMRecord
INTERNAL: Create a record with the element. -
DOMRecord
-
DOMRecord
INTERNAL: Create a record with the element.
-
-
Method Details
-
getLocalName
PUBLIC: Get the local name of the context root element.- Specified by:
getLocalName
in classXMLRecord
-
getNamespaceURI
PUBLIC: Get the namespace URI for the context root element.- Specified by:
getNamespaceURI
in classXMLRecord
-
getReferenceResolver
public org.eclipse.persistence.internal.oxm.ReferenceResolver getReferenceResolver()INTERNAL: The ReferenceResolver that is leveraged by key based mappings. -
setReferenceResolver
public void setReferenceResolver(org.eclipse.persistence.internal.oxm.ReferenceResolver referenceResolver) INTERNAL: Set the ReferenceResolver that will be leveraged by key based mappings. -
add
INTERNAL: Add the field-value pair to the document.- Overrides:
add
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
clear
public void clear()PUBLIC: Clear the sub-nodes of the DOM. -
clone
INTERNAL: Clone the row and its values.- Overrides:
clone
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
createNewDocument
INTERNAL: Creates a new Document and returns the root element of that document -
createNewDocument
INTERNAL: Creates a new Document and returns the root element of that document -
getDocument
PUBLIC: Return the document.- Specified by:
getDocument
in classXMLRecord
-
containsKey
public boolean containsKey(org.eclipse.persistence.internal.helper.DatabaseField key) INTERNAL: Check if the field is contained in the row.- Overrides:
containsKey
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
contains
PUBLIC: Check if the value is contained in the row. -
get
Description copied from class:XMLRecord
INTERNAL: Retrieve the value for the field. If missing null is returned.- Specified by:
get
in interfaceorg.eclipse.persistence.internal.oxm.record.AbstractUnmarshalRecord<org.eclipse.persistence.internal.sessions.AbstractSession,
org.eclipse.persistence.internal.helper.DatabaseField, XMLUnmarshaller> - Overrides:
get
in classXMLRecord
-
getIndicatingNoEntry
INTERNAL: Given a DatabaseField return the corresponding value from the document- Overrides:
getIndicatingNoEntry
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
getIndicatingNoEntry
public Object getIndicatingNoEntry(org.eclipse.persistence.internal.helper.DatabaseField key, boolean shouldReturnNode) -
getIndicatingNoEntry
public Object getIndicatingNoEntry(org.eclipse.persistence.internal.helper.DatabaseField key, boolean shouldReturnNode, boolean checkForXsiNil) -
getValues
INTERNAL: Retrieve the value for the field name.- Overrides:
getValues
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
getValues
INTERNAL: Given a DatabaseField, return the corresponding values from the document- Overrides:
getValues
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
getValues
public Object getValues(org.eclipse.persistence.internal.helper.DatabaseField key, AbstractNullPolicy nullPolicy) -
getValuesIndicatingNoEntry
-
getValuesIndicatingNoEntry
public Object getValuesIndicatingNoEntry(org.eclipse.persistence.internal.helper.DatabaseField key, AbstractNullPolicy nullPolicy) -
getValuesIndicatingNoEntry
-
getValuesIndicatingNoEntry
-
getValuesIndicatingNoEntry
public Object getValuesIndicatingNoEntry(org.eclipse.persistence.internal.helper.DatabaseField key, boolean shouldReturnNodes) INTERNAL: Given a DatabaseField, return the corresponding values from the document -
getValuesIndicatingNoEntry
public Object getValuesIndicatingNoEntry(org.eclipse.persistence.internal.helper.DatabaseField key, boolean shouldReturnNodes, AbstractNullPolicy nullPolicy) -
buildNestedRow
INTERNAL: Build the nested record, this can be overwriten by subclasses to use their subclass instance. -
getDOM
PUBLIC: Return the DOM.- Specified by:
getDOM
in interfaceorg.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.sessions.AbstractSession,
org.eclipse.persistence.internal.helper.DatabaseField, XMLMarshaller, NamespaceResolver> - Specified by:
getDOM
in classXMLRecord
-
put
INTERNAL: Set the field value into the DOM. The field name must be a valid simple XPath expression.- Specified by:
put
in interfaceorg.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.sessions.AbstractSession,
org.eclipse.persistence.internal.helper.DatabaseField, XMLMarshaller, NamespaceResolver> - Overrides:
put
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
put
-
put
Description copied from class:org.eclipse.persistence.internal.sessions.AbstractRecord
PUBLIC: Add the field-value pair to the row.- Specified by:
put
in interfaceMap
- Specified by:
put
in interfaceorg.eclipse.persistence.internal.oxm.record.TransformationRecord
- Overrides:
put
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
- Throws:
ValidationException
-
remove
INTERNAL: Remove the field key from the row.- Overrides:
remove
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
replaceAt
INTERNAL: replaces the value at index with value- Overrides:
replaceAt
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
entrySet
PUBLIC: -
setFields
INTERNAL: Setting fields vector will not update the document so this is not supported- Overrides:
setFields
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
- Throws:
XMLMarshalException
-
getFields
INTERNAL: This should not be used, but added some support for it as is called from some places such as sdk call used in the descriptor to define operation not supported, may also be called from toplin in some places.- Overrides:
getFields
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
getValues
INTERNAL: This should not be used, but added some support for it as is called from some places such as sdk call used in the descriptor to define operation not supported, may also be called from TopLink in some places.- Overrides:
getValues
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
setValues
INTERNAL: Setting values vector will not update the document so this is not supported- Overrides:
setValues
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
- Throws:
XMLMarshalException
-
setDOM
INTERNAL: Sets the dom and updated document to be the owner document of the given element -
setDOM
-
toString
INTERNAL: Print the dom XML string.- Overrides:
toString
in classorg.eclipse.persistence.internal.sessions.AbstractRecord
-
keySet
PUBLIC: Return the set of element names from the DOM. -
values
PUBLIC: Return the collection of element values from the DOM. -
size
public int size()Return the number of elements in the DOM. -
transformFromXML
Set the XML from an XML string. -
setSession
public void setSession(org.eclipse.persistence.internal.sessions.AbstractSession session) - Specified by:
setSession
in interfaceorg.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.sessions.AbstractSession,
org.eclipse.persistence.internal.helper.DatabaseField, XMLMarshaller, NamespaceResolver> - Overrides:
setSession
in classXMLRecord
-
transformFromXML
Set the XML from an XML reader. -
transformToXML
Return the XML string representation of the DOM.- Specified by:
transformToXML
in classXMLRecord
-
transformToWriter
Write the XML string representation of the DOM. -
resolveNamespacePrefix
- Specified by:
resolveNamespacePrefix
in interfaceorg.eclipse.persistence.internal.oxm.record.AbstractMarshalRecord<org.eclipse.persistence.internal.sessions.AbstractSession,
org.eclipse.persistence.internal.helper.DatabaseField, XMLMarshaller, NamespaceResolver> - Specified by:
resolveNamespacePrefix
in interfaceorg.eclipse.persistence.internal.oxm.record.AbstractUnmarshalRecord<org.eclipse.persistence.internal.sessions.AbstractSession,
org.eclipse.persistence.internal.helper.DatabaseField, XMLUnmarshaller> - Overrides:
resolveNamespacePrefix
in classXMLRecord
-
resolveReferences
public void resolveReferences(org.eclipse.persistence.internal.core.sessions.CoreAbstractSession abstractSession, IDResolver idResolver) INTERNAL: If the UnmarshalRecord has a ReferenceResolver, tell it to resolve its references.
-