01: /*
02: * User: mrettig
03: * Date: Jun 26, 2002
04: * Time: 6:58:53 PM
05: */
06: package net.sourceforge.jaxor.mappers;
07:
08: import net.sourceforge.jaxor.MetaField;
09: import net.sourceforge.jaxor.api.Mapper;
10:
11: import java.sql.ResultSet;
12: import java.sql.SQLException;
13: import java.sql.Types;
14:
15: public class LongMapper extends MapperBase {
16:
17: public Object getValueFromResultSet(ResultSet rs, MetaField field)
18: throws SQLException {
19: long aLong = rs.getLong(field.getColumn());
20: if (!rs.wasNull())
21: return new Long(aLong);
22: return null;
23: }
24:
25: public int getSQLType() {
26: return Types.BIGINT;
27: }
28:
29: }
|