1 21 package oracle.toplink.essentials.queryframework; 23 24 import oracle.toplink.essentials.internal.localization.ExceptionLocalization; 25 import oracle.toplink.essentials.sessions.DatabaseRecord; 26 27 37 38 public class ColumnResult extends SQLResult{ 39 40 41 protected String columnName; 42 43 public ColumnResult(String column){ 44 this.columnName = column; 45 if (this.columnName == null){ 46 throw new IllegalArgumentException (ExceptionLocalization.buildMessage("null_value_for_column_result")); 47 } 48 } 49 50 public String getColumnName(){ 51 return this.columnName; 52 } 53 54 58 public Object getValueFromRecord(DatabaseRecord record, ResultSetMappingQuery query){ 59 return record.get(this.columnName); 60 } 61 62 public boolean isColumnResult(){ 63 return true; 64 } 65 66 } 67 | Popular Tags |