org.jiucai.appframework.base.util
类 CommonUtil

java.lang.Object
  继承者 org.jiucai.appframework.base.util.CommonUtil

public class CommonUtil
extends Object


构造方法摘要
CommonUtil()
           
 
方法摘要
static Long getPage(Long pageStart, Long pageSize)
          计算当前页
static Long getPageCount(Long resultSize, Long pageSize)
          计算页数
static String getPagedSQL(String sql, Long page, Long pageSize)
          构造Oracle分页SQL
static Long getPageSize()
          获取每页展示数据记录数
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

CommonUtil

public CommonUtil()
方法详细信息

getPagedSQL

public static String getPagedSQL(String sql,
                                 Long page,
                                 Long pageSize)
构造Oracle分页SQL

参数:
sql - 原始SQL
page - 页码 默认 1
pageSize - 每页记录数 默认10
返回:

getPageCount

public static final Long getPageCount(Long resultSize,
                                      Long pageSize)
计算页数

参数:
resultSize - 记录数
pageSize - 每页显示的记录数
返回:
总页数

getPage

public static final Long getPage(Long pageStart,
                                 Long pageSize)
计算当前页

参数:
pageStart -
pageSize -
返回:

getPageSize

public static final Long getPageSize()
获取每页展示数据记录数

返回:


Copyright © 2013. All Rights Reserved.