Class JpaParameters
java.lang.Object
org.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
com.blazebit.persistence.spring.data.base.query.JpaParameters
- All Implemented Interfaces:
Iterable<JpaParameters.JpaParameter>,Supplier<Stream<JpaParameters.JpaParameter>>,org.springframework.data.util.Streamable<JpaParameters.JpaParameter>
public class JpaParameters
extends org.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
Custom extension of
Parameters discovering additional query parameter annotations.
Christian Beikov: Copied to be able to share code between Spring Data integrations for 1.x and 2.x.- Since:
- 1.6.9
- Author:
- Thomas Darimont, Mark Paluch, Eugen Mayer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCustomParameterimplementation adding parameters of typeTemporalto the special ones. -
Field Summary
Fields inherited from class org.springframework.data.repository.query.Parameters
TYPES -
Constructor Summary
ConstructorsConstructorDescriptionJpaParameters(Method method) Creates a newJpaParametersinstance from the givenMethod. -
Method Summary
Modifier and TypeMethodDescriptionprotected JpaParameterscreateFrom(List<JpaParameters.JpaParameter> parameters) protected JpaParameters.JpaParametercreateParameter(org.springframework.core.MethodParameter parameter) intReturns the index of theBlazeSpecificationMethodparameter if available.intReturns the index of theEntityViewSettingProcessorMethodparameter if available.Gets the parameters annotated withOptionalParam.intintReturns the index of theSpecificationMethodparameter if available.booleanReturns whether the method theParameterswas created for contains aBlazeSpecificationparameter.booleanReturns whether the method theParameterswas created for contains aEntityViewSettingProcessorparameter.booleanbooleanReturns whether the method theParameterswas created for contains aSpecificationparameter.Methods inherited from class org.springframework.data.repository.query.Parameters
getBindableParameter, getBindableParameters, getDynamicProjectionIndex, getNumberOfParameters, getParameter, getScrollPositionIndex, getSortIndex, hasDynamicProjection, hasParameterAt, hasScrollPositionParameter, hasSortParameter, hasSpecialParameter, isBindable, iterator, potentiallySortsDynamicallyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.springframework.data.util.Streamable
and, and, and, and, filter, flatMap, get, isEmpty, map, stream, toList, toSet
-
Constructor Details
-
JpaParameters
Creates a newJpaParametersinstance from the givenMethod.- Parameters:
method- must not be null.
-
-
Method Details
-
hasPageableParameter
public boolean hasPageableParameter()- Overrides:
hasPageableParameterin classorg.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
-
getPageableIndex
public int getPageableIndex()- Overrides:
getPageableIndexin classorg.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
-
getOptionalParameters
Gets the parameters annotated withOptionalParam.- Returns:
- the optional parameters
-
getSpecificationIndex
public int getSpecificationIndex()Returns the index of theSpecificationMethodparameter if available. Will return -1 if there is noSpecificationparameter in theMethod's parameter list.- Returns:
- the index of the specification parameter, or -1 if not present
-
hasSpecificationParameter
public boolean hasSpecificationParameter()Returns whether the method theParameterswas created for contains aSpecificationparameter.- Returns:
- true if the methods has a specification parameter
-
getEntityViewSettingProcessorIndex
public int getEntityViewSettingProcessorIndex()Returns the index of theEntityViewSettingProcessorMethodparameter if available. Will return -1 if there is noEntityViewSettingProcessorparameter in theMethod's parameter list.- Returns:
- the index of the processor parameter, or -1 if not present
-
hasEntityViewSettingProcessorParameter
public boolean hasEntityViewSettingProcessorParameter()Returns whether the method theParameterswas created for contains aEntityViewSettingProcessorparameter.- Returns:
- true if the methods has a processor parameter
-
getBlazeSpecificationIndex
public int getBlazeSpecificationIndex()Returns the index of theBlazeSpecificationMethodparameter if available. Will return -1 if there is noBlazeSpecificationparameter in theMethod's parameter list.- Returns:
- the index of the processor parameter, or -1 if not present
-
hasBlazeSpecificationParameter
public boolean hasBlazeSpecificationParameter()Returns whether the method theParameterswas created for contains aBlazeSpecificationparameter.- Returns:
- true if the methods has a processor parameter
-
createParameter
protected JpaParameters.JpaParameter createParameter(org.springframework.core.MethodParameter parameter) - Overrides:
createParameterin classorg.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
-
createFrom
- Specified by:
createFromin classorg.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
-