类 AbstractSelectingDelegate
- java.lang.Object
-
- org.hibernate.id.insert.AbstractSelectingDelegate
-
- 所有已实现的接口:
InsertGeneratedIdentifierDelegate
public abstract class AbstractSelectingDelegate extends Object implements InsertGeneratedIdentifierDelegate
Abstract InsertGeneratedIdentifierDelegate implementation where the underlying strategy requires a subsequent select after the insert to determine the generated identifier.- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 限定符 构造器 说明 protectedAbstractSelectingDelegate(PostInsertIdentityPersister persister)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected voidbindParameters(SharedSessionContractImplementor session, PreparedStatement ps, Object entity)Bind any required parameter values into the SQL commandgetSelectSQL().protected abstract SerializablegetResult(SharedSessionContractImplementor session, ResultSet rs, Object entity)Extract the generated key value from the given result set.protected abstract StringgetSelectSQL()Get the SQL statement to be used to retrieve generated key values.SerializableperformInsert(String insertSQL, SharedSessionContractImplementor session, Binder binder)Perform the indicated insert SQL statement and determine the identifier value generated.-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.id.insert.InsertGeneratedIdentifierDelegate
prepareIdentifierGeneratingInsert
-
-
-
-
构造器详细资料
-
AbstractSelectingDelegate
protected AbstractSelectingDelegate(PostInsertIdentityPersister persister)
-
-
方法详细资料
-
performInsert
public final Serializable performInsert(String insertSQL, SharedSessionContractImplementor session, Binder binder)
从接口复制的说明:InsertGeneratedIdentifierDelegatePerform the indicated insert SQL statement and determine the identifier value generated.- 指定者:
performInsert在接口中InsertGeneratedIdentifierDelegate- 参数:
insertSQL- The INSERT statement stringsession- The session in which we are operatingbinder- The param binder- 返回:
- The generated identifier value.
-
getSelectSQL
protected abstract String getSelectSQL()
Get the SQL statement to be used to retrieve generated key values.- 返回:
- The SQL command string
-
bindParameters
protected void bindParameters(SharedSessionContractImplementor session, PreparedStatement ps, Object entity) throws SQLException
Bind any required parameter values into the SQL commandgetSelectSQL().- 参数:
session- The sessionps- The preparedSQLcommandentity- The entity being saved.- 抛出:
SQLException
-
getResult
protected abstract Serializable getResult(SharedSessionContractImplementor 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.- 返回:
- The generated identifier
- 抛出:
SQLException
-
-