⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 examineeservice.java

📁 中应用程序的访问权限对Java Web Console 中应用程序的访问权限 成功登录 Web 控制台后,可能无法自动访问在该控制台中注册的所有应用程序。通常,必须安装应用程序,才能让所有的用户在控制
💻 JAVA
字号:
package edu.yinhe.mis.services;

import java.sql.SQLException;
import java.util.ArrayList;

import javax.sql.DataSource;

import edu.yinhe.mis.dto.CheckInfoDTO;
import edu.yinhe.mis.dto.ExamineeDTO;
import edu.yinhe.mis.model.DAOFactory;
import edu.yinhe.mis.vo.ExamineeVO;
import edu.yinhe.system.common.AppException;

import edu.yinhe.system.model.IBaseDAO;
import edu.yinhe.system.services.Service;
/**
 * 
 * @author 刘洲
 *
 */
public class ExamineeService extends Service{
    private IBaseDAO idao=null;
	public Object alllist() throws AppException {
		
		return null;
	}

	public Object alllist(Object obj) throws AppException {
		Object[] object=null;
		ExamineeDTO examineeDTO=null;
		idao=DAOFactory.getExamineeDAO(conn);
		 
		try {
			examineeDTO=(ExamineeDTO)obj;
			object=(Object[]) idao.findAll(examineeDTO);
		} catch (SQLException e) {
			e.printStackTrace();
		}finally{
			examineeDTO=null;
			this.closeConnection();
		}
		
		return object;
	}



	public Object create(Object obj) throws AppException {
		ExamineeDTO examineeDTO=null;
		boolean flag=false;
		try {
			examineeDTO=(ExamineeDTO)obj;
			idao=DAOFactory.getExamineeDAO(conn);
			flag=(Boolean)idao.insert(examineeDTO);
		} catch (SQLException e) {
			e.printStackTrace();
		}finally{
			this.closeConnection();
		}
		return flag;
	}

	public Object findAll() throws AppException {
		ArrayList alist=null;
		try {
			idao=DAOFactory.getExamineeDAO(conn);
			alist=(ArrayList) idao.find();
		} catch (SQLException e) {
		
			e.printStackTrace();
		}
		
		return alist;
	}

	public Object findAll(Object arg0) throws AppException {
		
		return null;
	}

	public Object findById(Object arg0) throws AppException {
		
		return null;
	}

	public Object findByObject(Object arg0) throws AppException {
		
		return null;
	}

	public int getcount() throws AppException {
		
		return 0;
	}

	public int getcount(Object arg0) throws AppException {

		return 0;
	}

	public Object list() throws AppException {
		
		return null;
	}

	public Object list(Object obj) throws AppException {
		CheckInfoDTO checkInfoDTO=null;
		ArrayList alist=null;
		try {
			checkInfoDTO=(CheckInfoDTO)obj;
			idao=DAOFactory.getExamineeDAO(conn);
			alist=(ArrayList) idao.find(checkInfoDTO);
		} catch (SQLException e) {
		
			e.printStackTrace();
		}finally{
			this.closeConnection();
		}
		return alist;
	}

	public Object load(Object obj) throws AppException {
		Integer ID=null;
		ExamineeVO examineeVO=null;
	    ExamineeDTO examineeDTO=null;
	    ArrayList alist=null;
	    Object[] object=null;
		try {
			examineeDTO=new ExamineeDTO();
			ID=(Integer)obj;
			examineeDTO.setID(ID);
			idao=DAOFactory.getExamineeDAO(conn);
			object=(Object[]) idao.findAll(examineeDTO);
			alist=(ArrayList) object[1];
			if(alist.size()!=0){
				
				examineeVO=(ExamineeVO) alist.get(0);
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}finally{
			examineeDTO=null;
			this.closeConnection();
		}
		return examineeVO;
	}

	public Object modify(Object obj) throws AppException {
		ExamineeDTO examineeDTO=null;
		boolean isTrue=false;
		try {
			examineeDTO=(ExamineeDTO)obj;
			idao=DAOFactory.getExamineeDAO(conn);
			isTrue=(Boolean) idao.update(examineeDTO);
		} catch (SQLException e) {
		
			e.printStackTrace();
		}finally{
			this.closeConnection();
		}
		return isTrue;
	}

	public Object remove(Object obj) throws AppException {
	
		Integer ID=null;
		boolean isTrue=false;
		try {
			ID=(Integer)obj;
			idao=DAOFactory.getExamineeDAO(conn);
			isTrue=(Boolean) idao.delete(ID);
		} catch (SQLException e) {
		
			e.printStackTrace();
		}finally{
			this.closeConnection();
		}
		return isTrue;
	}



}

⌨️ 快捷键说明

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