Class DynamicQueryWrapper
java.lang.Object
net.sf.basedb.clients.web.plugins.DynamicQueryWrapper
- All Implemented Interfaces:
DataLoader<SqlResult>
,QueryWrapper<SqlResult>
A query wrapper for
DynamicQuery
:s.- Version:
- 2.2
- Author:
- nicklas
- Last modified
- $Date: 2012-09-14 12:29:16 +0200 (fr, 14 sep 2012) $
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetData
(DbControl dc, ExportedProperty exportedProperty, SqlResult item) CallsSqlResult.getObject(int)
and increases the column index for each call.int
Keeps a counter which is incremented at each call to this method.
-
Field Details
-
query
-
counter
private int counter -
colIndex
private int colIndex
-
-
Constructor Details
-
DynamicQueryWrapper
Create a new query wrapper.- Parameters:
query
- The query
-
-
Method Details
-
iterate
- Specified by:
iterate
in interfaceQueryWrapper<SqlResult>
-
getId
Keeps a counter which is incremented at each call to this method. Starts at 0.- Specified by:
getId
in interfaceQueryWrapper<SqlResult>
- Parameters:
item
- The item
-
getData
public Object getData(DbControl dc, ExportedProperty exportedProperty, SqlResult item) throws SQLException CallsSqlResult.getObject(int)
and increases the column index for each call. Expects this method to be called in the order the properties are selected.- Specified by:
getData
in interfaceDataLoader<SqlResult>
exportedProperty
- The property to get the value foritem
- The item that holds the value- Throws:
SQLException
-