spring mongodb 分页查询

spring mongodb 分页查询

 

public Pager findByPager(Pager pager) {
        int pageNumber = pager.getPageNumber();
        int pageSize = pager.getPageSize();
        List<DBObject> objects = articleCollection.find().skip((pageNumber - 1) * pageSize).limit(pageSize).toArray();
        pager.setRows(objects);
        pager.setTotal(this.count());
        return pager;
    }

 http://blog.csdn.net/chunqiuwei/article/details/11156487

 

mongdb在java中的应用

http://blog.csdn.net/shiyuezhong/article/details/7952878

 

http://blog.mkfree.com/posts/47 不错的例子

 

http://www.phpcode8.com/java/java-mongodb/java-mongodb-query-document.html

Spring整合- mongodb

 

http://blog.csdn.net/java2000_wl/article/details/7983547

你可能感兴趣的:(mongodb)