Spring Data Document

org.springframework.data.mongodb.repository.query
Class AbstractMongoQuery

java.lang.Object
  extended by org.springframework.data.mongodb.repository.query.AbstractMongoQuery
All Implemented Interfaces:
org.springframework.data.repository.query.RepositoryQuery
Direct Known Subclasses:
PartTreeMongoQuery, StringBasedMongoQuery

public abstract class AbstractMongoQuery
extends Object
implements org.springframework.data.repository.query.RepositoryQuery

Base class for RepositoryQuery implementations for Mongo.

Author:
Oliver Gierke

Constructor Summary
AbstractMongoQuery(MongoQueryMethod method, MongoOperations operations)
          Creates a new AbstractMongoQuery from the given MongoQueryMethod and MongoOperations.
 
Method Summary
protected  Query createCountQuery(ConvertingParameterAccessor accessor)
          Creates a Query instance using the given ConvertingParameterAccessor.
protected abstract  Query createQuery(ConvertingParameterAccessor accessor)
          Creates a Query instance using the given ParameterAccessor
 Object execute(Object[] parameters)
           
 MongoQueryMethod getQueryMethod()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMongoQuery

public AbstractMongoQuery(MongoQueryMethod method,
                          MongoOperations operations)
Creates a new AbstractMongoQuery from the given MongoQueryMethod and MongoOperations.

Parameters:
method - must not be null.
operations - must not be null.
Method Detail

getQueryMethod

public MongoQueryMethod getQueryMethod()
Specified by:
getQueryMethod in interface org.springframework.data.repository.query.RepositoryQuery

execute

public Object execute(Object[] parameters)
Specified by:
execute in interface org.springframework.data.repository.query.RepositoryQuery

createQuery

protected abstract Query createQuery(ConvertingParameterAccessor accessor)
Creates a Query instance using the given ParameterAccessor

Parameters:
accessor - must not be null.
Returns:

createCountQuery

protected Query createCountQuery(ConvertingParameterAccessor accessor)
Creates a Query instance using the given ConvertingParameterAccessor. Will delegate to createQuery(ConvertingParameterAccessor) by default but allows customization of the count query to be triggered.

Parameters:
accessor - must not be null.
Returns:

Spring Data Document

Copyright © 2012. All Rights Reserved.