FileDocCategorySizeDatePackage
SequenceIdentityGenerator.javaAPI DocHibernate 3.2.53882Mon Mar 27 10:47:06 BST 2006org.hibernate.id

SequenceIdentityGenerator

public class SequenceIdentityGenerator extends SequenceGenerator implements PostInsertIdentifierGenerator
A generator which combines sequence generation with immediate retrieval through JDBC3 {@link java.sql.Connection#prepareStatement(String, String[]) 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.

author
Steve Ebersole

Fields Summary
private static final Log
log
Constructors Summary
Methods Summary
public voidconfigure(org.hibernate.type.Type type, java.util.Properties params, org.hibernate.dialect.Dialect dialect)

		super.configure( type, params, dialect );
	
public java.io.Serializablegenerate(org.hibernate.engine.SessionImplementor s, java.lang.Object obj)


	      
		return IdentifierGeneratorFactory.POST_INSERT_INDICATOR;
	
public org.hibernate.id.insert.InsertGeneratedIdentifierDelegategetInsertGeneratedIdentifierDelegate(PostInsertIdentityPersister persister, org.hibernate.dialect.Dialect dialect, boolean isGetGeneratedKeysEnabled)

		return new Delegate( persister, dialect, getSequenceName() );