T- the composite type of entity types
public interface Join<T>
Streamover joined Tuples of entities in the underlying data source (e.g database).
The order in which elements are returned when the stream is eventually consumed is unspecified. The order may even change from one invocation to another. Thus, it is an error to assume any particular element order even though is might appear, for some stream sources, that there is a de-facto order.
For Joins obtained via the default
method, elements appearing in the stream may be deeply immutable
meaning that Tuples in the stream are immutable and that entities
contained in these Tuples may also be immutable. Thus, it is an error to
invoke setters on any objects obtained directly or indirectly from the
stream elements. If mutable objects are needed, the immutable objects
must be used to create a new mutable object.
The Stream will never contain
This is an inexpensive O(1) operation that will complete in constant time regardless of the number of entities in the underlying database.
The returned stream is aware of its own pipeline and will optionally optimize its own pipeline whenever it encounters a Terminal Operation so that it will only iterate over a minimum set of matching entities.
When a Terminal Operation is eventually called on the
that execution time of the Terminal Operation will depend on the
optimized pipeline and the entities in the underlying database.
The Stream will be automatically
closed after the Terminal
Operation is completed or if an Exception is thrown during the Terminal
Any Terminating Operation may throw a
SpeedmentException if the
underlying database throws an Exception (e.g. an SqlException)
Because the Stream may short-circuit operations in the Stream pipeline,
methods having side-effects (like
potentially be affected by the optimization.
Copyright © 2019 Speedment, Inc.. All rights reserved.