pictureservice.java

来自「java带进度条上传尽量不要让站长把时间都花费在为您修正说明上」· Java 代码 · 共 100 行

JAVA
100
字号
package com.jmwl.biz;

import java.util.List;

import com.jmwl.common.BlogException;
import com.jmwl.dao.PictureDAO;
import com.jmwl.dto.PhotoDTO;
import com.jmwl.dto.PictureDTO;
import com.jmwl.vo.PictureVO;

public class PictureService extends BasicService
{
	private PictureDAO ptdao;
	public PictureService()
	{
		this.ptdao=new PictureDAO();
	}
	
	public boolean addPicture(PictureDTO pdto) throws BlogException
	{
		boolean b=false;
		ptdao.setConn(this.getConn());
		b=ptdao.addPicture(pdto);
		this.closeConn();
		return b;
	}
	
	public boolean delOnePhotoPictures(PhotoDTO pdto) throws BlogException
	{
		ptdao.setConn(this.getConn());
		boolean b=ptdao.delOnePhotoPictures(pdto);
		this.closeConn();
		return b;
	}
	
	public boolean delPicture(PictureDTO ptdto) throws BlogException
	{
		ptdao.setConn(this.getConn());
		boolean b=ptdao.delPicture(ptdto);
		this.closeConn();
		return b;
	}
	
	public int getAllCount(PhotoDTO pdto) throws BlogException
	{
		ptdao.setConn(this.getConn());
		int allCount=ptdao.getAllCount(pdto);
		return allCount;
	}
	
	public List getOneUserPictures(int pageNow,int rowCount,PhotoDTO pdto) throws BlogException
	{
		ptdao.setConn(this.getConn());
		List list=ptdao.getOneUserPictures(pageNow, rowCount, pdto);
		this.closeConn();
		return list;
	}
	
	public PictureVO getOnePicture(int id) throws BlogException
	{
		ptdao.setConn(this.getConn());
		PictureVO ptvo=ptdao.getOnePicture(id);
		this.closeConn();
		return ptvo;
	}
	
	public boolean editPicture(PictureDTO ptdto) throws BlogException
	{
		ptdao.setConn(this.getConn());
		boolean b=ptdao.editPicture(ptdto);
		this.closeConn();
		return b;
	}
	
	public String getLastPictureUri(int photo_id) throws BlogException
	{
		ptdao.setConn(this.getConn());
		String uri=ptdao.getLastPictureUri(photo_id);
		this.closeConn();
		return uri;
		
	}
	
	public boolean checkPictureName(String picture_name,int photo_id) throws BlogException
	{
		ptdao.setConn(this.getConn());
		boolean b=ptdao.checkPictureName(picture_name, photo_id);
		this.closeConn();
		return b;
	}
	
	public List getOneUserPictures(PhotoDTO pdto) throws BlogException
	{
		ptdao.setConn(this.getConn());
		List list=ptdao.getOneUserPictures(pdto);
		this.closeConn();
		return list;
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?