Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring Data Commons
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.data.repository.query
Class Parameter

    java.lang.Object
      org.springframework.data.repository.query.Parameter

    public final class Parameter

extends Object

Class to abstract a single parameter of a query method. It is held in the context of a `Parameters` instance.

Author:
  Oliver Gierke

Method Summary
`int` | `getIndex()` Returns the position index the parameter is bound to in the context of its surrounding `Parameters`.
`String` | `getName()` Returns the name of the parameter (through `Param` annotation) or null if none can be found.
`Parameter` | `getNext()` Returns the next `Parameter` from the surrounding `Parameters`.
`String` | `getPlaceholder()` Returns the placeholder to be used for the parameter.
`Class<?>` | `getType()` Returns the type of the `Parameter`.
`boolean` | `isBindable()` Returns whether the `Parameter` is to be bound to a query.
`boolean` | `isNamedParameter()` Returns whether the parameter is annotated with `Param`.
`boolean` | `isSpecialParameter()` Returns whether the parameter is a special parameter.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Method Detail

### getNext

    public Parameter getNext()

  Returns the next `Parameter` from the surrounding `Parameters`.

  Returns:
  Throws:
    `ParameterOutOfBoundsException`

### isSpecialParameter

    public boolean isSpecialParameter()

  Returns whether the parameter is a special parameter.

  Parameters:
    `index` -
  Returns:
  See Also:
    `TYPES`

### isBindable

    public boolean isBindable()

  Returns whether the `Parameter` is to be bound to a query.

  Returns:

### getPlaceholder

    public String getPlaceholder()

  Returns the placeholder to be used for the parameter. Can either be a named one or positional.

  Parameters:
    `index` -
  Returns:

### getIndex

    public int getIndex()

  Returns the position index the parameter is bound to in the context of its surrounding `Parameters`.

  Returns:

### isNamedParameter

    public boolean isNamedParameter()

  Returns whether the parameter is annotated with `Param`.

  Parameters:
    `index` -
  Returns:

### getName

    public String getName()

  Returns the name of the parameter (through `Param` annotation) or null if none can be found.

  Returns:

### getType

    public Class<?> getType()

  Returns the type of the `Parameter`.

  Returns:
    the type

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Spring Data Commons
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011. All Rights Reserved.