org.springframework.data.repository.query

## Class ParametersParameterAccessor

- java.lang.Object
- - org.springframework.data.repository.query.ParametersParameterAccessor

All Implemented Interfaces:
  Iterable<Object>, ParameterAccessor

    public class ParametersParameterAccessor
    extends Object
    implements ParameterAccessor

`ParameterAccessor` implementation using a `Parameters` instance to find special parameters.

Author:
  Oliver Gierke, Mark Paluch

### Constructor Summary

Constructors
Constructor and Description
`ParametersParameterAccessor(Parameters<?,?> parameters, Object[] values)` Creates a new `ParametersParameterAccessor`.

### Method Summary

All Methods Instance Methods Concrete Methods
`Class<?>` `findDynamicProjection()` Returns the dynamic projection type if available, null otherwise.
`Object` `getBindableValue(int index)` Returns the bindable value with the given index.
`Optional<Class<?>>` `getDynamicProjection()` Returns the dynamic projection type if available, null otherwise.
`Pageable` `getPageable()` Returns the `Pageable` of the parameters, if available.
`Parameters<?,?>` `getParameters()` Returns the `Parameters` instance backing the accessor.
`Sort` `getSort()` Returns the sort instance to be used for query creation.
`protected <T> T` `getValue(int index)` Returns the value with the given index.
`protected Object[]` `getValues()` Returns the potentially unwrapped values.
`boolean` `hasBindableNullValue()` Returns whether one of the bindable parameter values is null.
`org.springframework.data.repository.query.ParametersParameterAccessor.BindableParameterIterator` `iterator()` Returns an iterator over all bindable parameters.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

### Constructor Detail

#### ParametersParameterAccessor

    public ParametersParameterAccessor(Parameters<?,?> parameters,
                                       Object[] values)

Creates a new `ParametersParameterAccessor`.

Parameters:
  `parameters` - must not be null.
  `values` - must not be null.

### Method Detail

#### getParameters

    public Parameters<?,?> getParameters()

Returns the `Parameters` instance backing the accessor.

Returns:
  the parameters will never be null.

#### getValues

    protected Object[] getValues()

Returns the potentially unwrapped values.

Returns:

#### getPageable

    public Pageable getPageable()

Description copied from interface: `ParameterAccessor`
Returns the `Pageable` of the parameters, if available. Returns `null` otherwise.

Specified by:
  `getPageable` in interface `ParameterAccessor`
Returns:

#### getSort

    public Sort getSort()

Description copied from interface: `ParameterAccessor`
Returns the sort instance to be used for query creation. Will use a `Sort` parameter if available or the `Sort` contained in a `Pageable` if available. Returns `null` if no `Sort` can be found.

Specified by:
  `getSort` in interface `ParameterAccessor`
Returns:

#### getDynamicProjection

    public Optional<Class<?>> getDynamicProjection()

Returns the dynamic projection type if available, null otherwise.

Specified by:
  `getDynamicProjection` in interface `ParameterAccessor`
Returns:

#### findDynamicProjection

    @Nullable
    public Class<?> findDynamicProjection()

Returns the dynamic projection type if available, null otherwise.

Specified by:
  `findDynamicProjection` in interface `ParameterAccessor`
Returns:

#### getValue

    protected <T> T getValue(int index)

Returns the value with the given index.

Parameters:
  `index` -
Returns:

#### getBindableValue

    public Object getBindableValue(int index)

Description copied from interface: `ParameterAccessor`
Returns the bindable value with the given index. Bindable means, that `Pageable` and `Sort` values are skipped without noticed in the index. For a method signature taking `String`, `Pageable` , `String`, `#getBindableParameter(1)` would return the second `String` value.

Specified by:
  `getBindableValue` in interface `ParameterAccessor`
Returns:

#### hasBindableNullValue

    public boolean hasBindableNullValue()

Description copied from interface: `ParameterAccessor`
Returns whether one of the bindable parameter values is null.

Specified by:
  `hasBindableNullValue` in interface `ParameterAccessor`
Returns:

#### iterator

    public org.springframework.data.repository.query.ParametersParameterAccessor.BindableParameterIterator iterator()

Description copied from interface: `ParameterAccessor`
Returns an iterator over all bindable parameters. This means parameters implementing `Pageable` or `Sort` will not be included in this `Iterator`.

Specified by:
  `iterator` in interface `Iterable<Object>`
Specified by:
  `iterator` in interface `ParameterAccessor`