Interface ParameterAccessor
- All Known Implementing Classes:
ParametersParameterAccessor
Interface to access method parameters. Allows dedicated access to parameters of special types
- Author:
- Oliver Gierke, Mark Paluch
-
Method Summary
Modifier and TypeMethodDescription@Nullable Class<?>@Nullable ObjectgetBindableValue(int index) Returns the bindable value with the given index.default LimitgetLimit()default @Nullable ScoregetScore()@Nullable ScrollPositiongetSort()default @Nullable VectorbooleanReturns whether one of the bindable parameter values is null.iterator()Returns an iterator over all bindable parameters.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getVector
- Returns:
- the
Vectorof the parameters, if available; null otherwise. - Since:
- 4.0
-
getScore
- Returns:
- the
Scoreof the parameters, if available; null otherwise. - Since:
- 4.0
-
getScoreRange
-
getScrollPosition
@Nullable ScrollPosition getScrollPosition()- Returns:
- the
ScrollPositionof the parameters, if available; null otherwise.
-
getPageable
Pageable getPageable()- Returns:
- the
Pageableof the parameters, if available;Pageable.unpaged()otherwise.
-
getSort
Sort getSort()- Returns:
- the sort instance to be used for query creation. Will use a
Sortparameter if available or theSortcontained in aPageableif available.Sort.unsorted()if noSortcan be found.
-
getLimit
- Returns:
- the
Limitinstance to be used for query creation. If noParameterassignable toLimitcan be foundLimitwill be created out ofPageable.getPageSize()if present. - Since:
- 3.2
-
findDynamicProjection
@Nullable Class<?> findDynamicProjection()- Returns:
- the dynamic projection type to be used when executing the query or null if none is defined.
- Since:
- 2.2
-
getBindableValue
Returns the bindable value with the given index. Bindable means, thatPageableandSortvalues are skipped without noticed in the index. For a method signature takingString,Pageable,String,#getBindableParameter(1)would return the secondStringvalue.- Parameters:
index-- Returns:
- the bindable value with the given index
-
hasBindableNullValue
boolean hasBindableNullValue()Returns whether one of the bindable parameter values is null.- Returns:
- true if one of the bindable parameter values is null.
-
iterator
-