1 package org.apache.torque.engine.database.model; 2 3 18 19 import org.xml.sax.Attributes ; 20 21 28 public class IdMethodParameter 29 { 30 private String name; 31 private String value; 32 private Table parentTable; 33 34 37 public void loadFromXML (Attributes attrib) 38 { 39 name = attrib.getValue("name"); 40 value = attrib.getValue("value"); 41 } 42 43 46 public String getName() 47 { 48 return name; 49 } 50 51 54 public void setName(String name) 55 { 56 this.name = name; 57 } 58 59 62 public String getValue() 63 { 64 return value; 65 } 66 67 70 public void setValue(String value) 71 { 72 this.value = value; 73 } 74 75 78 public void setTable(Table parent) 79 { 80 parentTable = parent; 81 } 82 83 86 public Table getTable() 87 { 88 return parentTable; 89 } 90 91 94 public String getTableName() 95 { 96 return parentTable.getName(); 97 } 98 99 102 public String toString() 103 { 104 StringBuffer result = new StringBuffer (); 105 result.append(" <id-method-parameter"); 106 if (getName() != null) 107 { 108 result.append(" name=\"") 109 .append(getName()) 110 .append("\""); 111 } 112 result.append(" value=\"") 113 .append(getValue()) 114 .append("\">\n"); 115 return result.toString(); 116 } 117 } 118 | Popular Tags |