FileDocCategorySizeDatePackage
XMLEmbeddedAccessor.javaAPI DocGlassfish v2 API4906Tue May 22 16:54:30 BST 2007oracle.toplink.essentials.internal.ejb.cmp3.xml.accessors

XMLEmbeddedAccessor

public class XMLEmbeddedAccessor extends EmbeddedAccessor
An XML extended embedded relationship accessor.
author
Guy Pelletier
since
TopLink EJB 3.0 Reference Implementation

Fields Summary
protected Node
m_node
protected XMLHelper
m_helper
Constructors Summary
public XMLEmbeddedAccessor(MetadataAccessibleObject accessibleObject, Node node, XMLClassAccessor classAccessor)
INTERNAL:

        super(accessibleObject, classAccessor);
        m_node = node;
        m_helper = classAccessor.getHelper();
    
Methods Summary
protected oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.ClassAccessorprocessAccessor(oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataDescriptor descriptor)
INTERNAL: (Overrride from EmbeddedAccesor) Fast track processing a ClassAccessor for the given descriptor. Inheritance root classes and embeddables may be fast tracked. NOTE: The class passed in may not have any XML representation. If so, pass up to the parent.

        Node node = m_helper.locateEntityNode(descriptor.getJavaClass());
        
        if (node != null) {
            XMLClassAccessor accessor = new XMLClassAccessor(new MetadataClass(descriptor.getJavaClass()), node, m_helper, m_processor, descriptor);
            descriptor.setClassAccessor(accessor);
            accessor.process();
            accessor.setIsProcessed();
            return accessor;
        } else {
            return super.processAccessor(descriptor);
        }
    
protected voidprocessAttributeOverrides(oracle.toplink.essentials.mappings.AggregateObjectMapping mapping)
INTERNAL: (Overrride from EmbeddedAccesor) Currently if the embedded is specified in XML with no attribute overrides, we do NOT search the class for attribute overrides. It is assumed that they are to be defaulted.

        NodeList nodes = m_helper.getNodes(m_node, XMLConstants.ATTRIBUTE_OVERRIDE);
        
    	if (nodes != null) {
    		for (int i = 0; i < nodes.getLength(); i++) {
                processAttributeOverride(mapping, new XMLColumn(nodes.item(i), m_helper, getAnnotatedElement()));
    		}
    	}