public class ItemQueryLoader<T extends BasicItem> extends java.lang.Object implements DataLoader<T>
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
parameterName |
private ItemQuery<?> |
query |
Constructor and Description |
---|
ItemQueryLoader(ItemQuery<?> query,
java.lang.String parameterName) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getData(DbControl dc,
ExportedProperty exportedProperty,
T item)
Get the value for the specified property.
|
private final ItemQuery<?> query
private final java.lang.String parameterName
public ItemQueryLoader(ItemQuery<?> query, java.lang.String parameterName)
query
- Query to use when loading dataparameterName
- Name of the parameter that should be used to filter the query.public java.lang.Object getData(DbControl dc, ExportedProperty exportedProperty, T item) throws java.lang.Exception
DataLoader
getData
in interface DataLoader<T extends BasicItem>
exportedProperty
- The property to get the value foritem
- The item that holds the valuejava.lang.Exception
- If failing to get the data.