Package org.mongolink.domain.criteria

Examples of org.mongolink.domain.criteria.Criteria.createQuery()


        AggregateMapper<FakeAggregate> mapper = (AggregateMapper<FakeAggregate>) context.mapperFor(FakeAggregate.class);
        Criteria criteria = new Criteria(mock(QueryExecutor.class));

        mapper.applyRestrictionsFor(FakeAggregate.class, criteria);

        DBObject query = criteria.createQuery();
        assertThat(query.get("$or"), notNullValue());
        BasicDBList or = (BasicDBList) query.get("$or");
        assertThat(or.size(), is(2));
    }
View Full Code Here


        AggregateMapper<FakeAggregate> mapper = (AggregateMapper<FakeAggregate>) context.mapperFor(FakeAggregate.class);
        Criteria criteria = new Criteria(mock(QueryExecutor.class));

        mapper.applyRestrictionsFor(FakeChildAggregate.class, criteria);

        DBObject query = criteria.createQuery();
        assertThat(query.get("$or"), notNullValue());
        BasicDBList or = (BasicDBList) query.get("$or");
        assertThat(or.size(), is(1));
    }
View Full Code Here

TOP
Copyright © 2015 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.