2.17.2: 2011-06-17

net.sf.basedb.clients.web.plugins
Class DataQueryWrapper

java.lang.Object
  extended by net.sf.basedb.clients.web.plugins.DataQueryWrapper
All Implemented Interfaces:
DataLoader<BasicData>, QueryWrapper<BasicData>

public class DataQueryWrapper
extends Object
implements QueryWrapper<BasicData>

A query wrapper for DataQuery:s.

Version:
2.2
Author:
nicklas
Last modified
$Date: 2010-04-20 10:02:16 +0200 (Tue, 20 Apr 2010) $

Field Summary
private  DbControl dc
           
private  DataQuery<BasicData> query
           
 
Constructor Summary
DataQueryWrapper(DbControl dc, DataQuery<BasicData> query)
          Create a new query wrapper.
 
Method Summary
 Object getData(ExportedProperty exportedProperty, BasicData item)
          Uses a Metadata object to get the value of the specified property.
 int getId(BasicData item)
          Calls BasicData.getId()
 ResultIterator<BasicData> iterate()
          Calls DataQuery.iterate(DbControl)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

private final DataQuery<BasicData> query

dc

private final DbControl dc
Constructor Detail

DataQueryWrapper

public DataQueryWrapper(DbControl dc,
                        DataQuery<BasicData> query)
Create a new query wrapper.

Parameters:
dc - The DbControl used to execute the query
query - The query
Since:
2.15
Method Detail

iterate

public ResultIterator<BasicData> iterate()
Calls DataQuery.iterate(DbControl)

Specified by:
iterate in interface QueryWrapper<BasicData>

getId

public int getId(BasicData item)
Calls BasicData.getId()

Specified by:
getId in interface QueryWrapper<BasicData>
Parameters:
item - The item

getData

public Object getData(ExportedProperty exportedProperty,
                      BasicData item)
Uses a Metadata object to get the value of the specified property.

Specified by:
getData in interface DataLoader<BasicData>
Parameters:
exportedProperty - The property to get the value for
item - The item that holds the value

2.17.2: 2011-06-17