案例一:
package org.hcm.intelligence.cms87.remote.bean;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.Produces;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
@Produces("application/json")
@Consumes("application/json")
@JsonIgnoreProperties(ignoreUnknown = true)
public class PageResult<T> extends Result {
Page<T> data;
public Page<T> getData() {
return data;
}
public void setData(Page<T> data) {
this.data = data;
}
public static class Page<T> {
int total;
int pageNo;
int pageSize;
List<T> list;
public int getTotal() {
return total;
}
public void setTotal(int total) {
this.total = total;
}
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 List<T> getList() {
return list;
}
public void setList(List<T> list) {
this.list = list;
}
}
}