1 23 package com.sun.enterprise.deployment.node.runtime; 24 25 import java.util.Map ; 26 import java.util.HashMap ; 27 import org.w3c.dom.Node ; 28 29 import com.sun.enterprise.deployment.node.XMLElement; 30 import com.sun.enterprise.deployment.runtime.IASPersistenceManagerDescriptor; 31 import com.sun.enterprise.deployment.xml.RuntimeTagNames; 32 33 39 40 public class PMDescriptorNode extends RuntimeDescriptorNode { 41 42 48 protected Map getDispatchTable() { 49 Map table = new HashMap (); 50 table.put(RuntimeTagNames.PM_IDENTIFIER, "setPersistenceManagerIdentifier"); 51 table.put(RuntimeTagNames.PM_VERSION, "setPersistenceManagerVersion"); 52 table.put(RuntimeTagNames.PM_CONFIG, "setPersistenceManagerConfig"); 53 table.put(RuntimeTagNames.PM_CLASS_GENERATOR, "setPersistenceManagerClassGenerator"); 54 table.put(RuntimeTagNames.PM_MAPPING_FACTORY, "setPersistenceManagerMappingFactory"); 55 return table; 56 } 57 58 66 public Node writeDescriptor(Node parent, String nodeName, IASPersistenceManagerDescriptor descriptor) { 67 Node pd = super.writeDescriptor(parent, nodeName, descriptor); 68 appendTextChild(pd, RuntimeTagNames.PM_IDENTIFIER, descriptor.getPersistenceManagerIdentifier()); 69 appendTextChild(pd, RuntimeTagNames.PM_VERSION, descriptor.getPersistenceManagerVersion()); 70 appendTextChild(pd, RuntimeTagNames.PM_CONFIG, descriptor.getPersistenceManagerConfig()); 71 appendTextChild(pd, RuntimeTagNames.PM_CLASS_GENERATOR, descriptor.getPersistenceManagerClassGenerator()); 72 appendTextChild(pd, RuntimeTagNames.PM_MAPPING_FACTORY, descriptor.getPersistenceManagerMappingFactory()); 73 return pd; 74 } 75 } 76 | Popular Tags |