Ssm uses full annotations to add, delete, modify, and query cases: DeptServiceImpl and ssmdeptserviceimpl

Source: Internet
Author: User

Ssm uses full annotations to add, delete, modify, and query cases: DeptServiceImpl and ssmdeptserviceimpl

DeptServiceImpl for adding, deleting, modifying, and querying cases using full annotations in ssm

/*** @ Title: DeptServiceImpl. java * @ Package org. service. impl * @ Description: TODO: * @ author A18ccms A18ccms_gmail_com * @ date 11:04:09 * @ version V1.0 */package org. service. impl; import java. util. list; import org. dao. IDeptMapper; import org. entity. dept; import org. service. IDeptService; import org. springframework. beans. factory. annotation. autowired; import org. springframework. stereotype. component;/***** Project name: test_springmvc_16qn2 * Class Name: DeptServiceImpl * class description: * created by: Mu Xiongxiong * created by: 11:04:09 * modified: mu Xiongxiong * modification time: 11:04:09 * modification remarks: * @ version ** // injection transaction @ Componentpublic class DeptServiceImpl implements IDeptService {// Department @ Autowired private IDeptMapper deptMapper; /** (non-Javadoc) * <p> Description (Description): delete </p> * <p> Title: deleteByPrimaryKey </p> * @ param id * @ return * @ see org. service. IDeptService # deleteByPrimaryKey (java. lang. integer) * // @ Override public int deleteByPrimaryKey (Integer id) {// TODO Auto-generated method stub return deptMapper. deleteByPrimaryKey (id);}/** (non-Javadoc) * <p> Description (Description): Add </p> * <p> Title: insert </p> * @ param record * @ return * @ see org. service. IDeptService # insert (org. entity. dept) */@ Override public int insert (Dept record) {return deptMapper. insert (record);}/** (non-Javadoc) * <p> Description (Description): query by number </p> * <p> Title: selectByPrimaryKey </p> * @ param id * @ return * @ see org. service. IDeptService # selectByPrimaryKey (java. lang. integer) * // @ Override public Dept selectByPrimaryKey (Integer id) {return deptMapper. selectByPrimaryKey (id);}/** (non-Javadoc) * <p> Description (Description): Modify </p> * <p> Title: updateByPrimaryKeySelective </p> * @ param record * @ return * @ see org. service. IDeptService # updateByPrimaryKeySelective (org. entity. dept) */@ Override public int updateByPrimaryKey (Dept record) {// TODO Auto-generated method stub return deptMapper. updateByPrimaryKey (record);}/** (non-Javadoc) * <p> Description (Description): Query all </p> * <p> Title: findDeptAll </p> * @ return * @ see org. service. IDeptService # findDeptAll () */@ Override public List <Dept> findDeptAll () {// TODO Auto-generated method stub return deptMapper. findDeptAll ();}}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.