FileDocCategorySizeDatePackage
PrefetchDisabledNode.javaAPI DocGlassfish v2 API4871Fri May 04 22:31:42 BST 2007com.sun.enterprise.deployment.node.runtime

PrefetchDisabledNode

public class PrefetchDisabledNode extends com.sun.enterprise.deployment.node.DeploymentDescriptorNode
This node handles the prefetch-disabled runtime deployment descriptors

Fields Summary
protected com.sun.enterprise.deployment.runtime.PrefetchDisabledDescriptor
descriptor
Constructors Summary
public PrefetchDisabledNode()
Creates new PrefetchDisabledNode

    
        
      
        registerElementHandler(new XMLElement(RuntimeTagNames.QUERY_METHOD), MethodNode.class);   
    
Methods Summary
public voidaddDescriptor(java.lang.Object newDescriptor)
Adds a new DOL descriptor instance to the descriptor instance associated with this XMLNode

param
descriptor the new descriptor

        if (newDescriptor instanceof MethodDescriptor) {
            descriptor.addMethodDescriptor(
                (MethodDescriptor) newDescriptor);
        }
    
public java.lang.ObjectgetDescriptor()

return
the descriptor instance to associate with this XMLNode

        if (descriptor==null) {
            descriptor = new PrefetchDisabledDescriptor();
            Object parentDesc = getParentNode().getDescriptor();
            if (parentDesc instanceof EjbDescriptor) {
                descriptor.setEjbDescriptor((EjbDescriptor)parentDesc);
            }
        }
        return descriptor;
    
public org.w3c.dom.NodewriteDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.runtime.PrefetchDisabledDescriptor prefetchDisabledDescriptor)
write the descriptor class to a DOM tree and return it

param
parent node for the DOM tree
param
node name for the descriptor
param
the descriptor to write
return
the DOM tree top node

    
	Node prefetchDisabledNode = super.writeDescriptor(parent, nodeName, 
            prefetchDisabledDescriptor);
        ArrayList methodDescs = 
            prefetchDisabledDescriptor.getConvertedMethodDescs();
        if (!methodDescs.isEmpty()) {
            MethodNode methodNode = new MethodNode();
            for (Iterator methodIterator = methodDescs.iterator();
                methodIterator.hasNext();) {
                MethodDescriptor methodDesc = 
                    (MethodDescriptor) methodIterator.next();
                methodNode.writeQueryMethodDescriptor(prefetchDisabledNode, 
                    RuntimeTagNames.QUERY_METHOD, methodDesc);
            }
        }

	return prefetchDisabledNode;