public static class

IdentityGenerator.BasicDelegate

extends AbstractSelectingDelegate
implements InsertGeneratedIdentifierDelegate
java.lang.Object
   ↳ org.hibernate.id.insert.AbstractSelectingDelegate
     ↳ org.hibernate.id.IdentityGenerator.BasicDelegate

Class Overview

Delegate for dealing with IDENTITY columns where the dialect requires an additional command execution to retrieve the generated IDENTITY value

Summary

Public Constructors
IdentityGenerator.BasicDelegate(PostInsertIdentityPersister persister, Dialect dialect)
Public Methods
IdentifierGeneratingInsert prepareIdentifierGeneratingInsert()
Build a Insert specific to the delegate's mode of handling generated key values.
Protected Methods
Serializable getResult(SessionImplementor session, ResultSet rs, Object object)
Extract the generated key value from the given result set.
String getSelectSQL()
Get the SQL statement to be used to retrieve generated key values.
[Expand]
Inherited Methods
From class org.hibernate.id.insert.AbstractSelectingDelegate
From class java.lang.Object
From interface org.hibernate.id.insert.InsertGeneratedIdentifierDelegate

Public Constructors

public IdentityGenerator.BasicDelegate (PostInsertIdentityPersister persister, Dialect dialect)

Public Methods

public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert ()

Build a Insert specific to the delegate's mode of handling generated key values.

Returns
  • The insert object.

Protected Methods

protected Serializable getResult (SessionImplementor session, ResultSet rs, Object object)

Extract the generated key value from the given result set.

Parameters
session The session
rs The result set containing the generated primay key values.
object The entity being saved.
Returns
  • The generated identifier
Throws
SQLException

protected String getSelectSQL ()

Get the SQL statement to be used to retrieve generated key values.

Returns
  • The SQL command string