org.eclipse.persistence.queries.Cursor Maven / Gradle / Ivy
Show all versions of eclipselink Show documentation
/*
* Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
// Contributors:
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.queries;
import java.sql.*;
import java.util.*;
import org.eclipse.persistence.exceptions.*;
import org.eclipse.persistence.expressions.*;
import org.eclipse.persistence.internal.databaseaccess.*;
import org.eclipse.persistence.internal.helper.*;
import org.eclipse.persistence.internal.sessions.AbstractRecord;
import org.eclipse.persistence.internal.sessions.AbstractSession;
import org.eclipse.persistence.internal.sessions.UnitOfWorkImpl;
/**
* Purpose:
* Abstract class for CursoredStream and ScrolableCursor
*/
public abstract class Cursor implements Enumeration, Iterator, java.io.Serializable {
/** The preparedStatement that holds the handle to the database that the results are read from. */
protected transient Statement statement;
/** The result set (cursor) that holds the handle to the database that the results are read from. */
protected transient ResultSet resultSet;
/** The session that executed the query for the stream. */
protected transient AbstractSession session;
/** The root session that executed the call for the query. Knows the database platform. */
protected transient AbstractSession executionSession;
/** The fields expected in the result set. */
protected transient Vector fields;
/** Cached size of the stream. */
protected int size = -1;
/** Read query that initialize the stream. */
public transient ReadQuery query;
/** Query policy that initialize the stream. */
public transient CursorPolicy policy;
/** Internal collection of objects. */
protected List