1 27 package org.objectweb.jonas_ejb.deployment.rules; 28 29 import org.apache.commons.digester.Digester; 30 import org.objectweb.jonas_lib.deployment.rules.JRuleSetBase; 31 32 37 38 public class JdbcMappingRuleSet extends JRuleSetBase { 39 40 44 public JdbcMappingRuleSet(String prefix) { 45 super(prefix); 46 } 47 51 52 public void addRuleInstances(Digester digester) { 53 digester.addObjectCreate(prefix + "jdbc-mapping", 54 "org.objectweb.jonas_ejb.deployment.xml.JdbcMapping"); 55 digester.addSetNext(prefix + "jdbc-mapping", 56 "setJdbcMapping", 57 "org.objectweb.jonas_ejb.deployment.xml.JdbcMapping"); 58 digester.addCallMethod(prefix + "jdbc-mapping/jndi-name", 59 "setJndiName", 0); 60 digester.addCallMethod(prefix + "jdbc-mapping/jdbc-table-name", 61 "setJdbcTableName", 0); 62 digester.addCallMethod(prefix + "jdbc-mapping/automatic-pk", 63 "setAutomaticPk", 0); 64 digester.addCallMethod(prefix + "jdbc-mapping/automatic-pk-field-name", 65 "setJdbcAutomaticPkFieldName", 0); 66 digester.addRuleSet(new CmpFieldJdbcMappingRuleSet(prefix + "jdbc-mapping/")); 67 digester.addRuleSet(new FinderMethodJdbcMappingRuleSet(prefix + "jdbc-mapping/")); 68 } 69 } 70 | Popular Tags |