1 / 37
文档名称:

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

格式:doc   大小:28KB   页数:37页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

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

上传人:rjmy2261 2017/11/23 文件大小:28 KB

下载得到文件列表

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

相关文档

文档介绍

文档介绍: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"