public class

SequenceIdentityGenerator

extends SequenceGenerator
implements PostInsertIdentifierGenerator
java.lang.Object
   ↳ org.hibernate.id.SequenceGenerator
     ↳ org.hibernate.id.SequenceIdentityGenerator

Class Overview

A generator which combines sequence generation with immediate retrieval through JDBC3 getGeneratedKeys. In this respect it works much like ANSI-SQL IDENTITY generation.

This generator only known to work with newer Oracle drivers compiled for JDK 1.4 (JDBC3).

Note: Due to a bug in Oracle drivers, sql comments on these insert statements are completely disabled.

Summary

Nested Classes
class SequenceIdentityGenerator.Delegate  
class SequenceIdentityGenerator.NoCommentsInsert  
[Expand]
Inherited Constants
From class org.hibernate.id.SequenceGenerator
From interface org.hibernate.id.IdentifierGenerator
From interface org.hibernate.id.PersistentIdentifierGenerator
[Expand]
Inherited Fields
From interface org.hibernate.id.PersistentIdentifierGenerator
Public Constructors
SequenceIdentityGenerator()
Public Methods
void configure(Type type, Properties params, Dialect dialect)
Configure this instance, given the value of parameters specified by the user as <param> elements.
Serializable generate(SessionImplementor s, Object obj)
Generate a new identifier.
InsertGeneratedIdentifierDelegate getInsertGeneratedIdentifierDelegate(PostInsertIdentityPersister persister, Dialect dialect, boolean isGetGeneratedKeysEnabled)
[Expand]
Inherited Methods
From class org.hibernate.id.SequenceGenerator
From class java.lang.Object
From interface org.hibernate.id.Configurable
From interface org.hibernate.id.IdentifierGenerator
From interface org.hibernate.id.PersistentIdentifierGenerator
From interface org.hibernate.id.PostInsertIdentifierGenerator

Public Constructors

public SequenceIdentityGenerator ()

Public Methods

public void configure (Type type, Properties params, Dialect dialect)

Configure this instance, given the value of parameters specified by the user as <param> elements. This method is called just once, following instantiation.

Parameters
params param values, keyed by parameter name

public Serializable generate (SessionImplementor s, Object obj)

Generate a new identifier.

Parameters
obj the entity or toplevel collection for which the id is being generated
Returns
  • a new identifier

public InsertGeneratedIdentifierDelegate getInsertGeneratedIdentifierDelegate (PostInsertIdentityPersister persister, Dialect dialect, boolean isGetGeneratedKeysEnabled)