Top Description Fields Constructors Methods
org.hibernate.id.insert

public Class UniqueKeySelectingDelegate

extends AbstractSelectingDelegate
Class Inheritance
Imports
org.hibernate.boot.model.relational.SqlStringGenerationContext, org.hibernate.dialect.Dialect, org.hibernate.engine.spi.SessionFactoryImplementor, .SharedSessionContractImplementor, org.hibernate.id.PostInsertIdentityPersister, org.hibernate.jdbc.Expectation, org.hibernate.metamodel.mapping.BasicEntityIdentifierMapping, org.hibernate.sql.model.ast.builder.TableInsertBuilder, .TableInsertBuilderStandard, org.hibernate.type.Type, java.sql.PreparedStatement, .SQLException

Uses a unique key of the inserted entity to locate the newly inserted row.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private final Dialect
private final String
private final PostInsertIdentityPersister
private final String[]
private final Type[]

Constructor Summary

AccessConstructor and Description
public
UniqueKeySelectingDelegate(PostInsertIdentityPersister persister, Dialect dialect, String[] uniqueKeyPropertyNames)

Method Summary

Modifier and TypeMethod and Description
protected void
public TableInsertBuilder
createTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor factory)

Implements org.hibernate.id.insert.InsertGeneratedIdentifierDelegate.createTableInsertBuilder.

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Create a TableInsertBuilder with any specific identity handling already built in.
protected String
getSelectSQL()

Implements abstract org.hibernate.id.insert.AbstractSelectingDelegate.getSelectSQL.

Get the SQL statement to be used to retrieve generated key values.
public IdentifierGeneratingInsert
prepareIdentifierGeneratingInsert(SqlStringGenerationContext
A context to help generate SQL strings
context
)

Implements org.hibernate.id.insert.InsertGeneratedIdentifierDelegate.prepareIdentifierGeneratingInsert.

Deprecated
Build an insert statement specific to the delegate's mode of handling generated key values.
Inherited from org.hibernate.id.insert.AbstractSelectingDelegate:
extractGeneratedValueperformInsertperformInsertprepareStatement

Field Detail

dialectback to summary
private final Dialect dialect
idSelectStringback to summary
private final String idSelectString
persisterback to summary
private final PostInsertIdentityPersister persister

Hides org.hibernate.id.insert.AbstractSelectingDelegate.persister.

uniqueKeyPropertyNamesback to summary
private final String[] uniqueKeyPropertyNames
uniqueKeyTypesback to summary
private final Type[] uniqueKeyTypes

Constructor Detail

UniqueKeySelectingDelegateback to summary
public UniqueKeySelectingDelegate(PostInsertIdentityPersister persister, Dialect dialect, String[] uniqueKeyPropertyNames)

Method Detail

bindParametersback to summary
protected void bindParameters(Object entity, PreparedStatement ps, SharedSessionContractImplementor session) throws SQLException

Overrides org.hibernate.id.insert.AbstractSelectingDelegate.bindParameters.

createTableInsertBuilderback to summary
public TableInsertBuilder createTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor factory)

Implements org.hibernate.id.insert.InsertGeneratedIdentifierDelegate.createTableInsertBuilder.

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

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Create a TableInsertBuilder with any specific identity handling already built in.

Annotations
@Override
getSelectSQLback to summary
protected String getSelectSQL()

Implements abstract org.hibernate.id.insert.AbstractSelectingDelegate.getSelectSQL.

Doc from org.hibernate.id.insert.AbstractSelectingDelegate.getSelectSQL.

Get the SQL statement to be used to retrieve generated key values.

Returns:String

The SQL command string

prepareIdentifierGeneratingInsertback to summary
public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert(SqlStringGenerationContext context)

Implements org.hibernate.id.insert.InsertGeneratedIdentifierDelegate.prepareIdentifierGeneratingInsert.

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

Deprecated

Build an insert statement specific to the delegate's mode of handling generated key values.

Parameters
context:SqlStringGenerationContext

A context to help generate SQL strings

Returns:IdentifierGeneratingInsert

An IdentifierGeneratingInsert

Annotations
@Override
@Deprecated