public static class

SelectGenerator.SelectGeneratorDelegate

extends AbstractSelectingDelegate
implements InsertGeneratedIdentifierDelegate
java.lang.Object
   ↳ org.hibernate.id.insert.AbstractSelectingDelegate
     ↳ org.hibernate.id.SelectGenerator.SelectGeneratorDelegate

Class Overview

The delegate for the select generation strategy.

Summary

Public Methods
IdentifierGeneratingInsert prepareIdentifierGeneratingInsert()
Build a Insert specific to the delegate's mode of handling generated key values.
Protected Methods
void bindParameters(SessionImplementor session, PreparedStatement ps, Object entity)
Bind any required parameter values into the SQL command getSelectSQL().
Serializable getResult(SessionImplementor session, ResultSet rs, Object entity)
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 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 void bindParameters (SessionImplementor session, PreparedStatement ps, Object entity)

Bind any required parameter values into the SQL command getSelectSQL().

Parameters
session The session
ps The prepared SQL command
entity The entity being saved.
Throws
SQLException

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

Extract the generated key value from the given result set.

Parameters
session The session
rs The result set containing the generated primay key values.
entity 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