2.9.1: 2008-12-18

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

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

public class ItemQueryWrapper
extends Object
implements QueryWrapper<BasicItem>

A query wrapper for ItemQuery:s.

Version:
2.2
Author:
nicklas
Last modified
$Date: 2008-09-11 22:05:50 +0200 (Thu, 11 Sep 2008) $

Field Summary
private  DbControl dc
           
private  Item itemType
           
private  Metadata metadata
           
private  ItemQuery<BasicItem> query
           
 
Constructor Summary
ItemQueryWrapper(DbControl dc, ItemQuery<BasicItem> query, Item itemType)
          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

itemType

private final Item itemType

metadata

private final Metadata metadata
Constructor Detail

ItemQueryWrapper

public ItemQueryWrapper(DbControl dc,
                        ItemQuery<BasicItem> query,
                        Item itemType)
Create a new query wrapper.

Parameters:
dc - The DbControl used to execute the query
query - The query
itemType - Type of the items returned by the query
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 QueryWrapper<BasicItem>
Parameters:
exportedProperty - The property to get the value for
item - The item that holds the value

2.9.1: 2008-12-18