Spring Data Commons

org.springframework.data.repository.query
Interface ParameterAccessor

All Superinterfaces:
Iterable<Object>
All Known Implementing Classes:
ParametersParameterAccessor

public interface ParameterAccessor
extends Iterable<Object>

Interface to access method parameters. Allows dedicated access to parameters of special types

Author:
Oliver Gierke

Method Summary
 Object getBindableValue(int index)
          Returns the bindable value with the given index.
 Pageable getPageable()
          Returns the Pageable of the parameters, if available.
 Sort getSort()
          Returns the sort instance to be used for query creation.
 boolean hasBindableNullValue()
          Returns whether one of the bindable parameter values is null.
 Iterator<Object> iterator()
          Returns an iterator over all bindable parameters.
 

Method Detail

getPageable

Pageable getPageable()
Returns the Pageable of the parameters, if available. Returns null otherwise.

Returns:

getSort

Sort getSort()
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.

Returns:

getBindableValue

Object getBindableValue(int index)
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.

Parameters:
index -
Returns:

hasBindableNullValue

boolean hasBindableNullValue()
Returns whether one of the bindable parameter values is null.

Returns:

iterator

Iterator<Object> iterator()
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>
Returns:

Spring Data Commons

Copyright © 2012. All Rights Reserved.