afficheinfobusiness.java
来自「hibernate+spring+ext2.0 的物流网站」· Java 代码 · 共 78 行
JAVA
78 行
package com.bu.mars;
import java.util.*;
import com.po.AfficheInfo;
import com.po.BranchInfo;
import com.service.DAOService;
import com.struts.form.MarsAfficheInfoForm;
import com.struts.form.MarsBranchInfoForm;
public class AfficheInfoBusiness implements ibusiness {
private DAOService daos;
public boolean delete(String id) {
// TODO Auto-generated method stub
return false;
}
public Vector findAll() {
// TODO Auto-generated method stub
Vector Affichevc=new Vector();
List ls=daos.getAfficheinfodao().findAll();
for(Object object:ls)
{
AfficheInfo affiche=(AfficheInfo)object;
MarsAfficheInfoForm affichef=new MarsAfficheInfoForm();
affichef.setAfficheid(affiche.getAffichelD().toString());
affichef.setUserid(affiche.getUserInfo().getUserName());
affichef.setAffichetitle(affiche.getAfficheTitle());
affichef.setAffichecontent(affiche.getAfficheContent());
affichef.setAffichedata(affiche.getAfficheData());
affichef.setBranchid(affiche.getBranchInfo().getBranchName());
Affichevc.add(affichef);
}
return Affichevc;
}
public Vector findByBranchID(String id)
{
Vector Affichevc=new Vector();
List ls=daos.getAfficheinfodao().findByBranchID(new Integer(id));
for(int i=ls.size()-1;i>=0;i--)
{
AfficheInfo affiche=(AfficheInfo)ls.get(i);
MarsAfficheInfoForm affichef=new MarsAfficheInfoForm();
affichef.setAfficheid(affiche.getAffichelD().toString());
affichef.setUserid(affiche.getUserInfo().getUserName());
affichef.setAffichetitle(affiche.getAfficheTitle());
affichef.setAffichecontent(affiche.getAfficheContent());
affichef.setAffichedata(affiche.getAfficheData());
affichef.setBranchid(affiche.getBranchInfo().getBranchName());
Affichevc.add(affichef);
}
return Affichevc;
}
public Object findById(String id) {
// TODO Auto-generated method stub
return null;
}
public boolean save(Object ob) {
// TODO Auto-generated method stub
return false;
}
public boolean update(Object ob) {
// TODO Auto-generated method stub
return false;
}
public DAOService getDaos() {
return daos;
}
public void setDaos(DAOService daos) {
this.daos = daos;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?