zoukankan      html  css  js  c++  java
  • Servlet使用适配器模式进行增删改查案例(DeptDaoImpl.java)

    /**
     * 
     */
    package org.dao.impl;
    
    import java.util.List;
    
    import org.dao.IDeptDao;
    import org.entity.Dept;
    
    	/**
    	 * 
    	*    
    	* 项目名称:test_BaseDao   
    	* 类名称:DeptDaoImpl   
    	* 类描述:   部门的实现类
    	* 创建人:Mu Xiongxiong  
    	* 创建时间:2017-9-10 下午5:42:40   
    	* 修改人:Mu Xiongxiong   
    	* 修改时间:2017-9-10 下午5:42:40   
    	* 修改备注:   
    	* @version    
    	*
    	 */
    public class DeptDaoImpl extends BaseDaoUtilImpl<Dept> implements IDeptDao {
    
    	/**
    	 * (非 Javadoc)
    	* <p>Description(描述):添加数据 </p>
    	* <p>Title: save</p>
    	* @param entity
    	* @param tag
    	* @return
    	* @see org.dao.impl.BaseDaoUtilImpl#save(java.lang.Object, java.lang.String)
    	 */
    	@Override
    	public int save(Dept entity, String tag) {
    		return super.save(entity, tag);
    	}
    
    	/**
    	 * (非 Javadoc)
    	* <p>Description(描述): 修改数据</p>
    	* <p>Title: update</p>
    	* @param entity
    	* @return
    	* @see org.dao.impl.BaseDaoUtilImpl#update(java.lang.Object)
    	 */
    	@Override
    	public int update(Dept entity,String tag) {
    		return super.update(entity, tag);
    	}
    
    	/**
    	 * (非 Javadoc)
    	* <p>Description(描述):删除数据 </p>
    	* <p>Title: delete</p>
    	* @param id
    	* @return
    	* @see org.dao.impl.BaseDaoUtilImpl#delete(int)
    	 */
    	@Override
    	public int delete(int id,String tag) {
    		return super.delete(id, tag);
    	}
    
    	/**
    	 * (非 Javadoc)
    	* <p>Description(描述):根据编号查询 </p>
    	* <p>Title: queryById</p>
    	* @param id
    	* @return
    	* @see org.dao.impl.BaseDaoUtilImpl#queryById(int)
    	 */
    	@Override
    	public Dept queryById(int id,String tag) {
    		// TODO Auto-generated method stub
    		return super.queryById(id, tag);
    	}
    
    	/**
    	 * (非 Javadoc)
    	* <p>Description(描述): 查询全部</p>
    	* <p>Title: queryAll</p>
    	* @return
    	* @see org.dao.impl.BaseDaoUtilImpl#queryAll()
    	 */
    	@Override
    	public List<Dept> queryAll(String tag) {
    		// TODO Auto-generated method stub
    		return super.queryAll(tag);
    	}
    
    }
    

  • 相关阅读:
    2017 Multi-University Training Contest 2.Balala Power!(贪心)
    2017ICPCECIC C.A math problem(高次剩余)
    Atcoder 068E
    51nod 1385 凑数字(贪心+构造)
    cf round #418 div2 D. An overnight dance in discotheque(贪心)
    cf round #418 div2 C. An impassioned circulation of affection(暴力)
    cf round #424 div2 E. Cards Sorting(线段树)
    Atcoder 077E
    hdu 6162 Ch’s gift(树链剖分+主席树)
    Educational Codeforces Round 26 D. Round Subset(dp)
  • 原文地址:https://www.cnblogs.com/a1111/p/12816181.html
Copyright © 2011-2022 走看看