1 27 package org.objectweb.jonas_ejb.deployment.xml; 28 29 import org.objectweb.jonas_lib.deployment.xml.AbsElement; 30 35 36 public class CmpFieldJdbcMapping extends AbsElement { 37 38 41 private String fieldName = null; 42 43 46 private String jdbcFieldName = null; 47 48 51 private String sqlType = null; 52 53 54 57 public CmpFieldJdbcMapping() { 58 super(); 59 } 60 61 65 public String getFieldName() { 66 return fieldName; 67 } 68 69 73 public void setFieldName(String fieldName) { 74 this.fieldName = fieldName; 75 } 76 77 81 public String getJdbcFieldName() { 82 return jdbcFieldName; 83 } 84 85 89 public void setJdbcFieldName(String jdbcFieldName) { 90 this.jdbcFieldName = jdbcFieldName; 91 } 92 93 97 public String getSqlType() { 98 return sqlType; 99 } 100 101 105 public void setSqlType(String sqlType) { 106 this.sqlType = sqlType; 107 } 108 109 114 public String toXML(int indent) { 115 StringBuffer sb = new StringBuffer (); 116 sb.append(indent(indent)); 117 sb.append("<cmp-field-jdbc-mapping>\n"); 118 119 indent += 2; 120 121 sb.append(xmlElement(fieldName, "field-name", indent)); 123 sb.append(xmlElement(jdbcFieldName, "jdbc-field-name", indent)); 125 sb.append(xmlElement(sqlType, "sql-type", indent)); 127 indent -= 2; 128 sb.append(indent(indent)); 129 sb.append("</cmp-field-jdbc-mapping>\n"); 130 131 return sb.toString(); 132 } 133 } 134 | Popular Tags |