public abstract class AbstractSelectingDelegate extends Object implements InsertGeneratedIdentifierDelegate
Modifier | Constructor and Description |
---|---|
protected |
AbstractSelectingDelegate(PostInsertIdentityPersister persister) |
Modifier and Type | Method and Description |
---|---|
protected void |
bindParameters(SharedSessionContractImplementor session,
PreparedStatement ps,
Object entity)
Bind any required parameter values into the SQL command
getSelectSQL() . |
protected abstract Serializable |
getResult(SharedSessionContractImplementor session,
ResultSet rs,
Object entity)
Extract the generated key value from the given result set.
|
protected abstract String |
getSelectSQL()
Get the SQL statement to be used to retrieve generated key values.
|
Serializable |
performInsert(String insertSQL,
SharedSessionContractImplementor session,
Binder binder)
Perform the indicated insert SQL statement and determine the identifier value
generated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepareIdentifierGeneratingInsert
protected AbstractSelectingDelegate(PostInsertIdentityPersister persister)
public final Serializable performInsert(String insertSQL, SharedSessionContractImplementor session, Binder binder)
InsertGeneratedIdentifierDelegate
performInsert
in interface InsertGeneratedIdentifierDelegate
insertSQL
- The INSERT statement stringsession
- The session in which we are operatingbinder
- The param binderprotected abstract String getSelectSQL()
protected void bindParameters(SharedSessionContractImplementor session, PreparedStatement ps, Object entity) throws SQLException
getSelectSQL()
.session
- The sessionps
- The prepared SQL
commandentity
- The entity being saved.SQLException
protected abstract Serializable getResult(SharedSessionContractImplementor session, ResultSet rs, Object entity) throws SQLException
session
- The sessionrs
- The result set containing the generated primay key values.entity
- The entity being saved.SQLException
Copyright © 2019 JBoss by Red Hat. All rights reserved.