类 DefaultResolveNaturalIdEventListener
- java.lang.Object
-
- org.hibernate.event.internal.AbstractReassociateEventListener
-
- org.hibernate.event.internal.AbstractLockUpgradeEventListener
-
- org.hibernate.event.internal.DefaultResolveNaturalIdEventListener
-
- 所有已实现的接口:
Serializable,ResolveNaturalIdEventListener
public class DefaultResolveNaturalIdEventListener extends AbstractLockUpgradeEventListener implements ResolveNaturalIdEventListener
Defines the default load event listeners used by hibernate for loading entities in response to generated load events.- 作者:
- Eric Dalquist, Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 static ObjectINCONSISTENT_RTN_CLASS_MARKERstatic ObjectREMOVED_ENTITY_MARKER
-
构造器概要
构造器 构造器 说明 DefaultResolveNaturalIdEventListener()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected SerializableloadFromDatasource(ResolveNaturalIdEvent event)Performs the process of loading an entity from the configured underlying datasource.voidonResolveNaturalId(ResolveNaturalIdEvent event)Handle the given resolve natural id event.protected SerializableresolveFromCache(ResolveNaturalIdEvent event)Attempts to resolve the entity id corresponding to the event's natural id values from the sessionprotected SerializableresolveNaturalId(ResolveNaturalIdEvent event)Coordinates the efforts to load a given entity.-
从类继承的方法 org.hibernate.event.internal.AbstractLockUpgradeEventListener
upgradeLock
-
从类继承的方法 org.hibernate.event.internal.AbstractReassociateEventListener
reassociate
-
-
-
-
方法详细资料
-
onResolveNaturalId
public void onResolveNaturalId(ResolveNaturalIdEvent event) throws HibernateException
从接口复制的说明:ResolveNaturalIdEventListenerHandle the given resolve natural id event.- 指定者:
onResolveNaturalId在接口中ResolveNaturalIdEventListener- 参数:
event- The resolve natural id event to be handled.- 抛出:
HibernateException- Indicates a problem resolving natural id to primary key
-
resolveNaturalId
protected Serializable resolveNaturalId(ResolveNaturalIdEvent event)
Coordinates the efforts to load a given entity. First, an attempt is made to load the entity from the session-level cache. If not found there, an attempt is made to locate it in second-level cache. Lastly, an attempt is made to load it directly from the datasource.- 参数:
event- The load event- 返回:
- The loaded entity, or null.
-
resolveFromCache
protected Serializable resolveFromCache(ResolveNaturalIdEvent event)
Attempts to resolve the entity id corresponding to the event's natural id values from the session- 参数:
event- The load event- 返回:
- The entity from the cache, or null.
-
loadFromDatasource
protected Serializable loadFromDatasource(ResolveNaturalIdEvent event)
Performs the process of loading an entity from the configured underlying datasource.- 参数:
event- The load event- 返回:
- The object loaded from the datasource, or null if not found.
-
-