Package org.apache.torque.om.mapper

# Class DateMapper

java.lang.Object
org.apache.torque.om.mapper.DateMapper

All Implemented Interfaces:
  `Serializable`, `RecordMapper<Date>`

public class DateMapper extends Object implements RecordMapper<Date>
Maps a database record to a java.util.Date.

Version:
  $Id: DateMapper.java 1839288 2018-08-27 09:48:33Z tv $
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DateMapper()`
  Constructs a DateMapper with an offset of 0.
  `DateMapper(int offset)`
  Constructs a DateMapper with the given offset.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Date`
  `processRow(ResultSet resultSet, int rowOffset, Criteria criteria)`
  Maps the current row in the result set to a java.util.Date.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DateMapper

    public DateMapper()
    Constructs a DateMapper with an offset of 0.

  - ### DateMapper

    public DateMapper(int offset)
    Constructs a DateMapper with the given offset.
    Parameters:
      `offset` - the additional offset (0 based).

- ## Method Details

  - ### processRow

    public Date processRow(ResultSet resultSet, int rowOffset, Criteria criteria) throws TorqueException
    Maps the current row in the result set to a java.util.Date.
    Specified by:
      `processRow` in interface `RecordMapper<Date>`
    Parameters:
      `resultSet` - the result set to map, not null.
      `rowOffset` - a possible offset in the columns to be considered (if previous columns contain other objects), or 0 for no offset.
      `criteria` - The criteria which created the result set, or null if not known. This parameter is not used by this record mapper.
    Returns:
      the date retrieved from the result set.
    Throws:
      `TorqueException` - when the mapping fails.