1 23 package com.sun.enterprise.deployment.node.runtime; 24 25 import java.util.Map ; 26 import org.w3c.dom.Node ; 27 28 import com.sun.enterprise.deployment.node.XMLElement; 29 import com.sun.enterprise.deployment.node.DeploymentDescriptorNode; 30 import com.sun.enterprise.deployment.runtime.IASEjbCMPFinder; 31 import com.sun.enterprise.deployment.xml.RuntimeTagNames; 32 33 public class FinderNode extends DeploymentDescriptorNode { 34 35 private IASEjbCMPFinder descriptor; 36 37 40 public Object getDescriptor() { 41 if (descriptor==null) { 42 descriptor = new IASEjbCMPFinder(); 43 } 44 return descriptor; 45 } 46 47 53 protected Map getDispatchTable() { 54 Map dispatchTable = super.getDispatchTable(); 55 dispatchTable.put(RuntimeTagNames.METHOD_NAME, "setMethodName"); 56 dispatchTable.put(RuntimeTagNames.QUERY_PARAMS, "setQueryParameterDeclaration"); 57 dispatchTable.put(RuntimeTagNames.QUERY_FILTER, "setQueryFilter"); 58 dispatchTable.put(RuntimeTagNames.QUERY_VARIABLES, "setQueryVariables"); 59 dispatchTable.put(RuntimeTagNames.QUERY_ORDERING, "setQueryOrdering"); 60 return dispatchTable; 61 } 62 63 71 public Node writeDescriptor(Node parent, String nodeName, IASEjbCMPFinder finder) { 72 Node finderNode = super.writeDescriptor(parent, nodeName, finder); 73 appendTextChild(finderNode, RuntimeTagNames.METHOD_NAME, finder.getMethodName()); 74 appendTextChild(finderNode, RuntimeTagNames.QUERY_PARAMS, finder.getQueryParameterDeclaration()); 75 appendTextChild(finderNode, RuntimeTagNames.QUERY_FILTER, finder.getQueryFilter()); 76 appendTextChild(finderNode, RuntimeTagNames.QUERY_VARIABLES, finder.getQueryVariables()); 77 appendTextChild(finderNode, RuntimeTagNames.QUERY_ORDERING, finder.getQueryOrdering()); 78 return finderNode; 79 } 80 } 81 | Popular Tags |