2.17.2: 2011-06-17

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

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

public class ItemQueryLoader
extends Object
implements DataLoader<BasicItem<?>>

A class that uses a given query to load data. The query is filtered on a given parameter.

Version:
2.12
Author:
martin
Last modified
$Date: 2009-04-21 14:54:42 +0200 (Tue, 21 Apr 2009) $

Field Summary
private  String parameterName
           
private  ItemQuery<?> query
           
 
Constructor Summary
ItemQueryLoader(ItemQuery<?> query, String parameterName)
           
 
Method Summary
 Object getData(ExportedProperty exportedProperty, BasicItem<?> item)
          Get the value for the specified property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

query

private final ItemQuery<?> query

parameterName

private final String parameterName
Constructor Detail

ItemQueryLoader

public ItemQueryLoader(ItemQuery<?> query,
                       String parameterName)
Parameters:
query - Query to use when loading data
parameterName - Name of the parameter that should be used to filter the query.
Method Detail

getData

public Object getData(ExportedProperty exportedProperty,
                      BasicItem<?> item)
               throws Exception
Description copied from interface: DataLoader
Get the value for 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
Throws:
Exception - If failing to get the data.

2.17.2: 2011-06-17