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 Object
determineGeneratedIdentifier(SharedSessionContractImplementor session, Object entity)
Object
executeAndExtract(PreparedStatement insert, SharedSessionContractImplementor session)
protected PreparedStatement
prepare(String insertSQL, SharedSessionContractImplementor session)
String
prepareIdentifierGeneratingInsert(String insertSQL)
Append SQL specific to the delegate's mode of handling generated key values.IdentifierGeneratingInsert
prepareIdentifierGeneratingInsert(SqlStringGenerationContext context)
Build aInsert
specific 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
-
-
-
-
Constructor Detail
-
InsertSelectDelegate
public InsertSelectDelegate(PostInsertIdentityPersister persister, Dialect dialect)
-
-
Method Detail
-
prepareIdentifierGeneratingInsert
public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert(SqlStringGenerationContext context)
Description copied from interface:InsertGeneratedIdentifierDelegate
Build aInsert
specific to the delegate's mode of handling generated key values.- Specified by:
prepareIdentifierGeneratingInsert
in interfaceInsertGeneratedIdentifierDelegate
- Parameters:
context
- A context to help generate SQL strings- Returns:
- The insert object.
-
prepareIdentifierGeneratingInsert
public String prepareIdentifierGeneratingInsert(String insertSQL)
Description copied from interface:InsertGeneratedIdentifierDelegate
Append SQL specific to the delegate's mode of handling generated key values.- Specified by:
prepareIdentifierGeneratingInsert
in interfaceInsertGeneratedIdentifierDelegate
- Returns:
- The insert SQL.
-
prepare
protected PreparedStatement prepare(String insertSQL, SharedSessionContractImplementor session) throws SQLException
- Specified by:
prepare
in classAbstractReturningDelegate
- Throws:
SQLException
-
executeAndExtract
public Object executeAndExtract(PreparedStatement insert, SharedSessionContractImplementor session) throws SQLException
- Specified by:
executeAndExtract
in classAbstractReturningDelegate
- Throws:
SQLException
-
determineGeneratedIdentifier
public Object determineGeneratedIdentifier(SharedSessionContractImplementor session, Object entity)
-
-