m_rsAndStmt.m_rs = rsTemp;
    public synchronized Object next() throws NoSuchElementException {        try {            if (!hasCalledCheck) {                hasNext();            }            hasCalledCheck = false;            if (hasNext) {                // for each cld: set m_rsAndStmt, call getObjectFromResultSet, put in results array                DescriptorRepository dr = m_broker.getDescriptorRepository();                ResultSet rsTemp = m_rsAndStmt.m_rs;                Object[] results = new Object[query.getSelect().size()];                for (int i = 0; i < results.length; i++) {                    Object obj = null;                    QueryNode node = (QueryNode) query.getSelect().get(i);                    String alias = (String) query.getAliases().get(node);                    if (node instanceof QueryClass) {                        m_rsAndStmt.m_rs = getUnaliasedColumns(rsTemp, alias);                        m_cld = dr.getDescriptorFor(node.getType());                        itemProxyClass = m_cld.getProxyClass();                        itemExtentClass = null;                                                obj = getObjectFromResultSet();                        // Invoke events on PersistenceBrokerAware instances and listeners                        m_broker.fireBrokerEvent(obj, PersistenceBrokerImpl.EVENT_AFTER_LOOKUP);                    } else {                        int columnIndex = m_rsAndStmt.m_rs.findColumn(alias);                        int jdbcType = m_rsAndStmt.m_rs.getMetaData().getColumnType(columnIndex);                        obj = SqlHelper.getObjectFromColumn(m_rsAndStmt.m_rs, jdbcType, alias);                    }                    results[i] = obj;                }                m_rsAndStmt.m_rs = rsTemp;                m_current_row++;                return results;            } else {                throw new NoSuchElementException();            }        } catch (Exception ex) {            ex.printStackTrace();            logger.error(ex);            throw new NoSuchElementException();        }    }