Package cn.fantasticmao.mundo.core.util
Interface PageUtil
-
public interface PageUtilCalculateoffsetandlimitparameters in SQL queries.- Since:
- 2021-12-08
- Version:
- 1.0.3
- Author:
- fantasticmao
-
-
Method Detail
-
offset
static int offset(int page, int size)Calculate the page offset.- Parameters:
page- greater or equals than 0size- greater or equals than 1, and less or equals than 500- Returns:
- valid page offset
-
limit
static int limit(int size)
Calculate the page size- Parameters:
size- greater or equals than 1, and less or equals than 500- Returns:
- valid page size
-
-