@@ -0,0 +1,1610 @@
+/*%0A * Copyright (c) www.bugull.com%0A * %0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.bugull.mongo.crud;%0A%0Aimport com.bugull.mongo.BuguMapper;%0Aimport com.bugull.mongo.BuguQuery;%0Aimport com.bugull.mongo.aggregation.BookDao;%0Aimport com.bugull.mongo.base.ReplicaSetBaseTest;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Date;%0Aimport org.junit.Test;%0A%0A/**%0A *%0A * @author Frank Wen(xbwen@hotmail.com)%0A */%0Apublic class DateQueryTest extends ReplicaSetBaseTest %7B%0A    %0A    @Test%0A    public void test() throws Exception %7B%0A        connectDB();%0A        %0A        BookDao dao = new BookDao();%0A        %0A        SimpleDateFormat sdf = new SimpleDateFormat(%22yyyy-MM-dd HH:mm:ss%22);%0A        Date begin = sdf.parse(%222016-04-04 00:00:00%22);%0A        %0A        BuguQuery query = dao.query().lessThan(%22publishDate%22, new Date()).greaterThan(%22publishDate%22, begin);%0A        %0A        System.out.println(%22json: %22 + BuguMapper.toJsonString(query.getCondition()));%0A        %0A        long count = query.count();%0A        %0A        System.out.println(%22count: %22 + count);%0A        %0A        disconnectDB();%0A    %7D%0A    %0A%7D%0A

add DateQueryTest