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 QueryMethod

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

    public class QueryMethod

extends Object

Abstraction of a method that is designated to execute a finder query. Enriches the standard `Method` interface with specific information that is necessary to construct `RepositoryQuery`s for the method.

Author:
  Oliver Gierke

Nested Class Summary
`static class` | `QueryMethod.Type`

Constructor Summary
`QueryMethod(Method method, RepositoryMetadata metadata)` Creates a new `QueryMethod` from the given parameters.

Method Summary
`protected Class<?>` | `getDomainClass()`
`EntityMetadata<?>` | `getEntityInformation()`
`String` | `getName()` Returns the method's name.
`String` | `getNamedQueryName()` Returns the name of the named query this method belongs to.
`Parameters` | `getParameters()` Returns the `Parameters` wrapper to gain additional information about `Method` parameters.
`QueryMethod.Type` | `getType()`
`protected boolean` | `isCollectionQuery()` Returns whether the finder will actually return a collection of entities or a single one.
`protected boolean` | `isModifyingQuery()`
`protected boolean` | `isPageQuery()` Returns whether the finder will return a `Page` of results.
`String` | `toString()`

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

Constructor Detail

### QueryMethod

    public QueryMethod(Method method,
                       RepositoryMetadata metadata)

  Creates a new `QueryMethod` from the given parameters. Looks up the correct query to use for following invocations of the method given.

  Parameters:
    `method` - must not be null

Method Detail

### getName

    public String getName()

  Returns the method's name.

  Returns:

### getEntityInformation

    public EntityMetadata<?> getEntityInformation()

### getNamedQueryName

    public String getNamedQueryName()

  Returns the name of the named query this method belongs to.

  Returns:

### getDomainClass

    protected Class<?> getDomainClass()

### isCollectionQuery

    protected boolean isCollectionQuery()

  Returns whether the finder will actually return a collection of entities or a single one.

  Returns:

### isPageQuery

    protected boolean isPageQuery()

  Returns whether the finder will return a `Page` of results.

  Returns:

### getType

    public QueryMethod.Type getType()

### isModifyingQuery

    protected boolean isModifyingQuery()

### getParameters

    public Parameters getParameters()

  Returns the `Parameters` wrapper to gain additional information about `Method` parameters.

  Returns:

### 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.