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

XMLOneToManyAccessor

public class XMLOneToManyAccessor extends OneToManyAccessor
A OneToMany 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 XMLOneToManyAccessor(MetadataAccessibleObject accessibleObject, Node node, XMLClassAccessor classAccessor)
INTERNAL:

        super(accessibleObject, classAccessor);
        m_node = node;
        m_helper = classAccessor.getHelper();
    
Methods Summary
public java.util.ListgetCascadeTypes()
INTERNAL: (Override from OneToManyAccessor)

        return m_helper.getCascadeTypes(m_node);
    
public java.lang.StringgetFetchType()
INTERNAL: (Override from OneToManyAccessor)

        return m_helper.getFetchTypeDefaultLAZY(m_node);
    
public oracle.toplink.essentials.internal.ejb.cmp3.metadata.tables.MetadataJoinTablegetJoinTable()
INTERNAL: (Override from CollectionAccessor)

        Node node = m_helper.getNode(m_node, XMLConstants.JOIN_TABLE);
        
        if (node == null) {
            return super.getJoinTable();
        } else {
            return new XMLJoinTable(node, m_helper, m_logger);
        }
    
public java.lang.StringgetMapKey()
INTERNAL: (Override from CollectionAccessor) Checks for a map-key node and returns its value if there is one. Otherwise, ask the parent to look for an annotation.

 
        Node mapKeyNode = m_helper.getNode(m_node, XMLConstants.MAPKEY);
        String mapKeyValue = m_helper.getNodeValue(mapKeyNode, XMLConstants.ATT_NAME);
        
        if (mapKeyNode == null) {
            return super.getMapKey();
        } else {
            return mapKeyValue;
        }
    
public java.lang.StringgetMappedBy()
INTERNAL: (Override from OneToManyAccessor)

        return m_helper.getMappedBy(m_node);
    
public java.lang.StringgetOrderBy()
INTERNAL: (Override from CollectionAccessor) If the order value is not specified, look for one on an annotation.

        if (hasOrderBy()) {
            return m_helper.getNodeTextValue(m_node, XMLConstants.ORDER_BY);
        } else {
            return super.getOrderBy();
        }
    
public java.lang.ClassgetTargetEntity()
INTERNAL: (Override from OneToManyAccessor)

        return m_helper.getTargetEntity(m_node);
    
public booleanhasOrderBy()
INTERNAL: (Override from CollectionAccessor) Checks for an order-by node. If one isn't found, as the parent to look for an annotation.

		Node orderByNode = m_helper.getNode(m_node, XMLConstants.ORDER_BY);
        
        if (orderByNode == null) {
            return super.hasOrderBy();
        } else {
            return true;
        }