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 ManagedTypesempty()Factory method used to construct a new instance ofManagedTypescontaining notypes.voidstatic ManagedTypesFactory method used to constructManagedTypesfrom the given array oftypes.static ManagedTypesfromIterable(Iterable<? extends Class<?>> types) static ManagedTypesfromStream(Stream<? extends Class<?>> types) static ManagedTypesfromSupplier(Supplier<Iterable<Class<?>>> dataProvider) Factory method used to constructManagedTypesfrom the given, requiredSupplierof anIterableoftypes.toList()Returns all theManagedTypesin aList.
-
Method Details
-
empty
Factory method used to construct a new instance ofManagedTypescontaining notypes.- Returns:
- an empty
ManagedTypesinstance. - See Also:
-
from
Factory method used to constructManagedTypesfrom the given array oftypes.- Parameters:
types- array oftypesused to initialize theManagedTypes; must not be null.- Returns:
- new instance of
ManagedTypesinitialized fromtypes.
-
fromIterable
- Parameters:
types-Iterableoftypesused to initialize theManagedTypes; must not be null.- Returns:
- new instance of
ManagedTypesinitialized the given, requiredIterableoftypes. - See Also:
-
fromStream
- Parameters:
types-Streamoftypesused to initialize theManagedTypes; must not be null.- Returns:
- new instance of
ManagedTypesinitialized the given, requiredStreamoftypes. - See Also:
-
fromSupplier
Factory method used to constructManagedTypesfrom the given, requiredSupplierof anIterableoftypes.- Parameters:
dataProvider-Supplierof anIterableoftypesused to lazily initialize theManagedTypes; must not be null.- Returns:
- new instance of
ManagedTypesinitialized the given, requiredSupplierof anIterableoftypes. - See Also:
-
forEach
- Parameters:
action-Consumerdefining the action to perform on thetypescontained in thisManagedTypesinstance; must not be null.- See Also:
-
toList
Returns all theManagedTypesin aList.- Returns:
- these
ManagedTypesin aList; never null. - See Also:
-