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

public Class OutputsImpl

extends Object
implements Outputs
Class Inheritance
All Implemented Interfaces
org.hibernate.result.Outputs
Known Direct Subclasses
org.hibernate.procedure.internal.ProcedureOutputsImpl
Imports
java.sql.PreparedStatement, .ResultSet, .SQLException, java.util.ArrayList, .Collections, .List, .Set, java.util.function.Supplier, org.hibernate.JDBCException, org.hibernate.engine.spi.QueryParameters, .SharedSessionContractImplementor, org.hibernate.internal.CoreLogging, org.hibernate.loader.EntityAliases, org.hibernate.loader.custom.CustomLoader, .CustomQuery, .Return, .RootReturn, org.hibernate.loader.custom.sql.SQLQueryReturnProcessor, org.hibernate.param.ParameterBinder, org.hibernate.result.NoMoreReturnsException, .Output, .Outputs, org.hibernate.result.spi.ResultContext, org.jboss.logging.Logger

Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class
OutputsImpl.CurrentReturnState

Encapsulates the information needed to interpret the current return within a result

private static class

Field Summary

Modifier and TypeField and Description
private final ResultContext
private OutputsImpl.CurrentReturnState
private final PreparedStatement
private final OutputsImpl.CustomLoaderExtension
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private OutputsImpl.CurrentReturnState
buildCurrentReturnState(boolean isResultSet)

protected OutputsImpl.CurrentReturnState
buildCurrentReturnState(boolean isResultSet, int updateCount)

private static OutputsImpl.CustomLoaderExtension
protected JDBCException
private List<E>
protected List<E>
public Output
getCurrent()

Implements org.hibernate.result.Outputs.getCurrent.

Retrieve the current Output object.
public boolean
goToNext()

Implements org.hibernate.result.Outputs.goToNext.

Go to the next Output object (if any), returning an indication of whether there was another (aka, will the next call to getCurrent() return null?
public void
release()

Implements org.hibernate.result.Outputs.release.

Eagerly release any resources held by this Outputs.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final ResultContext context
currentReturnStateback to summary
private OutputsImpl.CurrentReturnState currentReturnState
jdbcStatementback to summary
private final PreparedStatement jdbcStatement
loaderback to summary
private final OutputsImpl.CustomLoaderExtension loader
logback to summary
private static final Logger log

Constructor Detail

OutputsImplback to summary
public OutputsImpl(ResultContext context, PreparedStatement jdbcStatement)

Method Detail

buildCurrentReturnStateback to summary
private OutputsImpl.CurrentReturnState buildCurrentReturnState(boolean isResultSet)
buildCurrentReturnStateback to summary
protected OutputsImpl.CurrentReturnState buildCurrentReturnState(boolean isResultSet, int updateCount)
buildSpecializedCustomLoaderback to summary
private static OutputsImpl.CustomLoaderExtension buildSpecializedCustomLoader(final ResultContext context)
convertback to summary
protected JDBCException convert(SQLException e, String message)
extractCurrentResultsback to summary
private List<E> extractCurrentResults()
extractResultsback to summary
protected List<E> extractResults(ResultSet resultSet)
getCurrentback to summary
public Output getCurrent()

Implements org.hibernate.result.Outputs.getCurrent.

Doc from org.hibernate.result.Outputs.getCurrent.

Retrieve the current Output object.

Returns:Output

The current Output object. Can be null

Annotations
@Override
goToNextback to summary
public boolean goToNext()

Implements org.hibernate.result.Outputs.goToNext.

Doc from org.hibernate.result.Outputs.goToNext.

Go to the next Output object (if any), returning an indication of whether there was another (aka, will the next call to getCurrent() return null?

Returns:boolean

true if the next call to getCurrent() will return a non-null value.

Annotations
@Override
releaseback to summary
public void release()

Implements org.hibernate.result.Outputs.release.

Doc from org.hibernate.result.Outputs.release.

Eagerly release any resources held by this Outputs.

Annotations
@Override
org.hibernate.result.internal back to summary

protected Class OutputsImpl.CurrentReturnState

extends Object
Class Inheritance
Known Direct Subclasses
org.hibernate.procedure.internal.ProcedureOutputsImpl.ProcedureCurrentReturnState

Encapsulates the information needed to interpret the current return within a result

Field Summary

Modifier and TypeField and Description
private final boolean
private Output
private final int

Constructor Summary

AccessConstructor and Description
protected
CurrentReturnState(boolean isResultSet, int updateCount)

Method Summary

Modifier and TypeMethod and Description
protected Output
protected Output
protected Output
protected Output
protected Output
buildUpdateCountOutput(int updateCount)

public Output
public int
protected boolean
public boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

isResultSetback to summary
private final boolean isResultSet
rtnback to summary
private Output rtn
updateCountback to summary
private final int updateCount

Constructor Detail

CurrentReturnStateback to summary
protected CurrentReturnState(boolean isResultSet, int updateCount)

Method Detail

buildExtendedReturnback to summary
protected Output buildExtendedReturn()
buildOutputback to summary
protected Output buildOutput()
buildResultSetOutputback to summary
protected Output buildResultSetOutput(List<E> list)
buildResultSetOutputback to summary
protected Output buildResultSetOutput(Supplier<List<E>> listSupplier)
buildUpdateCountOutputback to summary
protected Output buildUpdateCountOutput(int updateCount)
getOutputback to summary
public Output getOutput()
getUpdateCountback to summary
public int getUpdateCount()
hasExtendedReturnsback to summary
protected boolean hasExtendedReturns()
indicatesMoreOutputsback to summary
public boolean indicatesMoreOutputs()
isResultSetback to summary
public boolean isResultSet()
org.hibernate.result.internal back to summary

private Class OutputsImpl.CustomLoaderExtension

extends CustomLoader
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final EntityAliases[]
private boolean
private static final EntityAliases[]
private final QueryParameters
private final SharedSessionContractImplementor

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected EntityAliases[]
private EntityAliases[]
interpretEntityAliases(List<Return> customQueryReturns)

public List<E>
Inherited from org.hibernate.loader.custom.CustomLoader:
applyLocksautoDiscoverTypesbindParameterValuesgetCollectionAliasesgetCollectionOwnersgetCollectionPersistersgetEntityPersistersgetLockModesgetOwnersgetQueryIdentifiergetQuerySpacesgetResultColumnOrRowgetResultListgetResultRowgetResultRowAliasesgetSQLStringincludeInResultRowlistputResultInQueryCacheresolveResultTransformerscrollvalidateAlias

Field Detail

entityAliasesback to summary
private final EntityAliases[] entityAliases

Hides org.hibernate.loader.custom.CustomLoader.entityAliases.

needsDiscoveryback to summary
private boolean needsDiscovery
NO_ALIASESback to summary
private static final EntityAliases[] NO_ALIASES
queryParametersback to summary
private final QueryParameters queryParameters
sessionback to summary
private final SharedSessionContractImplementor session

Constructor Detail

CustomLoaderExtensionback to summary
public CustomLoaderExtension(CustomQuery customQuery, QueryParameters queryParameters, SharedSessionContractImplementor session)

Method Detail

getEntityAliasesback to summary
protected EntityAliases[] getEntityAliases()

Overrides org.hibernate.loader.custom.CustomLoader.getEntityAliases.

Doc from org.hibernate.loader.Loader.getEntityAliases.

Get the result set descriptor

Annotations
@Override
interpretEntityAliasesback to summary
private EntityAliases[] interpretEntityAliases(List<Return> customQueryReturns)
processResultSetback to summary
public List<E> processResultSet(ResultSet resultSet) throws SQLException