文章列表
1、将分页的相应信息放入一个对象中,包括分页返回值。
import java.io.Serializable;
public class Paginate implements Serializable {
private static final long serialVersionUID = 1L;
//总数
private long total;
//当前页数
private int currentPageNum = 1;
//分页后返回的list集合
private Object data;
//每页的数量
private int recordsPerPage = ...
@Entity
@Table(name = "employer")
public class Employer
private Integer id;
private String firstname;
private String lastname;
private String company;
private List<Employee> employees; // one-to-many
/* getters & setters */
}
@Entity
@Table(name = &qu ...