*/
private static void fillCollections(Context context,
HarvestedItemInfo itemInfo) throws SQLException
{
// Get the collection Handles from DB
TableRowIterator colRows = DatabaseManager.query(context,
"SELECT handle.handle FROM handle, collection2item WHERE handle.resource_type_id= ? " +
"AND collection2item.collection_id=handle.resource_id AND collection2item.item_id = ? ",
Constants.COLLECTION, itemInfo.itemID);
try
{
// Chuck 'em in the itemInfo object
itemInfo.collectionHandles = new LinkedList();
while (colRows.hasNext())
{
TableRow r = colRows.next();
itemInfo.collectionHandles.add(r.getStringColumn("handle"));
}
}
finally
{
if (colRows != null)
colRows.close();
}
}