TableRowIterator tri = DatabaseManager .query( myContext, "eperson", "SELECT eperson.* FROM eperson, epersongroup2eperson WHERE " + "epersongroup2eperson.eperson_id=eperson.eperson_id AND " + "epersongroup2eperson.eperson_group_id=" + myRow.getIntColumn("eperson_group_id"));  while (tri.hasNext()) { TableRow r = (TableRow) tri.next();   EPerson fromCache = (EPerson) myContext.fromCache(EPerson.class, r .getIntColumn("eperson_id"));  if (fromCache != null) { epeople.add(fromCache); } else { epeople.add(new EPerson(myContext, r)); } }
    Group(Context context, TableRow row) throws SQLException    {        myContext = context;        myRow = row;        // get epeople objects        TableRowIterator tri = DatabaseManager                .query(                        myContext,                        "eperson",                        "SELECT eperson.* FROM eperson, epersongroup2eperson WHERE "                                + "epersongroup2eperson.eperson_id=eperson.eperson_id AND "                                + "epersongroup2eperson.eperson_group_id="                                + myRow.getIntColumn("eperson_group_id"));        while (tri.hasNext())        {            TableRow r = (TableRow) tri.next();            // First check the cache            EPerson fromCache = (EPerson) myContext.fromCache(EPerson.class, r                    .getIntColumn("eperson_id"));            if (fromCache != null)            {                epeople.add(fromCache);            }            else            {                epeople.add(new EPerson(myContext, r));            }        }        // Cache ourselves        context.cache(this, row.getIntColumn("eperson_group_id"));    }