package com.ajin.ajinerp.common.util; /** * 페이징 지원 객체 입니다. * * @author 서영석 * @since 2023.10.24 */ public class PaginationSupport { //한 페이지당 보여질 데이터 개수 (Default) private final static int PER_PAGE = 10; /** * @author 서영석 * @since 2023.10.24 * 내용 : PostgreSQL 데이터 */ public static int pagingRowIndexForPostgreSql (int currentPage) { return pagingRowIndexForPostgreSql(currentPage, PER_PAGE); } /** * @author 서영석 * @since 2023.10.24 * 내용 : PostgreSQL 데이터 */ public static int pagingRowIndexForPostgreSql (int currentPage, int perPage) { int startIndex = 0; startIndex = (currentPage - 1) * perPage; return startIndex; } }