Codota Logo
Page.getTotalPages
Code IndexAdd Codota to your IDE (free)

How to use
getTotalPages
method
in
com.haoxuer.discover.data.page.Page

Best Java code snippets using com.haoxuer.discover.data.page.Page.getTotalPages (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: com.haoxuer.discover/discover-common-hibernate

/**
 * 第一条数据位置
 *
 * @return
 */
public int getEndNo() {
 int result = 1;
 result = getPageNumber() + splitSize;
 if (getPageNumber() <= splitSize) {
  result = result + splitSize - getPageNumber();
  result++;
 } else {
 }
 if (result > getTotalPages()) {
  result = getTotalPages();
 }
 return result;
}
origin: com.haoxuer.discover/discover-common-hibernate

public static <R, S> void cover(AbstractPageVo<R> result, Page<S> pager) {
 result.setPage(pager.getPageNumber());
 result.setSize(pager.getPageSize());
 result.setTotal((int) pager.getTotal());
 result.setTotalPage(pager.getTotalPages());
}
origin: com.haoxuer.discover/discover-common-user-hibernate

public static <R, S> void cover(ResponsePage<R> result, Page<S> pager) {
 result.setNo(pager.getPageNumber());
 result.setSize(pager.getPageSize());
 result.setTotal((int) pager.getTotal());
 result.setTotalPage(pager.getTotalPages());
}
 
origin: com.haoxuer.discover/discover-common-config

public static <R, S> void cover(ResponsePage<R> result, Page<S> pager) {
 result.setNo(pager.getPageNumber());
 result.setSize(pager.getPageSize());
 result.setTotal((int) pager.getTotal());
 result.setTotalPage(pager.getTotalPages());
}
 
origin: com.haoxuer.discover/discover-user-notice

@Override
@Transactional
public UserNotification push(UserNotification bean) {
 bean.setStoreState(StoreState.normal);
 bean.setCategory(NotificationCategory.push);
 dao.save(bean);
 Integer total = 0;
 Pageable pageable = new Pageable();
 pageable.setPageSize(200);
 Page<User> page = userDao.page(pageable);
 total = total + sendUsers(bean, page);
 int totalPage = page.getTotalPages();
 for (int i = 2; i <= totalPage; i++) {
  pageable.setPageNumber(i);
  Page<User> pageData = userDao.page(pageable);
  total = total + sendUsers(bean, pageData);
 }
 bean.setNums(total);
 return bean;
}
com.haoxuer.discover.data.pagePagegetTotalPages

Javadoc

获取总页数

Popular methods of Page

  • getContent
    获取内容
  • getPageNumber
    获取页码
  • getPageSize
    获取每页记录数
  • getTotal
    获取总记录数
  • <init>
  • getEndNo
    第一条数据位置

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • orElseThrow (Optional)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • StringTokenizer (java.util)
    The string tokenizer class allows an application to break a string into tokens. The tokenization met
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now