org.eclipse.persistence.oxm.record
Class XMLRootRecord

java.lang.Object
  extended by org.eclipse.persistence.internal.sessions.AbstractRecord
      extended by org.eclipse.persistence.oxm.record.XMLRecord
          extended by org.eclipse.persistence.oxm.record.UnmarshalRecord
              extended by org.eclipse.persistence.oxm.record.XMLRootRecord
All Implemented Interfaces:
Serializable, Cloneable, Map, Record, ContentHandler, LexicalHandler

public class XMLRootRecord
extends UnmarshalRecord

Record for handling simple root elements that have a single text child node, and are being unmarshalled to a primitive wrapper object. The characters method will be used to gather the text to be converted.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
org.eclipse.persistence.internal.sessions.AbstractRecord.NoEntry
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.eclipse.persistence.oxm.record.UnmarshalRecord
DEFAULT_UNMAPPED_CONTENT_HANDLER
 
Fields inherited from class org.eclipse.persistence.oxm.record.XMLRecord
NIL
 
Fields inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
noEntry
 
Constructor Summary
XMLRootRecord(Class cls)
          Default constructor.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(String namespaceURI, String localName, String qName)
           
 Object getCurrentObject()
          Return a populated XMLRoot object.
 void initializeRecord(XMLMapping selfRecordMapping)
           
 void startDocument()
           
 void startElement(String namespaceURI, String localName, String qName, Attributes atts)
           
 
Methods inherited from class org.eclipse.persistence.oxm.record.UnmarshalRecord
addAttributeValue, addAttributeValue, clear, comment, endCDATA, endDTD, endEntity, endPrefixMapping, get, getAttributeChildNodeValue, getAttributes, getChildRecord, getChildUnmarshalRecord, getContainerInstance, getDescriptor, getDocument, getDOM, getEncoding, getFragmentBuilder, getLevelIndex, getLocalName, getNamespaceURI, getNoNamespaceSchemaLocation, getNullCapableValues, getParentRecord, getRootElementName, getRootElementNamespaceUri, getSchemaLocation, getSelfNodeValueForAttribute, getStringBuffer, getTransformationRecord, getTypeQName, getUnmarshalContext, getUnmarshalNamespaceResolver, getVersion, getXMLReader, getXPathNode, ignorableWhitespace, isBufferCDATA, isNil, isSelfRecord, processingInstruction, reference, removeNullCapableValue, resetStringBuffer, resolveNamespacePrefix, resolveNamespaceUri, setAttributes, setAttributeValue, setChildRecord, setDocumentLocator, setEncoding, setFragmentBuilder, setLocalName, setNil, setNoNamespaceSchemaLocation, setParentRecord, setRootElementName, setRootElementNamespaceUri, setSchemaLocation, setSelfRecord, setTransformationRecord, setTypeQName, setUnmarshalContext, setUnmarshalNamespaceResolver, setVersion, setXMLReader, skippedEntity, startCDATA, startDTD, startEntity, startPrefixMapping, startUnmappedElement, toString, transformToXML, unmappedContent
 
Methods inherited from class org.eclipse.persistence.oxm.record.XMLRecord
contains, getDocPresPolicy, getIndicatingNoEntry, getLeafElementType, getMarshaller, getNamespaceResolver, getOwningObject, getSession, getUnmarshaller, isXOPPackage, setCurrentObject, setDocPresPolicy, setLeafElementType, setMarshaller, setNamespaceResolver, setOwningObject, setSession, setUnmarshaller, setXOPPackage
 
Methods inherited from class org.eclipse.persistence.internal.sessions.AbstractRecord
add, clone, containsKey, containsKey, containsKey, containsValue, elements, entrySet, get, get, getField, getFields, getIndicatingNoEntry, getValues, getValues, getValues, isEmpty, keys, keySet, mergeFrom, put, put, put, putAll, remove, remove, remove, replaceAt, size, values
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

XMLRootRecord

public XMLRootRecord(Class cls)
Default constructor.

Method Detail

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
Overrides:
characters in class UnmarshalRecord
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Overrides:
endDocument in class UnmarshalRecord
Throws:
SAXException

endElement

public void endElement(String namespaceURI,
                       String localName,
                       String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class UnmarshalRecord
Throws:
SAXException

getCurrentObject

public Object getCurrentObject()
Return a populated XMLRoot object.

Overrides:
getCurrentObject in class XMLRecord

startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Overrides:
startDocument in class UnmarshalRecord
Throws:
SAXException

initializeRecord

public void initializeRecord(XMLMapping selfRecordMapping)
                      throws SAXException
Overrides:
initializeRecord in class UnmarshalRecord
Throws:
SAXException

startElement

public void startElement(String namespaceURI,
                         String localName,
                         String qName,
                         Attributes atts)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class UnmarshalRecord
Throws:
SAXException