throw new DataSinkException("There are "+_waitingObjects.size()+" objects still not written because of missing referenced objects");
if (_log.isDebugEnabled()) { for (Iterator it = _waitingObjects.iterator(); it.hasNext();) { WaitingObject obj   = (WaitingObject)it.next(); Table         table = _model.getDynaClassFor(obj.getObject()).getTable(); Identity      objId = buildIdentityFromPKs(table, obj.getObject());  _log.debug("Row " + objId + " is still not written because it depends on these yet unwritten rows"); for (Iterator fkIt = obj.getPendingFKs(); fkIt.hasNext();) { Identity pendingFkId = (Identity)fkIt.next();  _log.debug("  " + pendingFkId); }  } } if (_waitingObjects.size() == 1) { throw new DataSinkException("There is one row still not written because of missing referenced rows"); } else { throw new DataSinkException("There are " + _waitingObjects.size() + " rows still not written because of missing referenced rows"); }
    public void end() throws DataSinkException    {        purgeBatchQueue();        try        {            _connection.close();        }        catch (SQLException ex)        {            throw new DataSinkException(ex);        }        if (!_waitingObjects.isEmpty())        {            throw new DataSinkException("There are "+_waitingObjects.size()+" objects still not written because of missing referenced objects");        }    }