码迷,mamicode.com
首页 > 编程语言 > 详细

【java】分页查询实体类

时间:2016-10-22 11:46:51      阅读:492      评论:0      收藏:0      [点我收藏+]

标签:ctf   gets   nal   this   ase   shm   stat   hashmap   语句   

package com.dmsd.itoo.tool.pageModel;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.persistence.Transient;

public class PageEntity<T>  implements Serializable{

    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    //**************************分页公共************************************
    //页码
    private int pageNum;
    //页大小
    private int pageSize;
    //记录数
    private Long total;
    //**************************单实体分页保存到rows中,原生sql语句分页查询保存在list中************************************
    //页集合
    private List<T> rows;
    //最终查询条件
    private String hql;
    //**************************多实体分页保存到Map中,通过属性取值************************************
    //查询内容
    private String selectContent;
    //查询实体
    private String selectFrom;
    //查询条件
    private String selectWhere;
    //查询到的内容
    private Map<Object, Object> map = new HashMap<Object, Object>();


    public String getSelectContent() {
        return selectContent;
    }


    public void setSelectContent(String selectContent) {
        this.selectContent = selectContent;
    }


    public String getSelectFrom() {
        return selectFrom;
    }


    public void setSelectFrom(String selectFrom) {
        this.selectFrom = selectFrom;
    }


    public String getSelectWhere() {
        return selectWhere;
    }


    public void setSelectWhere(String selectWhere) {
        this.selectWhere = selectWhere;
    }


    public static long getSerialversionuid() {
        return serialVersionUID;
    }


    public Map<Object, Object> getMap() {
        return map;
    }


    public void setMap(Map<Object, Object> map) {
        this.map = map;
    }

    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getPageSize() {
        return pageSize;
    }

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

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    public String getHql() {
        return hql;
    }

    public void setHql(String hql) {
        this.hql = hql;
    }
    
    /**
     * 数据库名称
     */

    @Transient
    private String dataBaseName;

    public String getDataBaseName() {
        return dataBaseName;
    }

    public void setDataBaseName(String dataBaseName) {
        this.dataBaseName = dataBaseName;
    }

    
}

 

【java】分页查询实体类

标签:ctf   gets   nal   this   ase   shm   stat   hashmap   语句   

原文地址:http://www.cnblogs.com/guoxianda/p/5986955.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!