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

📄 dictionaryservice.java

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

import java.sql.SQLException;
import java.util.List;

import javax.sql.DataSource;

import edu.yinhe.mis.model.DAOFactory;
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 DictionaryService extends Service{


	public Object alllist() throws AppException {
		// TODO Auto-generated method stub
		return null;
	}
	/**
	 * @author 马少华 <p>
	 * 查询数据
	 * @param obj 传入DictionaryDTO对象
	 *@throws AppException
	 * @return objs 返回一个objs数组 objs[0]为信息集合;objs[1]为集合的总记录数;			
	 */

	public Object alllist(Object obj) throws AppException {
		// TODO Auto-generated method stub
		IBaseDAO dictionaryDAO = DAOFactory.getDictionaryDAO(conn);
		Object[] objs=null;
		//List list = null;
		try {
			objs= (Object[])dictionaryDAO.findAll(obj);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			this.closeConnection();
			conn=null;
		}
		
		return objs;
	}
	/**
	 * @author 马少华 <p>
	 * 插入数据
	 * @param obj 传入DictionaryDTO对象
	 *@throws AppException
	 * @return 一个BOOLEAN值;			
	 */

     public Object create(Object obj) throws AppException {
		// TODO Auto-generated method stub
		IBaseDAO dictionaryDAO = DAOFactory.getDictionaryDAO(conn);
		boolean isok=false;
		try {
			isok = (Boolean)dictionaryDAO.insert(obj);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			this.closeConnection();
			conn=null;
		}
		return isok;
	}

	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;
	}

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

	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;
	}
	/**
	 * @author 马少华 <p>
	 * 修改数据
	 * @param obj 传入DictionaryDTO对象
	 *@throws AppException
	 * @return 一个BOOLEAN值;			
	 */

	public Object modify(Object obj) throws AppException {
		// TODO Auto-generated method stub
		IBaseDAO dictionaryDAO= DAOFactory.getDictionaryDAO(conn);
		boolean isOk = false;
		try {
			isOk = (Boolean)dictionaryDAO.update(obj);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			this.closeConnection();
			conn=null;
		}
		return isOk;
	}
	/**
	 * @author 马少华 <p>
	 * 删除数据
	 * @param obj 传入DictionaryDTO对象
	 *@throws AppException
	 * @return 一个BOOLEAN值;			
	 */

	public Object remove(Object obj) throws AppException {
		// TODO Auto-generated method stub
		IBaseDAO dictionaryDAO = DAOFactory.getDictionaryDAO(conn);
        boolean isOk= false;
		try {
			isOk=(Boolean)dictionaryDAO.delete(obj);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			this.closeConnection();
		}
		return isOk;
	}
	
	
	


}

⌨️ 快捷键说明

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