最近刚开始学习Spring+Hibernate
正在看一个项目源码,发现了这么一段代码,引入了import com.pa.common.Pager包,
查询后得知此包在PA.jar包中,想知道这个PA.jar是关于什么用途的,哪里有下载?有没有相关介绍资料?
package com.edu.cartoon.cartoon.service.impl;import java.util.ArrayList;
import java.util.Date;
import java.util.List;import com.edu.cartoon.cartoon.dao.CartoonDao;
import com.edu.cartoon.cartoon.service.BaseCartoonService;
import com.edu.cartoon.pojo.Cartoon;
import com.pa.common.Pager;public class BaseCartoonServiceImpl implements BaseCartoonService{ protected CartoonDao cartoonDao= null;

public Cartoon  findCartoonById(Integer id)
{
return this.cartoonDao.findByPk(id);
}

public void deleteCartoon(Integer id)throws Exception
{
this.cartoonDao.deleteByPk(id);
}

public void deleteCartoon(int[] ids)throws Exception
{
for(int i=0;i<ids.length;i++)
{
this.deleteCartoon(ids[i]);

}
}

public void saveCartoon(Cartoon  cartoon) 
{
this.cartoonDao.saveOrUpdate(cartoon);
} public Pager<Cartoon> findAllValidCartoon(Integer offset, Integer pageSize) {
return this.cartoonDao.findPagerRecords("from Cartoon c order by c.id desc",new Object[0],offset, pageSize);
} public Pager<Cartoon> findByName(String title,Integer offset, Integer pageSize) {
Pager<Cartoon> paper = null;
if(title==null || title.equals("")){
paper = this.findAllValidCartoon(offset, pageSize);
}else{
paper = this.cartoonDao.findPagerRecords("from Cartoon c where c.title like ? order by c.id desc",new Object[]{"%"+title.trim()+"%"},offset, pageSize);
}
return paper;
} public CartoonDao getCartoonDao() {
return cartoonDao;
} public void setCartoonDao(CartoonDao cartoonDao) {
this.cartoonDao = cartoonDao;
}
public List findAll(Date date1,Date date2) {
return this.cartoonDao.findAllRecords("from Cartoon c where createtime between ? and ? order by c.id asc ",new Object[]{date1,date2});
}
public List toXml(String ids) {
List list = new ArrayList();
Cartoon cartoonList =null;
String[] eqid = ids.split(",");
for (int i = 0; i <eqid.length; i++) {
       cartoonList = this.cartoonDao.findByPk(Integer.parseInt(eqid[i].trim()));
       list.add(cartoonList);
}
return list;
}
//修改已发布的状态
public void update(Integer id) {
Cartoon cartoonList = this.cartoonDao.findByPk(id);
       cartoonList.setState(0);
       this.cartoonDao.saveOrUpdate(cartoonList);
}
//发布免费资料,修改状态
public void update1(Integer id) {
Cartoon cartoonList = this.cartoonDao.findByPk(id);
       cartoonList.setIsDelete(0);
       this.cartoonDao.saveOrUpdate(cartoonList);
}
//操作人员设定数据
public void updateto(String ids) {
String[] eqid = ids.split(",");
for (int i = 0; i <eqid.length; i++) {
         System.out.println("eqid" +eqid);
       Cartoon cartoonList = this.cartoonDao.findByPk(Integer.parseInt(eqid[i].trim()));
       cartoonList.setState(0);
       this.cartoonDao.saveOrUpdate(cartoonList);
}
}

}