Package com.jdkcn.myblog.util

Examples of com.jdkcn.myblog.util.Range


    }
    int start = 0;
    if (p != null && p > 1) {
      start = (p - 1) * size;
    }
    Range range = new Range(start, size);
    ps = entryService.search(condition, range, new Sorter().desc("createDate"));
    entries = ps.getItems();
  }
View Full Code Here


    String content = "Content";
    for (int i = 0; i < 30; i++) {
      createEntry(title + i, content + i);
    }
    EntryCondition condition = new EntryCondition();
    PaginationSupport<Entry> ps = entryService.search(condition, new Range(0, 10), new Sorter().asc("publishDate"));
    assertEquals(30, ps.getTotalCount());
   
    title = "Android";
    for (int j = 0; j < 5; j ++) {
      createEntry(title + j, content + j);
    }
   
    condition.setKeyword("Android");
    ps = entryService.search(condition, new Range(0, 5), new Sorter().asc("title"));
    assertEquals(5, ps.getTotalCount());
  }
View Full Code Here

TOP

Related Classes of com.jdkcn.myblog.util.Range

Copyright © 2018 www.massapicom. 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.