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,AbstractMarshalRecord<AbstractSession,,DatabaseField, XMLMarshaller, NamespaceResolver> AbstractUnmarshalRecord<AbstractSession,,DatabaseField, XMLUnmarshaller> TransformationRecord,XMLRecord<AbstractSession>,DataRecord
- Direct Known Subclasses:
EISDOMRecord,XMLTransformationRecord
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.ValuesSetNested classes/interfaces inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord
XMLRecord.Nil -
Field Summary
Fields inherited from class org.eclipse.persistence.oxm.record.XMLRecord
currentObject, equalNamespaceResolvers, hasCustomNamespaceMapper, NIL, session, unmarshallerFields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
fields, lookupField, noEntry, nullValueInFields, size, sopObject, valuesFields inherited from interface org.eclipse.persistence.internal.oxm.record.XMLRecord
DEFAULT_ATTRIBUTE_GROUP -
Constructor Summary
ConstructorsConstructorDescriptionINTERNAL: 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 TypeMethodDescriptionvoidadd(DatabaseField key, Object value) 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.voidclear()PUBLIC: Clear the sub-nodes of the DOM.clone()INTERNAL: Clone the row and its values.booleanPUBLIC: Check if the value is contained in the row.booleancontainsKey(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(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.INTERNAL: Given a DatabaseField return the corresponding value from the documentgetIndicatingNoEntry(DatabaseField key, boolean shouldReturnNode) getIndicatingNoEntry(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.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(DatabaseField key) INTERNAL: Given a DatabaseField, return the corresponding values from the documentgetValues(DatabaseField key, AbstractNullPolicy nullPolicy) getValuesIndicatingNoEntry(List<DatabaseField> keys, boolean shouldReturnNodes) getValuesIndicatingNoEntry(DatabaseField key, boolean shouldReturnNodes) INTERNAL: Given a DatabaseField, return the corresponding values from the documentgetValuesIndicatingNoEntry(DatabaseField key, boolean shouldReturnNodes, AbstractNullPolicy nullPolicy) getValuesIndicatingNoEntry(DatabaseField key, AbstractNullPolicy nullPolicy) keySet()PUBLIC: Return the set of element names from the DOM.PUBLIC: Add the field-value pair to the row.put(DatabaseField key, Object value) INTERNAL: Set the field value into the DOM.remove(DatabaseField key) INTERNAL: Remove the field key from the row.voidINTERNAL: replaces the value at index with valueresolveNamespacePrefix(String prefix) voidresolveReferences(CoreAbstractSession abstractSession, IDResolver idResolver) INTERNAL: If the UnmarshalRecord has a ReferenceResolver, tell it to resolve its references.voidvoidINTERNAL: Sets the dom and updated document to be the owner document of the given elementprotected voidINTERNAL: Setting fields vector will not update the document so this is not supportedvoidsetReferenceResolver(ReferenceResolver referenceResolver) INTERNAL: Set the ReferenceResolver that will be leveraged by key based mappings.voidsetSession(AbstractSession session) protected voidINTERNAL: Setting values vector will not update the document so this is not supportedintsize()Return the number of elements in the DOM.toString()INTERNAL: Print the dom XML string.voidtransformFromXML(Reader reader) Set the XML from an XML reader.voidtransformFromXML(String xml) Set the XML from an XML string.voidtransformToWriter(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, writeXsiTypeAttributeMethods 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, setSopObjectMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getLocalNamein classXMLRecord
-
getNamespaceURI
PUBLIC: Get the namespace URI for the context root element.- Specified by:
getNamespaceURIin classXMLRecord
-
getReferenceResolver
INTERNAL: The ReferenceResolver that is leveraged by key based mappings.- Since:
- EclipseLink 2.5.0
-
setReferenceResolver
INTERNAL: Set the ReferenceResolver that will be leveraged by key based mappings.- Since:
- EclipseLink 2.5.0
-
add
INTERNAL: Add the field-value pair to the document.- Overrides:
addin classAbstractRecord
-
clear
public void clear()PUBLIC: Clear the sub-nodes of the DOM. -
clone
INTERNAL: Clone the row and its values.- Overrides:
clonein classAbstractRecord
-
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:
getDocumentin classXMLRecord
-
containsKey
INTERNAL: Check if the field is contained in the row.- Overrides:
containsKeyin classAbstractRecord
-
contains
PUBLIC: Check if the value is contained in the row. -
get
Description copied from class:XMLRecordINTERNAL: Retrieve the value for the field. If missing null is returned.- Specified by:
getin interfaceAbstractUnmarshalRecord<AbstractSession,DatabaseField, XMLUnmarshaller> - Overrides:
getin classXMLRecord
-
getIndicatingNoEntry
INTERNAL: Given a DatabaseField return the corresponding value from the document- Overrides:
getIndicatingNoEntryin classAbstractRecord
-
getIndicatingNoEntry
-
getIndicatingNoEntry
public Object getIndicatingNoEntry(DatabaseField key, boolean shouldReturnNode, boolean checkForXsiNil) -
getValues
INTERNAL: Retrieve the value for the field name.- Overrides:
getValuesin classAbstractRecord
-
getValues
INTERNAL: Given a DatabaseField, return the corresponding values from the document- Overrides:
getValuesin classAbstractRecord
-
getValues
-
getValuesIndicatingNoEntry
-
getValuesIndicatingNoEntry
-
getValuesIndicatingNoEntry
-
getValuesIndicatingNoEntry
public List<XMLEntry> getValuesIndicatingNoEntry(List<DatabaseField> keys, boolean shouldReturnNodes) -
getValuesIndicatingNoEntry
INTERNAL: Given a DatabaseField, return the corresponding values from the document -
getValuesIndicatingNoEntry
public Object getValuesIndicatingNoEntry(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:
getDOMin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField, XMLMarshaller, NamespaceResolver> - Specified by:
getDOMin classXMLRecord
-
put
INTERNAL: Set the field value into the DOM. The field name must be a valid simple XPath expression.- Specified by:
putin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField, XMLMarshaller, NamespaceResolver> - Overrides:
putin classAbstractRecord
-
put
-
put
Description copied from class:AbstractRecordPUBLIC: Add the field-value pair to the row.- Specified by:
putin interfaceMap- Specified by:
putin interfaceTransformationRecord- Overrides:
putin classAbstractRecord- Throws:
ValidationException
-
remove
INTERNAL: Remove the field key from the row.- Overrides:
removein classAbstractRecord
-
replaceAt
INTERNAL: replaces the value at index with value- Overrides:
replaceAtin classAbstractRecord
-
entrySet
PUBLIC:- Specified by:
entrySetin interfaceMap- Overrides:
entrySetin classAbstractRecord
-
setFields
INTERNAL: Setting fields vector will not update the document so this is not supported- Overrides:
setFieldsin classAbstractRecord- 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:
getFieldsin classAbstractRecord
-
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:
getValuesin classAbstractRecord
-
setValues
INTERNAL: Setting values vector will not update the document so this is not supported- Overrides:
setValuesin classAbstractRecord- 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:
toStringin classAbstractRecord
-
keySet
PUBLIC: Return the set of element names from the DOM.- Specified by:
keySetin interfaceMap- Overrides:
keySetin classAbstractRecord
-
values
PUBLIC: Return the collection of element values from the DOM.- Specified by:
valuesin interfaceMap- Overrides:
valuesin classAbstractRecord
-
size
public int size()Return the number of elements in the DOM.- Specified by:
sizein interfaceMap- Overrides:
sizein classAbstractRecord
-
transformFromXML
Set the XML from an XML string. -
setSession
- Specified by:
setSessionin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField, XMLMarshaller, NamespaceResolver> - Overrides:
setSessionin classXMLRecord
-
transformFromXML
Set the XML from an XML reader. -
transformToXML
Return the XML string representation of the DOM.- Specified by:
transformToXMLin classXMLRecord
-
transformToWriter
Write the XML string representation of the DOM. -
resolveNamespacePrefix
- Specified by:
resolveNamespacePrefixin interfaceAbstractMarshalRecord<AbstractSession,DatabaseField, XMLMarshaller, NamespaceResolver> - Specified by:
resolveNamespacePrefixin interfaceAbstractUnmarshalRecord<AbstractSession,DatabaseField, XMLUnmarshaller> - Overrides:
resolveNamespacePrefixin classXMLRecord
-
resolveReferences
INTERNAL: If the UnmarshalRecord has a ReferenceResolver, tell it to resolve its references.- Since:
- EclipseLink 2.5.0
-