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

com.jladder.data.PageResult Maven / Gradle / Ivy

There is a newer version: 5.0.44
Show newest version
package com.jladder.data;
import java.util.List;
import java.util.Map;
/**
 * 分页查询结果集类
 * @author YiFeng
 */

public class PageResult extends BasicPageResult {
    /**
     * 条件对象文本
     */
    public Record condition= new Record();
    /// 
    /// 全字段
    /// 
    public List> fullcolumns;
    /// 
    /// 显示列
    /// 
    public List> columns;


    /// 
    /// 表单查询
    /// 
    public Object queryform;

    /**
     * 消息体
     */
    public String message;

    /// 
    /// 基本构造
    /// 
    public PageResult()
    {
//            this.condition = new Record();
//            condition.Put("pager", new Pager());
    }
    public PageResult(int code)
    {
        statusCode = code;
//            this.condition = new Record();
//            condition.Put("pager", new Pager());
    }

    /// 
    /// 设置分页对象
    /// 
    /// 
    public void SetPager(Pager pager)
    {
        if (this.condition == null) this.condition = new Record();
        this.condition.put("pager", pager);
        this.pager = pager;
    }

    public AjaxResult ToAjaxResult()
    {
        Record record=new Record();
        record.put("pager", pager);
        record.put("condition", condition);
        record.put("queryform", queryform);
        record.put("records", records);
        record.put("columns", columns);
        record.put("fullcolumns", fullcolumns);
        return new AjaxResult().set(statusCode,message).setData(record);
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy