Package org.hibernate.id
Class IdentityGenerator.InsertSelectDelegate
- java.lang.Object
-
- org.hibernate.id.insert.AbstractReturningDelegate
-
- org.hibernate.id.IdentityGenerator.InsertSelectDelegate
-
- All Implemented Interfaces:
InsertGeneratedIdentifierDelegate
- Enclosing class:
- IdentityGenerator
public static class IdentityGenerator.InsertSelectDelegate extends AbstractReturningDelegate implements InsertGeneratedIdentifierDelegate
Delegate for dealing with IDENTITY columns where the dialect supports returning the generated IDENTITY value directly from the insert statement.
-
-
Constructor Summary
Constructors Constructor Description InsertSelectDelegate(PostInsertIdentityPersister persister, Dialect dialect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.SerializabledetermineGeneratedIdentifier(SharedSessionContractImplementor session, java.lang.Object entity)java.io.SerializableexecuteAndExtract(java.sql.PreparedStatement insert, SharedSessionContractImplementor session)protected java.sql.PreparedStatementprepare(java.lang.String insertSQL, SharedSessionContractImplementor session)IdentifierGeneratingInsertprepareIdentifierGeneratingInsert(SqlStringGenerationContext context)Build aInsertspecific to the delegate's mode of handling generated key values.-
Methods inherited from class org.hibernate.id.insert.AbstractReturningDelegate
getPersister, performInsert, releaseStatement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.id.insert.InsertGeneratedIdentifierDelegate
performInsert, prepareIdentifierGeneratingInsert
-
-
-
-
Constructor Detail
-
InsertSelectDelegate
public InsertSelectDelegate(PostInsertIdentityPersister persister, Dialect dialect)
-
-
Method Detail
-
prepareIdentifierGeneratingInsert
public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert(SqlStringGenerationContext context)
Description copied from interface:InsertGeneratedIdentifierDelegateBuild aInsertspecific to the delegate's mode of handling generated key values.- Specified by:
prepareIdentifierGeneratingInsertin interfaceInsertGeneratedIdentifierDelegate- Parameters:
context- A context to help generate SQL strings- Returns:
- The insert object.
-
prepare
protected java.sql.PreparedStatement prepare(java.lang.String insertSQL, SharedSessionContractImplementor session) throws java.sql.SQLException- Specified by:
preparein classAbstractReturningDelegate- Throws:
java.sql.SQLException
-
executeAndExtract
public java.io.Serializable executeAndExtract(java.sql.PreparedStatement insert, SharedSessionContractImplementor session) throws java.sql.SQLException- Specified by:
executeAndExtractin classAbstractReturningDelegate- Throws:
java.sql.SQLException
-
determineGeneratedIdentifier
public java.io.Serializable determineGeneratedIdentifier(SharedSessionContractImplementor session, java.lang.Object entity)
-
-