public class PageUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_PAGE_NUM
The constant MAX_PAGE_NUM
|
static int |
MAX_PAGE_SIZE
The constant MAX_PAGE_SIZE
|
static int |
MIN_PAGE_NUM
The constant MIN_PAGE_NUM
|
static int |
MIN_PAGE_SIZE
The constant MIN_PAGE_SIZE
|
| Constructor and Description |
|---|
PageUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkParam(int pageNum,
int pageSize)
check page parm
|
static String |
countSql(String sourceSql,
String dbType)
get countsql
|
static String |
pageSql(String sourceSql,
String dbType,
int pageNum,
int pageSize)
get pagesql
|
static void |
setObject(PreparedStatement ps,
List<Object> sqlParamList)
set sqlParamList in preparedStatement
|
public static final int MIN_PAGE_NUM
public static final int MAX_PAGE_NUM
public static final int MIN_PAGE_SIZE
public static final int MAX_PAGE_SIZE
public static void checkParam(int pageNum,
int pageSize)
pageNum - the page numpageSize - the page sizepublic static String pageSql(String sourceSql, String dbType, int pageNum, int pageSize)
sourceSql - the source sqldbType - the db typepageNum - the page numpageSize - the page sizepublic static String countSql(String sourceSql, String dbType)
sourceSql - the source sqldbType - the db typepublic static void setObject(PreparedStatement ps, List<Object> sqlParamList) throws SQLException
ps - the prepared statementsqlParamList - the sql param listSQLException - the sql exceptionCopyright © 2023 Seata. All rights reserved.