类 DefaultResolveNaturalIdEventListener

    • 字段详细资料

      • REMOVED_ENTITY_MARKER

        public static final Object REMOVED_ENTITY_MARKER
      • INCONSISTENT_RTN_CLASS_MARKER

        public static final Object INCONSISTENT_RTN_CLASS_MARKER
    • 构造器详细资料

      • DefaultResolveNaturalIdEventListener

        public DefaultResolveNaturalIdEventListener()
    • 方法详细资料

      • 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.