1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 import org.objectweb.jonas_lib.deployment.xml.JLinkedList; 31 36 37 public class JonasEjbRelation extends AbsElement { 38 39 42 private String ejbRelationName = null; 43 44 47 private String jdbcTableName = null; 48 49 52 private JLinkedList jonasEjbRelationshipRoleList = null; 53 54 55 58 public JonasEjbRelation() { 59 super(); 60 jonasEjbRelationshipRoleList = new JLinkedList("jonas-ejb-relationship-role"); 61 } 62 63 67 public String getEjbRelationName() { 68 return ejbRelationName; 69 } 70 71 75 public void setEjbRelationName(String ejbRelationName) { 76 this.ejbRelationName = ejbRelationName; 77 } 78 79 83 public String getJdbcTableName() { 84 return jdbcTableName; 85 } 86 87 91 public void setJdbcTableName(String jdbcTableName) { 92 this.jdbcTableName = jdbcTableName; 93 } 94 95 99 public JLinkedList getJonasEjbRelationshipRoleList() { 100 return jonasEjbRelationshipRoleList; 101 } 102 103 107 public void setJonasEjbRelationshipRoleList(JLinkedList jonasEjbRelationshipRoleList) { 108 this.jonasEjbRelationshipRoleList = jonasEjbRelationshipRoleList; 109 } 110 111 115 public void addJonasEjbRelationshipRole(JonasEjbRelationshipRole jonasEjbRelationshipRole) { 116 jonasEjbRelationshipRoleList.add(jonasEjbRelationshipRole); 117 } 118 119 124 public String toXML(int indent) { 125 StringBuffer sb = new StringBuffer (); 126 sb.append(indent(indent)); 127 sb.append("<jonas-ejb-relation>\n"); 128 129 indent += 2; 130 131 sb.append(xmlElement(ejbRelationName, "ejb-relation-name", indent)); 133 sb.append(xmlElement(jdbcTableName, "jdbc-table-name", indent)); 135 sb.append(jonasEjbRelationshipRoleList.toXML(indent)); 137 indent -= 2; 138 sb.append(indent(indent)); 139 sb.append("</jonas-ejb-relation>\n"); 140 141 return sb.toString(); 142 } 143 } 144 | Popular Tags |