org.hibernate.id

Class IdentityGenerator.InsertSelectDelegate

Enclosing Class:
IdentityGenerator
Implemented Interfaces:
InsertGeneratedIdentifierDelegate

public static class IdentityGenerator.InsertSelectDelegate
extends AbstractReturningDelegate
implements InsertGeneratedIdentifierDelegate

Delegate for dealing with IDENTITY columns where the dialect supports returning the generated IDENTITY value directly from the insert statement.

Constructor Summary

InsertSelectDelegate(PostInsertIdentityPersister persister, Dialect dialect)

Method Summary

Serializable
determineGeneratedIdentifier(SessionImplementor session, Object entity)
Serializable
executeAndExtract(PreparedStatement insert)
protected PreparedStatement
prepare(String insertSQL, SessionImplementor session)
IdentifierGeneratingInsert
prepareIdentifierGeneratingInsert()

Methods inherited from class org.hibernate.id.insert.AbstractReturningDelegate

executeAndExtract, getPersister, performInsert, prepare, releaseStatement

Constructor Details

InsertSelectDelegate

public InsertSelectDelegate(PostInsertIdentityPersister persister,
                            Dialect dialect)

Method Details

determineGeneratedIdentifier

public Serializable determineGeneratedIdentifier(SessionImplementor session,
                                                 Object entity)

executeAndExtract

public Serializable executeAndExtract(PreparedStatement insert)
            throws SQLException
Overrides:
executeAndExtract in interface AbstractReturningDelegate

prepare

protected PreparedStatement prepare(String insertSQL,
                                    SessionImplementor session)
            throws SQLException
Overrides:
prepare in interface AbstractReturningDelegate

prepareIdentifierGeneratingInsert

public IdentifierGeneratingInsert prepareIdentifierGeneratingInsert()
Specified by:
prepareIdentifierGeneratingInsert in interface InsertGeneratedIdentifierDelegate