Class RepositoryFragment.ImplementedRepositoryFragment<T>
java.lang.Object
org.springframework.data.repository.core.support.RepositoryFragment.ImplementedRepositoryFragment<T>
- All Implemented Interfaces:
RepositoryFragment<T>
- Enclosing interface:
RepositoryFragment<T>
public static class RepositoryFragment.ImplementedRepositoryFragment<T>
extends Object
implements RepositoryFragment<T>
- Since:
- 2.0
- Author:
- Mark Paluch, Christoph Strobl
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.repository.core.support.RepositoryFragment
RepositoryFragment.ImplementedRepositoryFragment<T>, RepositoryFragment.StructuralRepositoryFragment<T> -
Constructor Summary
ConstructorsConstructorDescriptionImplementedRepositoryFragment(@Nullable Class<T> interfaceClass, T implementation) Creates a newRepositoryFragment.ImplementedRepositoryFragmentfor the given interface class and implementation. -
Method Summary
Modifier and TypeMethodDescriptionbooleanfindMethods(String name) Find methods that match the given name.Class<?> inthashCode()booleanAttempt to find theMethodby name and exact parameters.methods()toString()withImplementation(T implementation) Implement a structuralRepositoryFragmentgiven itsimplementationobject.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.data.repository.core.support.RepositoryFragment
getImplementationClass
-
Constructor Details
-
ImplementedRepositoryFragment
Creates a newRepositoryFragment.ImplementedRepositoryFragmentfor the given interface class and implementation.- Parameters:
interfaceClass- must not be null.implementation- must not be null.
-
-
Method Details
-
getSignatureContributor
- Specified by:
getSignatureContributorin interfaceRepositoryFragment<T>- Returns:
- the class/interface providing signatures for this
RepositoryFragment.
-
methods
- Specified by:
methodsin interfaceRepositoryFragment<T>- Returns:
- a
Streamof methods exposed by thisRepositoryFragment.
-
findMethods
Description copied from interface:RepositoryFragmentFind methods that match the given name. The method name must be exact.- Specified by:
findMethodsin interfaceRepositoryFragment<T>- Parameters:
name- the method name.- Returns:
- list of candidate methods.
-
hasMethod
Description copied from interface:RepositoryFragmentAttempt to find theMethodby name and exact parameters. Returns true if the method was found or false otherwise.- Specified by:
hasMethodin interfaceRepositoryFragment<T>- Parameters:
method- must not be null.- Returns:
- true if the method was found or false otherwise
-
getImplementation
- Specified by:
getImplementationin interfaceRepositoryFragment<T>- Returns:
- the optional implementation. Only available for implemented fragments. Structural fragments return always
Optional.empty().
-
withImplementation
Description copied from interface:RepositoryFragmentImplement a structuralRepositoryFragmentgiven itsimplementationobject. Returns an implementedRepositoryFragment.- Specified by:
withImplementationin interfaceRepositoryFragment<T>- Parameters:
implementation- must not be null.- Returns:
- a new implemented
RepositoryFragmentforimplementation.
-
toString
-
equals
-
hashCode
-