1 16 package com.ibatis.sqlmap.engine.mapping.result; 17 18 import com.ibatis.sqlmap.engine.type.JdbcTypeRegistry; 19 import com.ibatis.sqlmap.engine.type.TypeHandler; 20 21 24 public class BasicResultMapping implements ResultMapping { 25 26 private String propertyName; 27 private String columnName; 28 private int columnIndex; 29 private TypeHandler typeHandler; 30 private int jdbcType; 31 private String jdbcTypeName; 32 private String nullValue; 33 private String statementName; 34 private Class javaType; 35 36 private String nestedResultMapName; 37 38 private String errorString; 39 40 public String getPropertyName() { 41 return propertyName; 42 } 43 44 49 public void setPropertyName(String propertyName) { 50 this.errorString = "Check the result mapping for the '" + propertyName + "' property."; 51 this.propertyName = propertyName; 52 } 53 54 59 public String getErrorString() { 60 return errorString; 61 } 62 63 68 public String getColumnName() { 69 return columnName; 70 } 71 72 77 public void setColumnName(String columnName) { 78 this.columnName = columnName; 79 } 80 81 86 public int getColumnIndex() { 87 return columnIndex; 88 } 89 90 95 public void setColumnIndex(int columnIndex) { 96 this.columnIndex = columnIndex; 97 } 98 99 104 public TypeHandler getTypeHandler() { 105 return typeHandler; 106 } 107 108 112 public void setTypeHandler(TypeHandler typeHandler) { 113 this.typeHandler = typeHandler; 114 } 115 116 121 public Class getJavaType() { 122 return javaType; 123 } 124 125 130 public void setJavaType(Class javaType) { 131 this.javaType = javaType; 132 } 133 134 139 public int getJdbcType() { 140 return jdbcType; 141 } 142 143 148 public String getJdbcTypeName() { 149 return jdbcTypeName; 150 } 151 152 157 public void setJdbcTypeName(String jdbcTypeName) { 158 this.jdbcTypeName = jdbcTypeName; 159 this.jdbcType = JdbcTypeRegistry.getType(jdbcTypeName); 160 } 161 162 167 public String getNullValue() { 168 return nullValue; 169 } 170 171 176 public void setNullValue(String nullValue) { 177 this.nullValue = nullValue; 178 } 179 180 185 public String getStatementName() { 186 return statementName; 187 } 188 189 194 public void setStatementName(String statementName) { 195 this.statementName = statementName; 196 } 197 198 public String getNestedResultMapName() { 199 return nestedResultMapName; 200 } 201 202 public void setNestedResultMapName(String nestedResultMapName) { 203 this.nestedResultMapName = nestedResultMapName; 204 } 205 206 } 207 | Popular Tags |