tri.close();
    public static WorkspaceItem[] findByEPerson(Context context, EPerson ep)            throws SQLException    {        List wsItems = new ArrayList();        TableRowIterator tri = DatabaseManager.query(context, "workspaceitem",                "SELECT workspaceitem.* FROM workspaceitem, item WHERE "                        + "workspaceitem.item_id=item.item_id AND "                        + "item.submitter_id=" + ep.getID()                        + " ORDER BY workspaceitem.workspace_item_id");        while (tri.hasNext())        {            TableRow row = tri.next();            // Check the cache            WorkspaceItem wi = (WorkspaceItem) context.fromCache(                    WorkspaceItem.class, row.getIntColumn("workspace_item_id"));            if (wi == null)            {                wi = new WorkspaceItem(context, row);            }            wsItems.add(wi);        }        WorkspaceItem[] wsArray = new WorkspaceItem[wsItems.size()];        wsArray = (WorkspaceItem[]) wsItems.toArray(wsArray);        return wsArray;    }