Search in sources :

Example 1 with MorphiaSerializer

use of com.querydsl.mongodb.morphia.MorphiaSerializer in project querydsl by querydsl.

the class MongodbSerializerTest method before.

@Before
public void before() {
    serializer = new MorphiaSerializer(new Morphia());
    entityPath = new PathBuilder<Object>(Object.class, "obj");
    title = entityPath.getString("title");
    year = entityPath.getNumber("year", Integer.class);
    gross = entityPath.getNumber("gross", Double.class);
    longField = entityPath.getNumber("longField", Long.class);
    shortField = entityPath.getNumber("shortField", Short.class);
    byteField = entityPath.getNumber("byteField", Byte.class);
    floatField = entityPath.getNumber("floatField", Float.class);
    date = entityPath.getDate("date", Date.class);
    dateTime = entityPath.getDateTime("dateTime", Timestamp.class);
}
Also used : MorphiaSerializer(com.querydsl.mongodb.morphia.MorphiaSerializer) Morphia(org.mongodb.morphia.Morphia) BasicDBObject(com.mongodb.BasicDBObject) DBObject(com.mongodb.DBObject) Timestamp(java.sql.Timestamp) Date(java.util.Date) Before(org.junit.Before)

Aggregations

BasicDBObject (com.mongodb.BasicDBObject)1 DBObject (com.mongodb.DBObject)1 MorphiaSerializer (com.querydsl.mongodb.morphia.MorphiaSerializer)1 Timestamp (java.sql.Timestamp)1 Date (java.util.Date)1 Before (org.junit.Before)1 Morphia (org.mongodb.morphia.Morphia)1