/** INTERNAL: Returns remote cursor stream */ public RemoteCursoredStream cursorSelectObjects( CursoredStreamPolicy policy, DistributedSession session) { try { Transporter transporter = getRemoteSessionController().cursorSelectObjects(new Transporter(policy)); if (!transporter.wasOperationSuccessful()) { throw transporter.getException(); } RemoteCursoredStream remoteCursoredStream = (RemoteCursoredStream) transporter.getObject(); remoteCursoredStream.setSession(session); remoteCursoredStream.setPolicy(policy); if (policy.getQuery().isReadAllQuery() && (!policy.getQuery().isReportQuery())) { // could be DataReadQuery fixObjectReferences(transporter, (ObjectLevelReadQuery) policy.getQuery(), session); } return remoteCursoredStream; } catch (RemoteException exception) { throw CommunicationException.errorInInvocation(exception); } }