|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mysema.query.mongodb.MongodbQuery<K>
K - public class MongodbQuery<K>
MongodbQuery provides a general Querydsl query implementation with a pluugable DBObject to Bean transformation
| Constructor Summary | |
|---|---|
MongodbQuery(com.mongodb.DBCollection collection,
org.apache.commons.collections15.Transformer<com.mongodb.DBObject,K> transformer,
MongodbSerializer serializer)
|
|
| Method Summary | ||
|---|---|---|
long |
count()
Get the count of matched elements |
|
long |
countDistinct()
Get the count of distinct matched elements |
|
protected com.mongodb.DBCursor |
createCursor()
|
|
MongodbQuery<K> |
distinct()
Set the Query to return distinct results |
|
boolean |
exists()
|
|
com.mysema.commons.lang.CloseableIterator<K> |
iterate()
Get the projection as a typed closeable Iterator |
|
com.mysema.commons.lang.CloseableIterator<K> |
iterateDistinct()
Get the projection as a typed closeable Iterator with distinct elements |
|
MongodbQuery<K> |
limit(long limit)
Defines the limit / max results for the query results |
|
List<K> |
list()
Get the projection as a typed List |
|
List<K> |
listDistinct()
Get the projection as a typed List with distinct elements |
|
SearchResults<K> |
listDistinctResults()
Get the projection in SearchResults form with distinct element |
|
SearchResults<K> |
listResults()
Get the projection in SearchResults form |
|
boolean |
notExists()
|
|
MongodbQuery<K> |
offset(long offset)
Defines the offset for the query results |
|
MongodbQuery<K> |
orderBy(OrderSpecifier<?>... o)
Defines the order expressions |
|
MongodbQuery<K> |
restrict(QueryModifiers modifiers)
Defines both limit and offset of the query results |
|
|
set(ParamExpression<T> param,
T value)
Set the given parameter to the given value |
|
K |
singleResult()
Get the projection as a single result or null if no result is found |
|
String |
toString()
|
|
K |
uniqueResult()
Get the projection as a unique result or null if no result is found |
|
MongodbQuery<K> |
where(Predicate... e)
Adds the given filter conditions |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MongodbQuery(com.mongodb.DBCollection collection,
org.apache.commons.collections15.Transformer<com.mongodb.DBObject,K> transformer,
MongodbSerializer serializer)
| Method Detail |
|---|
public boolean exists()
exists in interface SimpleProjectable<K>public boolean notExists()
notExists in interface SimpleProjectable<K>public MongodbQuery<K> distinct()
SimpleQuery
distinct in interface SimpleQuery<MongodbQuery<K>>public MongodbQuery<K> where(Predicate... e)
FilteredClause
where in interface FilteredClause<MongodbQuery<K>>e - filter conditions to be added
public MongodbQuery<K> limit(long limit)
SimpleQuery
limit in interface SimpleQuery<MongodbQuery<K>>public MongodbQuery<K> offset(long offset)
SimpleQuery
offset in interface SimpleQuery<MongodbQuery<K>>public MongodbQuery<K> restrict(QueryModifiers modifiers)
SimpleQuery
restrict in interface SimpleQuery<MongodbQuery<K>>public MongodbQuery<K> orderBy(OrderSpecifier<?>... o)
SimpleQuery
orderBy in interface SimpleQuery<MongodbQuery<K>>
public <T> MongodbQuery<K> set(ParamExpression<T> param,
T value)
SimpleQuery
set in interface SimpleQuery<MongodbQuery<K>>public com.mysema.commons.lang.CloseableIterator<K> iterate()
SimpleProjectable
iterate in interface SimpleProjectable<K>public com.mysema.commons.lang.CloseableIterator<K> iterateDistinct()
SimpleProjectable
iterateDistinct in interface SimpleProjectable<K>public List<K> list()
SimpleProjectable
list in interface SimpleProjectable<K>protected com.mongodb.DBCursor createCursor()
public List<K> listDistinct()
SimpleProjectable
listDistinct in interface SimpleProjectable<K>public K singleResult()
SimpleProjectablefor multiple results only the first one is returned
singleResult in interface SimpleProjectable<K>public K uniqueResult()
SimpleProjectable
uniqueResult in interface SimpleProjectable<K>public SearchResults<K> listResults()
SimpleProjectableSearchResults form
listResults in interface SimpleProjectable<K>public SearchResults<K> listDistinctResults()
SimpleProjectableSearchResults form with distinct element
listDistinctResults in interface SimpleProjectable<K>public long count()
SimpleProjectable
count in interface SimpleProjectable<K>public long countDistinct()
SimpleProjectable
countDistinct in interface SimpleProjectable<K>public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||