Spring Data Commmons

org.springframework.data.repository.query
Class SimpleParameterAccessor

java.lang.Object
  extended by org.springframework.data.repository.query.SimpleParameterAccessor

public class SimpleParameterAccessor
extends Object

SimpleParameterAccessor is used to bind method parameters.

Author:
Oliver Gierke

Nested Class Summary
 class SimpleParameterAccessor.BindableParameterIterator
          Iterator class to allow traversing all bindable parameters inside the accessor.
 
Constructor Summary
SimpleParameterAccessor(Parameters parameters, Object[] values)
          Creates a new SimpleParameterAccessor.
 
Method Summary
 Pageable getPageable()
          Returns the Pageable of the parameters, if available.
 Sort getSort()
          Returns the sort instance to be used for query creation.
 SimpleParameterAccessor.BindableParameterIterator iterator()
          Returns a SimpleParameterAccessor.BindableParameterIterator to traverse all bindable parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleParameterAccessor

public SimpleParameterAccessor(Parameters parameters,
                               Object[] values)
Creates a new SimpleParameterAccessor.

Parameters:
parameters -
values -
Method Detail

getPageable

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

Returns:

getSort

public 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:

iterator

public SimpleParameterAccessor.BindableParameterIterator iterator()
Returns a SimpleParameterAccessor.BindableParameterIterator to traverse all bindable parameters.

Returns:

Spring Data Commmons

Copyright © 2011. All Rights Reserved.