Package org.hibernate.id
Class IdentityGenerator.BasicDelegate
java.lang.Object
org.hibernate.id.insert.AbstractSelectingDelegate
org.hibernate.id.IdentityGenerator.BasicDelegate
- All Implemented Interfaces:
InsertGeneratedIdentifierDelegate
- Enclosing class:
IdentityGenerator
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SerializablegetResult(SessionImplementor session, ResultSet rs, Object object) Extract the generated key value from the given result set.protected StringGet the SQL statement to be used to retrieve generated key values.Build aInsertspecific to the delegate's mode of handling generated key values.Methods inherited from class org.hibernate.id.insert.AbstractSelectingDelegate
bindParameters, performInsertMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.id.insert.InsertGeneratedIdentifierDelegate
performInsert
-
Constructor Details
-
BasicDelegate
-
-
Method Details
-
prepareIdentifierGeneratingInsert
Description copied from interface:InsertGeneratedIdentifierDelegateBuild aInsertspecific to the delegate's mode of handling generated key values.- Specified by:
prepareIdentifierGeneratingInsertin interfaceInsertGeneratedIdentifierDelegate- Returns:
- The insert object.
-
getSelectSQL
Description copied from class:AbstractSelectingDelegateGet the SQL statement to be used to retrieve generated key values.- Specified by:
getSelectSQLin classAbstractSelectingDelegate- Returns:
- The SQL command string
-
getResult
protected Serializable getResult(SessionImplementor session, ResultSet rs, Object object) throws SQLException Description copied from class:AbstractSelectingDelegateExtract the generated key value from the given result set.- Specified by:
getResultin classAbstractSelectingDelegate- Parameters:
session- The sessionrs- The result set containing the generated primay key values.object- The entity being saved.- Returns:
- The generated identifier
- Throws:
SQLException
-