2.17.2: 2011-06-17

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

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

public class ItemQueryWrapper
extends Object
implements QueryWrapper<BasicItem>

A query wrapper for ItemQuery: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  ItemQuery<BasicItem> query
           
 
Constructor Summary
ItemQueryWrapper(DbControl dc, ItemQuery<BasicItem> query)
          Create a new query wrapper.
 
Method Summary
 Object getData(ExportedProperty exportedProperty, BasicItem item)
          Uses a Metadata object to get the value of the specified property.
 int getId(BasicItem item)
          Calls BasicItem.getId()
 ResultIterator<BasicItem> iterate()
          Calls ItemQuery.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 ItemQuery<BasicItem> query

dc

private final DbControl dc
Constructor Detail

ItemQueryWrapper

public ItemQueryWrapper(DbControl dc,
                        ItemQuery<BasicItem> 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<BasicItem> iterate()
Calls ItemQuery.iterate(DbControl)

Specified by:
iterate in interface QueryWrapper<BasicItem>

getId

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

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

getData

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

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

2.17.2: 2011-06-17