Package org.hibernate.id.insert
Class UniqueKeySelectingDelegate
- java.lang.Object
-
- org.hibernate.id.insert.AbstractSelectingDelegate
-
- org.hibernate.id.insert.UniqueKeySelectingDelegate
-
- All Implemented Interfaces:
InsertGeneratedIdentifierDelegate
public class UniqueKeySelectingDelegate extends AbstractSelectingDelegate
Uses a unique key of the inserted entity to locate the newly inserted row.
-
-
Constructor Summary
Constructors Constructor Description UniqueKeySelectingDelegate(PostInsertIdentityPersister persister, Dialect dialect, String[] uniqueKeyPropertyNames)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
bindParameters(Object entity, PreparedStatement ps, SharedSessionContractImplementor session)
TableInsertBuilder
createTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor factory)
Create aTableInsertBuilder
with any specific identity handling already built in.protected String
getSelectSQL()
Get the SQL statement to be used to retrieve generated key values.IdentifierGeneratingInsert
prepareIdentifierGeneratingInsert(SqlStringGenerationContext context)
Deprecated.-
Methods inherited from class org.hibernate.id.insert.AbstractSelectingDelegate
extractGeneratedValue, performInsert, performInsert, prepareStatement
-
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
prepareIdentifierGeneratingInsert
-
-
-
-
Constructor Detail
-
UniqueKeySelectingDelegate
public UniqueKeySelectingDelegate(PostInsertIdentityPersister persister, Dialect dialect, String[] uniqueKeyPropertyNames)
-
-
Method Detail
-
getSelectSQL
protected String getSelectSQL()
Description copied from class:AbstractSelectingDelegate
Get the SQL statement to be used to retrieve generated key values.- Specified by:
getSelectSQL
in classAbstractSelectingDelegate
- Returns:
- The SQL command string
-
prepareIdentifierGeneratingInsert
@Deprecated public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert(SqlStringGenerationContext context)
Deprecated.Description copied from interface:InsertGeneratedIdentifierDelegate
Build an insert statement specific to the delegate's mode of handling generated key values.- Parameters:
context
- A context to help generate SQL strings- Returns:
- An
IdentifierGeneratingInsert
-
createTableInsertBuilder
public TableInsertBuilder createTableInsertBuilder(BasicEntityIdentifierMapping identifierMapping, Expectation expectation, SessionFactoryImplementor factory)
Description copied from interface:InsertGeneratedIdentifierDelegate
Create aTableInsertBuilder
with any specific identity handling already built in.
-
bindParameters
protected void bindParameters(Object entity, PreparedStatement ps, SharedSessionContractImplementor session) throws SQLException
- Overrides:
bindParameters
in classAbstractSelectingDelegate
- Throws:
SQLException
-
-