Top Description Fields Constructors Methods
org.hibernate.result.internal

pack-priv Class ResultSetOutputImpl

extends Object
implements ResultSetOutput
Class Inheritance
All Implemented Interfaces
org.hibernate.result.ResultSetOutput, org.hibernate.result.Output
Imports
java.sql.ResultSet, java.util.List, java.util.function.Supplier, javax.enterprise.inject.spi.Producer, org.hibernate.result.ResultSetOutput

Implementation of ResultSetOutput
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Supplier<List<E>>

Constructor Summary

AccessConstructor and Description
public
public
ResultSetOutputImpl(Supplier<List<E>> resultSetSupplier)

Method Summary

Modifier and TypeMethod and Description
public List<E>
getResultList()

Implements org.hibernate.result.ResultSetOutput.getResultList.

Consume the underlying java.sql.ResultSet and return the resulting List.
public Object
getSingleResult()

Implements org.hibernate.result.ResultSetOutput.getSingleResult.

Consume the underlying java.sql.ResultSet with the expectation that there is just a single level of root returns.
public boolean
isResultSet()

Implements org.hibernate.result.Output.isResultSet.

Determine if this return is a result (castable to ResultSetOutput).
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

resultSetSupplierback to summary
private final Supplier<List<E>> resultSetSupplier

Constructor Detail

ResultSetOutputImplback to summary
public ResultSetOutputImpl(List<E> results)
ResultSetOutputImplback to summary
public ResultSetOutputImpl(Supplier<List<E>> resultSetSupplier)

Method Detail

getResultListback to summary
public List<E> getResultList()

Implements org.hibernate.result.ResultSetOutput.getResultList.

Doc from org.hibernate.result.ResultSetOutput.getResultList.

Consume the underlying java.sql.ResultSet and return the resulting List.

Returns:List<E>

The consumed ResultSet values.

Annotations
@Override
@SuppressWarnings:unchecked
getSingleResultback to summary
public Object getSingleResult()

Implements org.hibernate.result.ResultSetOutput.getSingleResult.

Doc from org.hibernate.result.ResultSetOutput.getSingleResult.

Consume the underlying java.sql.ResultSet with the expectation that there is just a single level of root returns.

Returns:Object

The single result.

Annotations
@Override
isResultSetback to summary
public boolean isResultSet()

Implements org.hibernate.result.Output.isResultSet.

Doc from org.hibernate.result.Output.isResultSet.

Determine if this return is a result (castable to ResultSetOutput). The alternative is that it is an update count (castable to UpdateCountOutput).

Returns:boolean

true indicates that this can be safely cast to ResultSetOutput), other wise it can be cast to UpdateCountOutput.

Annotations
@Override