|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.repository.query.QueryMethod
public class QueryMethod
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.
Constructor Summary | |
---|---|
QueryMethod(Method method,
RepositoryMetadata metadata)
Creates a new QueryMethod from the given parameters. |
Method Summary | |
---|---|
protected Parameters<?,?> |
createParameters(Method method)
Creates a Parameters instance. |
protected Class<?> |
getDomainClass()
Returns the domain class the query method is targeted at. |
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. |
Class<?> |
getReturnedObjectType()
Returns the type of the object that will be returned. |
boolean |
isCollectionQuery()
Returns whether the finder will actually return a collection of entities or a single one. |
boolean |
isModifyingQuery()
Returns whether the query method is a modifying one. |
boolean |
isPageQuery()
Returns whether the finder will return a Page of results. |
boolean |
isQueryForEntity()
Returns whether the query for theis method actually returns entities. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QueryMethod(Method method, RepositoryMetadata metadata)
QueryMethod
from the given parameters. Looks up the correct query to use for following
invocations of the method given.
method
- must not be nullmetadata
- must not be nullMethod Detail |
---|
protected Parameters<?,?> createParameters(Method method)
Parameters
instance.
method
-
public String getName()
public EntityMetadata<?> getEntityInformation()
public String getNamedQueryName()
protected Class<?> getDomainClass()
public Class<?> getReturnedObjectType()
public boolean isCollectionQuery()
public boolean isPageQuery()
Page
of results.
public boolean isModifyingQuery()
public boolean isQueryForEntity()
public Parameters<?,?> getParameters()
Parameters
wrapper to gain additional information about Method
parameters.
public String toString()
toString
in class Object
|
Spring Data Core | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |