com.mysema.query.mongodb
Class MongodbSerializer

java.lang.Object
  extended by com.mysema.query.mongodb.MongodbSerializer
All Implemented Interfaces:
Visitor<Object,Void>
Direct Known Subclasses:
MorphiaSerializer

public class MongodbSerializer
extends Object
implements Visitor<Object,Void>

Serializes the given Querydsl query to a DBObject query for MongoDB

Author:
laimw

Field Summary
static MongodbSerializer DEFAULT
           
 
Constructor Summary
MongodbSerializer()
           
 
Method Summary
protected  com.mongodb.DBObject asDBObject(String key, Object value)
           
protected  String getKeyForPath(Path<?> expr, PathMetadata<?> metadata)
           
 Object handle(Expression<?> expression)
           
 com.mongodb.DBObject toSort(List<OrderSpecifier<?>> orderBys)
           
 Object visit(Constant<?> expr, Void context)
           
 Object visit(FactoryExpression<?> expr, Void context)
           
 Object visit(Operation<?> expr, Void context)
           
 Object visit(ParamExpression<?> expr, Void context)
           
 Object visit(Path<?> expr, Void context)
           
 Object visit(SubQueryExpression<?> expr, Void context)
           
 Object visit(TemplateExpression<?> expr, Void context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final MongodbSerializer DEFAULT
Constructor Detail

MongodbSerializer

public MongodbSerializer()
Method Detail

handle

public Object handle(Expression<?> expression)

toSort

public com.mongodb.DBObject toSort(List<OrderSpecifier<?>> orderBys)

visit

public Object visit(Constant<?> expr,
                    Void context)
Specified by:
visit in interface Visitor<Object,Void>

visit

public Object visit(TemplateExpression<?> expr,
                    Void context)
Specified by:
visit in interface Visitor<Object,Void>

visit

public Object visit(FactoryExpression<?> expr,
                    Void context)
Specified by:
visit in interface Visitor<Object,Void>

asDBObject

protected com.mongodb.DBObject asDBObject(String key,
                                          Object value)

visit

public Object visit(Operation<?> expr,
                    Void context)
Specified by:
visit in interface Visitor<Object,Void>

visit

public Object visit(Path<?> expr,
                    Void context)
Specified by:
visit in interface Visitor<Object,Void>

getKeyForPath

protected String getKeyForPath(Path<?> expr,
                               PathMetadata<?> metadata)

visit

public Object visit(SubQueryExpression<?> expr,
                    Void context)
Specified by:
visit in interface Visitor<Object,Void>

visit

public Object visit(ParamExpression<?> expr,
                    Void context)
Specified by:
visit in interface Visitor<Object,Void>


Copyright © 2007-2012 Mysema Ltd. All Rights Reserved.