uk.nominet.catnap.dao
Class CatnapAbstractFinderResultsExtractor

java.lang.Object
  extended byuk.nominet.catnap.dao.CatnapAbstractFinderResultsExtractor
All Implemented Interfaces:
org.springframework.jdbc.core.ResultSetExtractor
Direct Known Subclasses:
CatnapFinderPageableResultsExtractor

public abstract class CatnapAbstractFinderResultsExtractor
extends java.lang.Object
implements org.springframework.jdbc.core.ResultSetExtractor

Created by IntelliJ IDEA. User: Administrator Date: 13-Jul-2005 Time: 10:01:15 To change this template use File | Settings | File Templates.


Field Summary
protected  java.util.Map cachedInstances
           
protected  java.lang.String entityName
           
protected  int maxResults
           
protected  CatnapSessionData sessionData
           
 
Constructor Summary
CatnapAbstractFinderResultsExtractor(CatnapSessionData sessionData, java.lang.String entityName, java.util.Map cachedInstances, int maxResults, CatnapOperationProfile profile)
           
 
Method Summary
 java.lang.Object mapRow(java.sql.ResultSet resultSet, int rowIndex)
          Map a row from the db.
protected  void processRow(java.sql.ResultSet resultSet, int rowIndex, java.util.ArrayList resultsList)
          Common code used for processing a particular row.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.springframework.jdbc.core.ResultSetExtractor
extractData
 

Field Detail

sessionData

protected CatnapSessionData sessionData

entityName

protected java.lang.String entityName

cachedInstances

protected java.util.Map cachedInstances

maxResults

protected int maxResults
Constructor Detail

CatnapAbstractFinderResultsExtractor

public CatnapAbstractFinderResultsExtractor(CatnapSessionData sessionData,
                                            java.lang.String entityName,
                                            java.util.Map cachedInstances,
                                            int maxResults,
                                            CatnapOperationProfile profile)
Method Detail

mapRow

public java.lang.Object mapRow(java.sql.ResultSet resultSet,
                               int rowIndex)
Map a row from the db. This essentially builds an appropriate object tree using the xml schema for the returned result set. If any members are related fields new recursive finders are created and appended to the tree.

This routine operates in two modes, depending on which constructor was called a) recursive query mode (creates new instances for each row and pulls recursively to create a full tree) b) remap mode (uses an existing instance and replaces the data. Does not act recursively).

Parameters:
resultSet -
rowIndex -
Returns:
Object

processRow

protected void processRow(java.sql.ResultSet resultSet,
                          int rowIndex,
                          java.util.ArrayList resultsList)
Common code used for processing a particular row.

Parameters:
resultSet -
rowIndex -
resultsList -