Top Description Fields Constructors Methods
org.hibernate.dialect.identity

public Class GetGeneratedKeysDelegate

extends AbstractReturningDelegate
implements InsertGeneratedIdentifierDelegate
Class Inheritance
All Implemented Interfaces
org.hibernate.id.insert.InsertGeneratedIdentifierDelegate
Known Direct Subclasses
org.hibernate.dialect.identity.Oracle12cGetGeneratedKeysDelegate
Imports
java.io.Serializable, java.sql.PreparedStatement, .ResultSet, .SQLException, org.hibernate.boot.model.relational.SqlStringGenerationContext, org.hibernate.dialect.Dialect, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.id.IdentifierGeneratorHelper, .PostInsertIdentityPersister, org.hibernate.id.insert.AbstractReturningDelegate, .IdentifierGeneratingInsert, .InsertGeneratedIdentifierDelegate

Delegate for dealing with IDENTITY columns using JDBC3 getGeneratedKeys
Author
Andrea Boriero

Field Summary

Modifier and TypeField and Description
private final Dialect
private final PostInsertIdentityPersister

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Serializable
protected PreparedStatement
public IdentifierGeneratingInsert
prepareIdentifierGeneratingInsert(SqlStringGenerationContext
A context to help generate SQL strings
context
)

Overrides default org.hibernate.id.insert.InsertGeneratedIdentifierDelegate.prepareIdentifierGeneratingInsert.

Build a org.hibernate.sql.Insert specific to the delegate's mode of handling generated key values.
Inherited from org.hibernate.id.insert.AbstractReturningDelegate:
getPersisterperformInsertreleaseStatement

Field Detail

dialectback to summary
private final Dialect dialect
persisterback to summary
private final PostInsertIdentityPersister persister

Hides org.hibernate.id.insert.AbstractReturningDelegate.persister.

Constructor Detail

GetGeneratedKeysDelegateback to summary
public GetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect)

Method Detail

executeAndExtractback to summary
public Serializable executeAndExtract(PreparedStatement insert, SharedSessionContractImplementor session) throws SQLException

Implements abstract org.hibernate.id.insert.AbstractReturningDelegate.executeAndExtract.

Annotations
@Override
prepareback to summary
protected PreparedStatement prepare(String insertSQL, SharedSessionContractImplementor session) throws SQLException

Implements abstract org.hibernate.id.insert.AbstractReturningDelegate.prepare.

Annotations
@Override
prepareIdentifierGeneratingInsertback to summary
public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert(SqlStringGenerationContext context)

Overrides default org.hibernate.id.insert.InsertGeneratedIdentifierDelegate.prepareIdentifierGeneratingInsert.

Doc from org.hibernate.id.insert.InsertGeneratedIdentifierDelegate.prepareIdentifierGeneratingInsert.

Build a org.hibernate.sql.Insert specific to the delegate's mode of handling generated key values.

Parameters
context:SqlStringGenerationContext

A context to help generate SQL strings

Returns:IdentifierGeneratingInsert

The insert object.

Annotations
@Override