org.hibernate.id.insert
Class AbstractSelectingDelegate
java.lang.Object
org.hibernate.id.insert.AbstractSelectingDelegate
- InsertGeneratedIdentifierDelegate
public abstract class AbstractSelectingDelegate
extends java.lang.Object
Abstract InsertGeneratedIdentifierDelegate implementation where the
underlying strategy requires an subsequent select after the insert
to determine the generated identifier.
bindParameters
protected void bindParameters(SessionImplementor session,
PreparedStatement ps,
Object entity)
throws SQLException
Bind any required parameter values into the SQL command
getSelectSQL()
.
session
- The sessionps
- The prepared SQL
commandentity
- The entity being saved.
getResult
protected abstract Serializable getResult(SessionImplementor session,
ResultSet rs,
Object entity)
throws SQLException
Extract the generated key value from the given result set.
session
- The sessionrs
- The result set containing the generated primay key values.entity
- The entity being saved.
getSelectSQL
protected abstract String getSelectSQL()
Get the SQL statement to be used to retrieve generated key values.