net.anotheria.db.dao
Class RowMapper<T>

java.lang.Object
  extended by net.anotheria.db.dao.RowMapper<T>

public abstract class RowMapper<T>
extends Object

Used by the DAO to map a single row to an object of class T.

Author:
lrosenberg

Constructor Summary
RowMapper()
           
 
Method Summary
protected  List<Integer> convertToList(int[] objs)
           
protected  List<Long> convertToList(long[] objs)
           
protected  List<String> convertToList(String[] objs)
           
abstract  T map(ResultSet row)
          Creates a new object from the current row in the result set.
protected  String prepareString(String source)
          Trims the string for storage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowMapper

public RowMapper()
Method Detail

map

public abstract T map(ResultSet row)
               throws RowMapperException
Creates a new object from the current row in the result set.

Parameters:
row -
Returns:
Throws:
RowMapperException

prepareString

protected String prepareString(String source)
Trims the string for storage.

Parameters:
source -
Returns:

convertToList

protected List<Integer> convertToList(int[] objs)

convertToList

protected List<Long> convertToList(long[] objs)

convertToList

protected List<String> convertToList(String[] objs)


Copyright © 2010-2013 anotheria.net. All Rights Reserved.