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

📄 revertservice.java

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

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

import javax.sql.DataSource;

import edu.yinhe.mis.dto.CardDTO;
import edu.yinhe.mis.dto.RevertDTO;
import edu.yinhe.mis.model.DAOFactory;
import edu.yinhe.mis.model.RevertDAO;
import edu.yinhe.mis.vo.CardVO;
import edu.yinhe.mis.vo.RevertVO;
import edu.yinhe.system.common.AppException;
import edu.yinhe.system.model.IBaseDAO;
import edu.yinhe.system.services.IService;
import edu.yinhe.system.services.Service;
/**
 * 
 * @author 小齐
 *
 */
public class RevertService extends Service {
	private IBaseDAO dao=null;
	private IBaseDAO rdao=null;
	
	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;
	}



	public Object create(Object obj) throws AppException {
		dao = DAOFactory.getRevertDAO(conn);
		RevertDTO dto = (RevertDTO) obj;
		boolean j = false;
		
		Object[] objs = new Object[2];
		try {
			j = (Boolean) dao.insert(dto);
			
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally{
			closeConnection();
		}
		return j;
	}

	private IBaseDAO getRevertDAO(Connection conn) {
		// TODO Auto-generated method stub
		return null;
	}

	public Object findAll() throws AppException {
		// TODO Auto-generated method stub
		return null;
	}

	public Object findAll(Object obj) throws AppException {

		ArrayList list = new ArrayList();
		dao = DAOFactory.getRevertDAO(conn);
		try {
			list = (ArrayList)dao.findAll(obj);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally
		{
			closeConnection();
		}
		
		return list;
	}

	public Object findById(Object obj) throws AppException {
		Integer id = (Integer) obj;
		CardDTO cdto = new CardDTO();
		cdto.setID(id);
		RevertDTO rdto = new RevertDTO();
		rdto.setCARD_ID(id);
		Object[] objs = new Object[2];
		try {
			dao =DAOFactory.getCardDAO(conn);
			rdao =DAOFactory.getRevertDAO(conn);
			CardVO cardvo =  (CardVO) dao.findById(cdto);
			objs[0] = cardvo;
			objs[1] =  rdao.findAll(rdto);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			closeConnection();
		}
		return objs;
	}
	

	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 {
		// TODO Auto-generated method stub
		return null;
	}

	public Object load(Object arg0) throws AppException {
		// TODO Auto-generated method stub
		return null;
	}

	public Object modify(Object obj) throws AppException {
		dao = DAOFactory.getRevertDAO(conn);
		boolean falg = false;
		Integer id = (Integer) obj;
		try {
			falg = (Boolean) dao.update(id);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally{
			closeConnection();
		}
		return falg;
	}

	public Object remove(Object obj) throws AppException {

		RevertVO vo =(RevertVO) obj;
		dao = DAOFactory.getRevertDAO(conn);
		try {
			vo = (RevertVO)dao.delete(obj);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			closeConnection();
		}
		return vo;
	}



}

⌨️ 快捷键说明

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