下载此文档

ssh增删改查(SSH additions and deletions to search).doc


文档分类:IT计算机 | 页数:约37页 举报非法文档有奖
1/37
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/37 下载此文档
文档列表 文档介绍
ssh增删改查(SSH additions and deletions to search)
SSH CRUD (function of human resource management system module)
First, preparation work
Development environment: ++
Struts2++. Through this example of a system of human resources, provide the basic add, delete, modify, query and other functions. Lib packages need these packages as shown below:
Two. Building database
Three. Establish data persistence layer
Establishing reverse engineering of Hibernate
1, the establishment of the entity class and mapping file.

.;
/ * *
* Employee entity.
*
* ***@author MyEclipse Persistence Tools
* /
Public class Employee implements {
Private Long id;
Private String name;
Private String address;
Private String phone;
/ / Constructors
Default constructor / * * * /
Public Employee () {
}
Full constructor / * * * /
Public Employee (String name, String address, String phone) {
= name;
= address;
= phone;
}
Property / / accessors
Public Long getId () {
Return ;
}
Public void setId (Long ID) {
= id;
}
Public String getName () {
Return ;
}
Public void setName (String name) {
= name;
}
Public String getAddress () {
Return ;
}
Public void setAddress (String address) {
= address;
}
Public String getPhone () {
Return ;
}
Public void setPhone (String phone) {
= phone;
}
}
2, the attribute mapping entity class Books to the books table, to generate the file below:
< XML version= "1" encoding= "UTF-8"? >
DOCTYPE hibernate-mapping "-//Hibernate/Hibernate! PUBLIC Mapping DTD //EN"
"Http://hibernate./hibernate-mapping-" >
<! --
Mapping file autogenerated by MyEclipse Persistence Tools
-- >
<hibernate-mapping>
<class name= "" table= "Employee" schema= "dbo" catalog= "CompanyRM"

ssh增删改查(SSH additions and deletions to search) 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数37
  • 收藏数0 收藏
  • 顶次数0
  • 上传人rjmy2261
  • 文件大小28 KB
  • 时间2017-11-23