java 通用的返回类

package com.eshore.pdip.mobile.phone.vo;

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

import com.eshore.pdip.mobile.util.Pager;
import com.eshore.pdip.mobile.util.ResultCodes;



public  class Result implements Serializable {
    
     /* *
     * 
     
*/
     private  static final  long serialVersionUID =  1L;

     /* *
     * ������
     
*/
     private String resultCode = ResultCodes.INVOKE_SUCC;


     private String msg;

  
     private Object resultObj;

  
     private List<?> resultList;
    
  
     private String callback;
 
     private  int pageNo =  1//  ҳ��
     private  int pageSize =  10//  ÿҳ����
     private  int totalPageCount =  0//  ��ҳ��
     private  int totalCount =  0//  ������
     private  int currentPageNo =  1//  ������
    

    

     public  int getCurrentPageNo() {
         return currentPageNo;
    }

     public  void setCurrentPageNo( int currentPageNo) {
         this.currentPageNo = currentPageNo;
    }


     private Map<String, Object> ignoreMap =  new HashMap<String, Object>();


     public String getMsg() {
         return msg;
    }

     public  void setMsg(String msg) {
         this.msg = msg;
    }

     public Object getResultObj() {
         return resultObj;
    }

     public  void setResultObj(Object resultObj) {
         this.resultObj = resultObj;
    }

     public List<?> getResultList() {
         return resultList;
    }

     public  void setResultList(List<?> resultList) {
         this.resultList = resultList;
    }

     public  int getPageNo() {
         return pageNo;
    }

     public  void setPageNo( int pageNo) {
         this.pageNo = pageNo;
    }

     public  int getPageSize() {
         return pageSize;
    }

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

     public  int getTotalPageCount() {
         return totalPageCount;
    }

     public  void setTotalPageCount( int totalPageCount) {
         this.totalPageCount = totalPageCount;
    }

     public  int getTotalCount() {
         return totalCount;
    }

     public  void setTotalCount( int totalCount) {
         this.totalCount = totalCount;
    }
    
     public Map<String, Object> getIgnoreMap() {
         return ignoreMap;
    }

     public  void setIgnoreMap(Map<String, Object> ignoreMap) {
         this.ignoreMap = ignoreMap;
    }

     public String getCallback() {
         return callback;
    }

     public  void setCallback(String callback) {
         this.callback = callback;
    }

     public String getResultCode() {
         return resultCode;
    }

     public  void setResultCode(String resultCode) {
         this.resultCode = resultCode;
    }
   
     public  void put(String key, Object value) {
         this.ignoreMap.put(key, value);
    }
    
   
     public  void initPagerResult(Pager pager) {
         if (pager !=  null) {
             this.pageNo = pager.getPageNumber();
             this.pageSize = pager.getPageSize();
             this.totalCount = pager.getTotalCount();
             this.totalPageCount = pager.getPageCount();
             this.currentPageNo=pager.getPageNumber();
        }
    }

    @Override
     public String toString() {
         return  " Result [resultCode= " + resultCode +  " , msg= " + msg +  " ] ";
    }



}
posted on 2016-03-23 17:21  笨小孩做开发 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/dullbaby/p/5312014.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值