public class QueryMethod extends Object
Method
interface
with specific information that is necessary to construct RepositoryQuery
s for the method.Constructor and Description |
---|
QueryMethod(Method method,
RepositoryMetadata metadata,
ProjectionFactory factory)
Creates a new
QueryMethod from the given parameters. |
Modifier and Type | Method and Description |
---|---|
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. |
ResultProcessor |
getResultProcessor()
Returns the
ResultProcessor to be used with the query method. |
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 this method actually returns entities.
|
boolean |
isSliceQuery()
Returns whether the query method will return a
Slice . |
boolean |
isStreamQuery()
Returns whether the method returns a Stream.
|
String |
toString() |
public QueryMethod(Method method, RepositoryMetadata metadata, ProjectionFactory factory)
QueryMethod
from the given parameters. Looks up the correct query to use for following
invocations of the method given.method
- must not be null.metadata
- must not be null.factory
- must not be null.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 isSliceQuery()
Slice
.public final boolean isPageQuery()
Page
of results.public boolean isModifyingQuery()
public boolean isQueryForEntity()
public boolean isStreamQuery()
public Parameters<?,?> getParameters()
Parameters
wrapper to gain additional information about Method
parameters.public ResultProcessor getResultProcessor()
ResultProcessor
to be used with the query method.Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.