Package org.springframework.data.domain
Interface ManagedTypes
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Types managed by a Spring Data implementation. Used to predefine a set of known entities that might need processing
during the initialization phase.
- Since:
- 3.0
- Author:
- Christoph Strobl, John Blum, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescriptionstatic ManagedTypes
empty()
Factory method used to construct a new instance ofManagedTypes
containing notypes
.void
static ManagedTypes
Factory method used to constructManagedTypes
from the given array oftypes
.static ManagedTypes
fromIterable
(Iterable<? extends Class<?>> types) static ManagedTypes
fromStream
(Stream<? extends Class<?>> types) static ManagedTypes
fromSupplier
(Supplier<Iterable<Class<?>>> dataProvider) Factory method used to constructManagedTypes
from the given, requiredSupplier
of anIterable
oftypes
.toList()
Returns all theManagedTypes
in aList
.
-
Method Details
-
empty
Factory method used to construct a new instance ofManagedTypes
containing notypes
.- Returns:
- an empty
ManagedTypes
instance. - See Also:
-
from
Factory method used to constructManagedTypes
from the given array oftypes
.- Parameters:
types
- array oftypes
used to initialize theManagedTypes
; must not be null.- Returns:
- new instance of
ManagedTypes
initialized fromtypes
.
-
fromIterable
- Parameters:
types
-Iterable
oftypes
used to initialize theManagedTypes
; must not be null.- Returns:
- new instance of
ManagedTypes
initialized the given, requiredIterable
oftypes
. - See Also:
-
fromStream
- Parameters:
types
-Stream
oftypes
used to initialize theManagedTypes
; must not be null.- Returns:
- new instance of
ManagedTypes
initialized the given, requiredStream
oftypes
. - See Also:
-
fromSupplier
Factory method used to constructManagedTypes
from the given, requiredSupplier
of anIterable
oftypes
.- Parameters:
dataProvider
-Supplier
of anIterable
oftypes
used to lazily initialize theManagedTypes
; must not be null.- Returns:
- new instance of
ManagedTypes
initialized the given, requiredSupplier
of anIterable
oftypes
. - See Also:
-
forEach
- Parameters:
action
-Consumer
defining the action to perform on thetypes
contained in thisManagedTypes
instance; must not be null.- See Also:
-
toList
Returns all theManagedTypes
in aList
.- Returns:
- these
ManagedTypes
in aList
; never null. - See Also:
-