01: package net.sourceforge.jaxor.mappers;
02:
03: import net.sourceforge.jaxor.api.Mapper;
04: import net.sourceforge.jaxor.api.FieldAdapter;
05: import net.sourceforge.jaxor.MetaField;
06:
07: import java.sql.ResultSet;
08: import java.sql.SQLException;
09:
10: /**
11: * Created By: Mike
12: * Date: Feb 8, 2004
13: * Time: 11:47:42 PM
14: *
15: * Last Checkin: $Author: mrettig $
16: * Date: $Date: 2004/02/09 06:35:41 $
17: * Revision: $Revision: 1.1 $
18: */
19: public abstract class MapperBase implements Mapper {
20:
21: public Object getValueFromResultSet(ResultSet rs, FieldAdapter field)
22: throws SQLException {
23: return getValueFromResultSet(rs, field.getMetaField());
24: }
25:
26: public Object getValueFromResultSet(ResultSet rs, MetaField field)
27: throws SQLException {
28: return rs.getObject(field.getColumn());
29: }
30:
31: public Object mapToSqlObject(Object obj) {
32: return obj;
33: }
34:
35: public void validate(Object obj, MetaField field) {
36: }
37: }
|