Top Description Methods
org.hibernate.sql.results.graph

public Interface FetchList

extends Iterable<Fetch>
Known Direct Implementers
org.hibernate.sql.results.graph.internal.ImmutableFetchList
Annotations
@Incubating
Imports
java.util.function.Consumer, java.util.stream.Stream, .StreamSupport, org.hibernate.Incubating, org.hibernate.engine.FetchTiming, org.hibernate.internal.util.IndexedConsumer, org.hibernate.sql.results.graph.basic.BasicFetch, org.hibernate.sql.results.graph.collection.internal.EagerCollectionFetch, org.hibernate.sql.results.graph.embeddable.EmbeddableResultGraphNode, org.hibernate.sql.results.graph.entity.internal.AbstractNonJoinedEntityFetch

This is essentially a List of Fetch(es), but exposing an interface which is more suitable to our needs; in particular it expresses the immutable nature of this structure, and allows us to extend it with additional convenience methods such as indexedForEach(IndexedConsumer). And additional reason for the custom interface is to allow custom implementations which can be highly optimised as necessary for our specific needs; for example the implementation org.hibernate.sql.results.graph.internal.ImmutableFetchList is able to avoid caching problems related to JDK-8180450, which would not have been possible with a standard generic container.
Since
6.2

Method Summary

Modifier and TypeMethod and Description
public default boolean
public void
forEach(Consumer<? super Fetch>
The action to be performed for each element
consumer
)

Redeclares as abstract: java.lang.Iterable.forEach.

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception.
public Fetch
get(Fetchable fetchable)

public default boolean
public void
public boolean
public int
size()

public default Stream<Fetch>
Inherited from java.lang.Iterable:
iteratorspliterator

Method Detail

containsCollectionFetchesback to summary
public default boolean containsCollectionFetches()
forEachback to summary
public void forEach(Consumer<? super Fetch> consumer)

Redeclares as abstract: java.lang.Iterable.forEach.

Doc from java.lang.Iterable.forEach.

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception. Actions are performed in the order of iteration, if that order is specified. Exceptions thrown by the action are relayed to the caller.

The behavior of this method is unspecified if the action performs side-effects that modify the underlying source of elements, unless an overriding class has specified a concurrent modification policy.

Parameters
consumer:Consumer<? super Fetch>

The action to be performed for each element

getback to summary
public Fetch get(Fetchable fetchable)
hasJoinFetchesback to summary
public default boolean hasJoinFetches()
indexedForEachback to summary
public void indexedForEach(IndexedConsumer<? super Fetch> consumer)
isEmptyback to summary
public boolean isEmpty()
sizeback to summary
public int size()
streamback to summary
public default Stream<Fetch> stream()