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

org.phoenix.basic.paging.SystemRequest Maven / Gradle / Ivy

Go to download

对hibernate4的封装。封装了Druid,通过Druid可以轻量级的对其他数据库进行操作

There is a newer version: 1.5.1
Show newest version
package org.phoenix.basic.paging;

import javax.servlet.http.HttpServletRequest;


/**
 * 在service层获取应用层中的核心数据
 * @author mengfeiyang
 *
 */
public class SystemRequest {
	private HttpServletRequest request;
	private int pageSize;
	private int pageOffset;
	private String sort;
	private String order;
	private String realpath;
	
	
	public String getRealpath() {
		if(request!=null) {
			realpath = request.getSession().getServletContext().getRealPath("");
		}
		return realpath;
	}

	public void setRealpath(String realpath) {
		this.realpath = realpath;
	}

	public int getPageSize() {
		return (pageSize<=0)?15:pageSize;
	}
	
	public int getPageOffset() {
		return (pageOffset<=0)?0:pageOffset;
	}
	
	public String getSort() {
		return sort;
	}
	
	public String getOrder() {
		return order;
	}
	
	public HttpServletRequest getRequest() {
		return request;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public void setPageOffset(int pageOffset) {
		this.pageOffset = pageOffset;
	}


	public void setSort(String sort) {
		this.sort = sort;
	}


	public void setOrder(String order) {
		this.order = order;
	}


	public void setRequest(HttpServletRequest request) {
		this.request = request;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy