public static class IdentityGenerator.BasicDelegate extends AbstractSelectingDelegate implements InsertGeneratedIdentifierDelegate
Delegate for dealing with IDENTITY columns where the dialect requires an additional command execution to retrieve the generated IDENTITY value
| Constructor and Description |
|---|
BasicDelegate(PostInsertIdentityPersister persister,
Dialect dialect) |
| Modifier and Type | Method and Description |
|---|---|
protected Serializable |
getResult(SharedSessionContractImplementor session,
ResultSet rs,
Object object)
Extract the generated key value from the given result set.
|
protected String |
getSelectSQL()
Get the SQL statement to be used to retrieve generated key values.
|
IdentifierGeneratingInsert |
prepareIdentifierGeneratingInsert()
Build a
Insert specific to the delegate’s mode
of handling generated key values. |
bindParameters, performInsertclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitperformInsertpublic BasicDelegate(PostInsertIdentityPersister persister, Dialect dialect)
public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert()
InsertGeneratedIdentifierDelegateBuild a Insert specific to the delegate’s mode
of handling generated key values.
prepareIdentifierGeneratingInsert in interface InsertGeneratedIdentifierDelegateprotected String getSelectSQL()
AbstractSelectingDelegateGet the SQL statement to be used to retrieve generated key values.
getSelectSQL in class AbstractSelectingDelegateprotected Serializable getResult(SharedSessionContractImplementor session, ResultSet rs, Object object) throws SQLException
AbstractSelectingDelegateExtract the generated key value from the given result set.
getResult in class AbstractSelectingDelegatesession - The sessionrs - The result set containing the generated primay key values.object - The entity being saved.SQLExceptionCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.