org.apache.torque.om.mapper
Interface RecordMapper<T>
- Type Parameters:
T
- the class to map from and to a database record
- All Superinterfaces:
- Serializable
- All Known Implementing Classes:
- BigDecimalMapper, CompositeMapper, DateMapper, IntegerMapper, LongMapper, ObjectListMapper, StringMapper
public interface RecordMapper<T>
- extends Serializable
Maps an object to a database record and back.
This means that the object can be read from a database resultSet
and that it can produce PreparedStatements which insert or update
the record in the the database.
- Version:
- $Id: RecordMapper.java 1388656 2012-09-21 19:59:16Z tfischer $
Method Summary |
T |
processRow(ResultSet resultSet,
int rowOffset)
Constructs the object from the current row in the resultSet. |
processRow
T processRow(ResultSet resultSet,
int rowOffset)
throws TorqueException
- Constructs the object from the current row in the resultSet.
Implementing methods can be sure that the resultSet contains a row,
but they must only operate on the current row, i.e they must not call
resultSet.next().
- Parameters:
resultSet
- the resultSet to operate on, already pointing
to the correct row. Not null.rowOffset
- a possible offset in the rows to be considered
(if previous rows contain other objects).
- Returns:
- the mapped object, not null.
- Throws:
TorqueException
- when the mapping fails.
Copyright © 2000-2012 The Apache Software Foundation. All Rights Reserved.