org.rimudb.generic.binders
Class DataObjectBinder

java.lang.Object
  extended by org.rimudb.generic.binders.DataObjectBinder
All Implemented Interfaces:
IQueryResultSetBinder

public class DataObjectBinder
extends java.lang.Object
implements IQueryResultSetBinder

This binder is used by GenericQuery to return a single DataObject. It is assumed that the result set will only contain a single row.

Author:
Simon Ritchie

Constructor Summary
DataObjectBinder(java.lang.Class<? extends DataObject> dataObjectClass)
           
 
Method Summary
 java.lang.Class<? extends DataObject> getDataObjectClass()
           
 void initialize(Database database)
          Initialize the IResultSetBinder.
 java.lang.Object processAllResultSet(java.sql.ResultSet rs)
          Process the Query result set, returning an Object defined by the binder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataObjectBinder

public DataObjectBinder(java.lang.Class<? extends DataObject> dataObjectClass)
Method Detail

processAllResultSet

public java.lang.Object processAllResultSet(java.sql.ResultSet rs)
                                     throws RimuDBException
Description copied from interface: IQueryResultSetBinder
Process the Query result set, returning an Object defined by the binder.

Specified by:
processAllResultSet in interface IQueryResultSetBinder
Parameters:
rs - ResultSet
Returns:
Object
Throws:
RimuDBException

getDataObjectClass

public java.lang.Class<? extends DataObject> getDataObjectClass()

initialize

public void initialize(Database database)
                throws RimuDBException
Description copied from interface: IQueryResultSetBinder
Initialize the IResultSetBinder. Some binders require access to the Database to perform initialization.

Specified by:
initialize in interface IQueryResultSetBinder
Parameters:
database - Database
Throws:
RimuDBException


Copyright © 2008-2011 Simon Ritchie. All Rights Reserved.