All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.onetwo.boot.mybatis.MyBatisUtils Maven / Gradle / Ivy

There is a newer version: 5.2.7
Show newest version
package org.onetwo.boot.mybatis;

import java.util.List;
import java.util.Optional;

import org.onetwo.easyui.EasyDataGrid;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

public class MyBatisUtils {
	
	public static void setCurrentQueryPage(EasyDataGrid page){
		if(page.isPagination()){
			PageHelper.startPage(page.getPage(), page.getPageSize());  
		}
	}

	public static  Optional> getPage(List rows){
		if(Page.class.isInstance(rows)){
			Page page = (Page) rows;
			return Optional.of(page);
		}
		return Optional.empty();
	}
	private MyBatisUtils(){
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy