📄 stuideaservice.java
字号:
package edu.yinhe.mis.services;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import edu.yinhe.mis.dto.StudentIdeaDTO;
import edu.yinhe.mis.model.DAOFactory;
import edu.yinhe.mis.model.StudentIdeaDAO;
import edu.yinhe.system.common.AppException;
import edu.yinhe.system.services.Service;
import edu.yinhe.system.vo.LoginVO;
public class StuIdeaService extends Service{
public Object alllist() throws AppException {
// TODO Auto-generated method stub
return null;
}
public Object alllist(Object arg0) throws AppException {
// TODO Auto-generated method stub
return null;
}
/**
* @author 宋玉萍
* 向学员意见反馈表中插入记录
*/
public Object create(Object arg0) throws AppException {
Boolean flag = false;
StudentIdeaDTO dto=(StudentIdeaDTO) arg0;
StudentIdeaDAO dao= (StudentIdeaDAO) DAOFactory.getStuIdea(conn);
try {
flag=(Boolean) dao.insert(dto);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
closeConnection();
}
return flag;
}
public Object findAll() throws AppException {
// TODO Auto-generated method stub
return null;
}
public Object findAll(Object arg0) throws AppException {
// TODO Auto-generated method stub
return null;
}
/**
* 根据login表中的id找到users表中的userid,username
*/
public Object findById(Object arg0) throws AppException {
List list = null;
LoginVO vo=(LoginVO) arg0;
StudentIdeaDAO dao= (StudentIdeaDAO) DAOFactory.getStuIdea(conn);
try {
list= (ArrayList) dao.findById(vo);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
if(conn!=null) this.closeConnection();
}
return list;
}
public Object findByObject(Object arg0) throws AppException {
// TODO Auto-generated method stub
return null;
}
public int getcount() throws AppException {
// TODO Auto-generated method stub
return 0;
}
public int getcount(Object arg0) throws AppException {
// TODO Auto-generated method stub
return 0;
}
public Object list() throws AppException {
// TODO Auto-generated method stub
return null;
}
public Object list(Object arg0) throws AppException {
List list = new ArrayList();
StudentIdeaDAO dao= (StudentIdeaDAO) DAOFactory.getStuIdea(conn);
try {
list = (ArrayList) dao.find(arg0);
} catch (SQLException e) {
e.printStackTrace();
}finally{
closeConnection();
dao = null;
}
return list;
}
public Object load(Object arg0) throws AppException {
// TODO Auto-generated method stub
return null;
}
public Object modify(Object arg0) throws AppException {
// TODO Auto-generated method stub
return null;
}
public Object remove(Object arg0) throws AppException {
// TODO Auto-generated method stub
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -