类 DefaultUpdateEventListener
- java.lang.Object
-
- org.hibernate.event.internal.AbstractReassociateEventListener
-
- org.hibernate.event.internal.AbstractSaveEventListener
-
- org.hibernate.event.internal.DefaultSaveOrUpdateEventListener
-
- org.hibernate.event.internal.DefaultUpdateEventListener
-
public class DefaultUpdateEventListener extends DefaultSaveOrUpdateEventListener
An event handler for update() events- 作者:
- Gavin King
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 DefaultUpdateEventListener()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected SerializablegetUpdateId(Object entity, EntityPersister persister, Serializable requestedId, SessionImplementor session)If the user specified an id, assign it to the instance and use that, otherwise use the id already assigned to the instanceprotected SerializableperformSaveOrUpdate(SaveOrUpdateEvent event)-
从类继承的方法 org.hibernate.event.internal.DefaultSaveOrUpdateEventListener
entityIsDetached, entityIsPersistent, entityIsTransient, getCascadeAction, invokeUpdateLifecycle, onSaveOrUpdate, performUpdate, reassociateIfUninitializedProxy, saveWithGeneratedOrRequestedId
-
从类继承的方法 org.hibernate.event.internal.AbstractSaveEventListener
cascadeAfterSave, cascadeBeforeSave, getMergeMap, injectCallbackRegistry, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId, substituteValuesIfNecessary, visitCollectionsBeforeSave
-
从类继承的方法 org.hibernate.event.internal.AbstractReassociateEventListener
reassociate
-
-
-
-
方法详细资料
-
performSaveOrUpdate
protected Serializable performSaveOrUpdate(SaveOrUpdateEvent event)
-
getUpdateId
protected Serializable getUpdateId(Object entity, EntityPersister persister, Serializable requestedId, SessionImplementor session) throws HibernateException
If the user specified an id, assign it to the instance and use that, otherwise use the id already assigned to the instance- 覆盖:
getUpdateId在类中DefaultSaveOrUpdateEventListener- 参数:
entity- The entity.persister- The entity persisterrequestedId- The requested identifiersession- The session- 返回:
- The id.
- 抛出:
TransientObjectException- If the entity is considered transient.HibernateException
-
-