photoinfobean.java

来自「一个仿造淘宝的jsp网站。功能比较完善」· Java 代码 · 共 59 行

JAVA
59
字号
package com.jc.taobao.gjj.logic;

import java.util.ArrayList;
import java.util.List;

import com.jc.taobao.gjj.dao.PhotoInfoDAO;
import com.jc.taobao.gjj.entity.PhotoInfo;
import com.jc.taobao.gjj.factory.WorkFactory;

public class PhotoInfoBean {
	PhotoInfoDAO pdao;
	public PhotoInfoBean()
	{
		pdao=(PhotoInfoDAO)WorkFactory.getDAO("PhotoInfoDAO");
	}

	public  int save(PhotoInfo photo) {
		return pdao.save(photo);
	}

	public int delete(Integer id) {
		return pdao.delete(id);
	}

	public int merge(PhotoInfo photo) {
		return pdao.merge(photo);
	}
	public List<PhotoInfo> getquerybyALL()//查询所有图片信息
	{
		return pdao.querybyALL();
	}
	
	public List<PhotoInfo> getquerybyphotoid(Integer pid)//根据图片编号查图片路径
	{
		return pdao.querybyphotoid(pid);
	}
	
	public ArrayList getqueryAllLuntanBiaoqingPic()
	{
		return (ArrayList)pdao.queryAllLuntanBiaoQingPic();
	}
	
	public ArrayList getqueryAllFacePic()
	{
		ArrayList al=new ArrayList();
		ArrayList alph=(ArrayList)pdao.queryAllFacePic();
		for(int i=0;i<alph.size();i++)
		{
			PhotoInfo ph=(PhotoInfo)alph.get(i);
			al.add(ph.getPhotopath());
		}
		return al;
	}
	public ArrayList getquerypicbyphotopath(String photopath)
	{
		return (ArrayList)pdao.querybyphotopath(photopath);
	}
}

⌨️ 快捷键说明

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