Class DOMRecord

    • Constructor Detail

      • DOMRecord

        public DOMRecord()
        INTERNAL: Default constructor.
      • DOMRecord

        public DOMRecord​(java.lang.String rootElementName)
        INTERNAL: Create a record with the root element name.
      • DOMRecord

        public DOMRecord​(java.lang.String rootElementName,
                         NamespaceResolver namespaceResolver)
        INTERNAL: Create a record with the root element name get the namespace URI from the namespaceResolver.
      • DOMRecord

        public DOMRecord​(java.lang.String rootElementName,
                         java.lang.String rootElementNamespaceURI)
        INTERNAL: Create a record with the root element name get the namespace URI from the namespaceResolver.
      • DOMRecord

        public DOMRecord​(java.lang.String localRootElementName,
                         org.w3c.dom.Node parent)
        INTERNAL: Create a record with the local root element name, that is a child of the parent.
      • DOMRecord

        public DOMRecord​(java.lang.String localRootElementName,
                         NamespaceResolver namespaceResolver,
                         org.w3c.dom.Node parent)
        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

        public DOMRecord​(org.w3c.dom.Element element)
        INTERNAL: Create a record with the element.
      • DOMRecord

        public DOMRecord​(org.w3c.dom.Node node)
      • DOMRecord

        public DOMRecord​(org.w3c.dom.Document document)
        INTERNAL: Create a record with the element.
    • Method Detail

      • getLocalName

        public java.lang.String getLocalName()
        PUBLIC: Get the local name of the context root element.
        Specified by:
        getLocalName in class XMLRecord
      • getNamespaceURI

        public java.lang.String getNamespaceURI()
        PUBLIC: Get the namespace URI for the context root element.
        Specified by:
        getNamespaceURI in class XMLRecord
      • getReferenceResolver

        public ReferenceResolver getReferenceResolver()
        INTERNAL: The ReferenceResolver that is leveraged by key based mappings.
        Since:
        EclipseLink 2.5.0
      • setReferenceResolver

        public void setReferenceResolver​(ReferenceResolver referenceResolver)
        INTERNAL: Set the ReferenceResolver that will be leveraged by key based mappings.
        Since:
        EclipseLink 2.5.0
      • add

        public void add​(DatabaseField key,
                        java.lang.Object value)
        INTERNAL: Add the field-value pair to the document.
        Overrides:
        add in class AbstractRecord
      • clear

        public void clear()
        PUBLIC: Clear the sub-nodes of the DOM.
        Specified by:
        clear in interface java.util.Map
        Specified by:
        clear in class XMLRecord
      • createNewDocument

        public org.w3c.dom.Node createNewDocument​(java.lang.String defaultRootElementName)
        INTERNAL: Creates a new Document and returns the root element of that document
      • createNewDocument

        public org.w3c.dom.Node createNewDocument​(java.lang.String defaultRootElementName,
                                                  java.lang.String namespaceURI)
        INTERNAL: Creates a new Document and returns the root element of that document
      • getDocument

        public org.w3c.dom.Document getDocument()
        PUBLIC: Return the document.
        Specified by:
        getDocument in class XMLRecord
      • contains

        public boolean contains​(java.lang.Object value)
        PUBLIC: Check if the value is contained in the row.
        Overrides:
        contains in class XMLRecord
      • getIndicatingNoEntry

        public java.lang.Object getIndicatingNoEntry​(DatabaseField key,
                                                     boolean shouldReturnNode)
      • getIndicatingNoEntry

        public java.lang.Object getIndicatingNoEntry​(DatabaseField key,
                                                     boolean shouldReturnNode,
                                                     boolean checkForXsiNil)
      • getValues

        public java.lang.Object getValues​(java.lang.String key)
        INTERNAL: Retrieve the value for the field name.
        Overrides:
        getValues in class AbstractRecord
      • getValues

        public java.lang.Object getValues​(DatabaseField key)
        INTERNAL: Given a DatabaseField, return the corresponding values from the document
        Overrides:
        getValues in class AbstractRecord
      • getValuesIndicatingNoEntry

        public java.lang.Object getValuesIndicatingNoEntry​(DatabaseField key)
      • getValuesIndicatingNoEntry

        public java.util.List<XMLEntry> getValuesIndicatingNoEntry​(java.util.List<DatabaseField> keys)
      • getValuesIndicatingNoEntry

        public java.util.List<XMLEntry> getValuesIndicatingNoEntry​(java.util.List<DatabaseField> keys,
                                                                   boolean shouldReturnNodes)
      • getValuesIndicatingNoEntry

        public java.lang.Object getValuesIndicatingNoEntry​(DatabaseField key,
                                                           boolean shouldReturnNodes)
        INTERNAL: Given a DatabaseField, return the corresponding values from the document
      • getValuesIndicatingNoEntry

        public java.lang.Object getValuesIndicatingNoEntry​(DatabaseField key,
                                                           boolean shouldReturnNodes,
                                                           AbstractNullPolicy nullPolicy)
      • buildNestedRow

        public XMLRecord buildNestedRow​(org.w3c.dom.Element element)
        INTERNAL: Build the nested record, this can be overwriten by subclasses to use their subclass instance.
      • put

        public java.lang.Object put​(java.util.List<XMLField> xmlFields,
                                    java.util.List<XMLEntry> values)
      • replaceAt

        public void replaceAt​(java.lang.Object value,
                              int index)
        INTERNAL: replaces the value at index with value
        Overrides:
        replaceAt in class AbstractRecord
      • entrySet

        public java.util.Set entrySet()
        PUBLIC:
        Specified by:
        entrySet in interface java.util.Map
        Overrides:
        entrySet in class AbstractRecord
      • getFields

        public java.util.Vector 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 class AbstractRecord
      • getValues

        public java.util.Vector 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 class AbstractRecord
      • setDOM

        public void setDOM​(org.w3c.dom.Node element)
        INTERNAL: Sets the dom and updated document to be the owner document of the given element
      • setDOM

        public void setDOM​(org.w3c.dom.Element element)
      • toString

        public java.lang.String toString()
        INTERNAL: Print the dom XML string.
        Overrides:
        toString in class AbstractRecord
      • keySet

        public java.util.Set keySet()
        PUBLIC: Return the set of element names from the DOM.
        Specified by:
        keySet in interface java.util.Map
        Overrides:
        keySet in class AbstractRecord
      • values

        public java.util.Collection values()
        PUBLIC: Return the collection of element values from the DOM.
        Specified by:
        values in interface java.util.Map
        Overrides:
        values in class AbstractRecord
      • size

        public int size()
        Return the number of elements in the DOM.
        Specified by:
        size in interface java.util.Map
        Overrides:
        size in class AbstractRecord
      • transformFromXML

        public void transformFromXML​(java.lang.String xml)
        Set the XML from an XML string.
      • transformFromXML

        public void transformFromXML​(java.io.Reader reader)
        Set the XML from an XML reader.
      • transformToXML

        public java.lang.String transformToXML()
        Return the XML string representation of the DOM.
        Specified by:
        transformToXML in class XMLRecord
      • transformToWriter

        public void transformToWriter​(java.io.Writer writer)
        Write the XML string representation of the DOM.
      • resolveReferences

        public void resolveReferences​(CoreAbstractSession abstractSession,
                                      IDResolver idResolver)
        INTERNAL: If the UnmarshalRecord has a ReferenceResolver, tell it to resolve its references.
        Since:
        EclipseLink 2.5.0