To understand what session.createQuery("Query").scroll()
returns, the user needs to have understanding of Hibernate, Java and SQL.
Explanation of each option:
A. ListResultSet: This option is incorrect because ListResultSet
is not a valid class in Hibernate.
B. ResultSet: This option is incorrect because ResultSet
is a class in Java that represents a table of data representing a database result set, and it is not returned by the scroll()
method in Hibernate.
C. ScrollableResultSet: This option is incorrect because ScrollableResultSet
is not a valid class in Hibernate.
D. ScrollableResult: This option is correct. The scroll()
method in Hibernate returns a ScrollableResult
object, which is used to traverse a result set. It provides methods to move the cursor forward and backward, as well as methods to retrieve the current row or a subset of rows.
Therefore, the answer is: D. ScrollableResult.