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 JonasEjbRelationshipRole extends AbsElement { 38 39 42 private String ejbRelationshipRoleName = null; 43 44 47 private JLinkedList foreignKeyJdbcMappingList = null; 48 49 50 53 public JonasEjbRelationshipRole() { 54 super(); 55 foreignKeyJdbcMappingList = new JLinkedList("foreign-key-jdbc-mapping"); 56 } 57 58 62 public String getEjbRelationshipRoleName() { 63 return ejbRelationshipRoleName; 64 } 65 66 70 public void setEjbRelationshipRoleName(String ejbRelationshipRoleName) { 71 this.ejbRelationshipRoleName = ejbRelationshipRoleName; 72 } 73 74 78 public JLinkedList getForeignKeyJdbcMappingList() { 79 return foreignKeyJdbcMappingList; 80 } 81 82 86 public void setForeignKeyJdbcMappingList(JLinkedList foreignKeyJdbcMappingList) { 87 this.foreignKeyJdbcMappingList = foreignKeyJdbcMappingList; 88 } 89 90 94 public void addForeignKeyJdbcMapping(ForeignKeyJdbcMapping foreignKeyJdbcMapping) { 95 foreignKeyJdbcMappingList.add(foreignKeyJdbcMapping); 96 } 97 98 103 public String toXML(int indent) { 104 StringBuffer sb = new StringBuffer (); 105 sb.append(indent(indent)); 106 sb.append("<jonas-ejb-relationship-role>\n"); 107 108 indent += 2; 109 110 sb.append(xmlElement(ejbRelationshipRoleName, "ejb-relationship-role-name", indent)); 112 sb.append(foreignKeyJdbcMappingList.toXML(indent)); 114 indent -= 2; 115 sb.append(indent(indent)); 116 sb.append("</jonas-ejb-relationship-role>\n"); 117 118 return sb.toString(); 119 } 120 } 121 | Popular Tags |