Interface SelectionLoadingStrategy<E>

Type Parameters:
E - The type of loaded entities.

@Incubating public interface SelectionLoadingStrategy<E>
A strategy for selection loading, used in particular during search.
  • Method Details

    • fromMap

      static <E, I> SelectionLoadingStrategy<E> fromMap(Map<I,E> map)
      Creates a simple map-based loading strategy.

      Generally only useful for tests.

      Type Parameters:
      E - The type of loaded entities.
      I - The type of entity identifiers.
      Parameters:
      map - A map from containing all entity identifiers as keys, and the corresponding entity as value.
      Returns:
      A loading strategy that loads entities from the given map.
    • equals

      boolean equals(Object obj)
      Overrides:
      equals in class Object
      Parameters:
      obj - Another strategy
      Returns:
      true if the other strategy targets the same entity hierarchy and can be used as a replacement for this one. false otherwise or when unsure.
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
    • createEntityLoader

      SelectionEntityLoader<E> createEntityLoader(LoadingTypeGroup<E> includedTypes, SelectionLoadingOptions options)
      Parameters:
      includedTypes - A representation of all entity types that will have to be loaded.
      options - Loading options configured by the requester (who created the session, requested the search, ...).
      Returns:
      An entity loader.