Interface LazyInitializable

All Known Subinterfaces:
PersistentCollection<E>
All Known Implementing Classes:
AbstractPersistentCollection, CollectionProxy, ListProxy, MapProxy, PersistentArrayHolder, PersistentBag, PersistentIdentifierBag, PersistentList, PersistentMap, PersistentSet, PersistentSortedMap, PersistentSortedSet, SetProxy, SortedMapProxy, SortedSetProxy

@Incubating public interface LazyInitializable
The most general abstraction over collections which may be fetched lazily.
  • Hibernate core "wraps" a Java collection in an instance of PersistentCollection.
  • Similarly, Envers uses its own custom collection wrappers: ListProxy, SetProxy, and friends).

All of these wrapper objects extend LazyInitializable, allowing:

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    To be called internally by the session, forcing immediate initialization.
    boolean
    Is this instance initialized?
  • Method Details

    • wasInitialized

      boolean wasInitialized()
      Is this instance initialized?
      Returns:
      Was this collection initialized? Or is its data still not (fully) loaded?
      See Also:
    • forceInitialization

      void forceInitialization()
      To be called internally by the session, forcing immediate initialization.
      See Also: