資源簡介
北大青鳥accp8.0,y2貫穿項目案例,使用ssh框架開發青鳥租房系統
代碼片段和文件信息
package?cn.houserent.action;
import?java.util.Date;
import?java.util.Map;
import?cn.houserent.entity.House;
import?cn.houserent.entity.Street;
import?cn.houserent.entity.Type;
import?cn.houserent.entity.User;
import?cn.houserent.service.HouseBiz;
import?cn.houserent.service.StreetBiz;
import?cn.houserent.service.TypeBiz;
import?cn.houserent.service.impl.HouseBizImpl;
import?cn.houserent.service.impl.StreetBizImpl;
import?cn.houserent.service.impl.TypeBizImpl;
import?com.opensymphony.xwork2.ActionContext;
import?com.opensymphony.xwork2.ActionSupport;
public?class?Add?extends?ActionSupport{
private?String?message;
private?String?price;
private?String?street_id;
private?String?type_id;
private?String?floorage;
private?String?title;
private?String?contact;
private?Date?houseDate;
public?String?getMessage()?{
return?message;
}
public?void?setMessage(String?message)?{
this.message?=?message;
}
private?static?final?long?serialVersionUID?=?1L;
public?String?execute()?throws?Exception{
ActionContext?ac?=?ActionContext.getContext();
Map?session?=?ac.getSession();
User?user?=?(User)session.get(“login“);
TypeBiz?tb?=?new?TypeBizImpl();
Type?type?=?tb.getTypeById(Integer.parseInt(type_id.trim()));
StreetBiz?sb?=?new?StreetBizImpl();
Street?street?=?sb.getStreetById(Integer.parseInt(street_id.trim()));
double?p?=?0;
try?{
p?=?Double.parseDouble(price);
}?catch?(Exception?e)?{
e.printStackTrace();
}
int?f?=?0;
try?{
f?=?Integer.parseInt(floorage);
}?catch?(Exception?e)?{
e.printStackTrace();
}
//封裝House數據
House?house?=?new?House();
house.setUser(user);
house.setType(type);
house.setStreet(street);
house.settitle(title);
house.setDescription(“?“);
house.setPrice(p);
house.setDate(new?Date());
house.setFloorage(f);
house.setContact(contact);
house.setDate(houseDate);
//發布房屋信息
HouseBiz?hb?=?new?HouseBizImpl();
hb.save(house);
return?SUCCESS;
}
public?String?getPrice()?{
return?price;
}
public?void?setPrice(String?price)?{
this.price?=?price;
}
public?String?getStreet_id()?{
return?street_id;
}
public?void?setStreet_id(String?streetId)?{
street_id?=?streetId;
}
public?String?getType_id()?{
return?type_id;
}
public?void?setType_id(String?typeId)?{
type_id?=?typeId;
}
public?String?getFloorage()?{
return?floorage;
}
public?void?setFloorage(String?floorage)?{
this.floorage?=?floorage;
}
public?String?gettitle()?{
return?title;
}
public?void?settitle(String?title)?{
this.title?=?title;
}
public?String?getContact()?{
return?contact;
}
public?void?setContact(String?contact)?{
this.contact?=?contact;
}
public?Date?getHouseDate()?{
return?houseDate;
}
public?void?setHouseDate(Date?houseDate)?{
this.houseDate?=?houseDate;
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????3526??2016-04-20?10:41??HR-12DM-SSH\.classpath
?????文件????????480??2013-10-29?11:21??HR-12DM-SSH\.myhibernatedata
?????文件????????306??2016-04-19?16:22??HR-12DM-SSH\.myme
?????文件???????1956??2016-04-19?16:22??HR-12DM-SSH\.project
?????文件????????500??2013-10-29?11:21??HR-12DM-SSH\.settings\.jsdtscope
?????文件???????1009??2016-04-19?16:22??HR-12DM-SSH\.settings\com.genuitec.eclipse.j2eedt.core.prefs
?????文件????????222??2016-04-19?16:33??HR-12DM-SSH\.settings\org.eclipse.core.resources.prefs
?????文件????????364??2013-10-29?11:21??HR-12DM-SSH\.settings\org.eclipse.jdt.core.prefs
?????文件????????546??2016-04-20?10:41??HR-12DM-SSH\.settings\org.eclipse.wst.common.component
?????文件????????252??2013-10-29?11:21??HR-12DM-SSH\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件?????????49??2013-10-29?11:21??HR-12DM-SSH\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2013-10-29?11:21??HR-12DM-SSH\.settings\org.eclipse.wst.jsdt.ui.superType.name
????..A.SHR???????462??2013-10-29?11:29??HR-12DM-SSH\.settings\vssver2.scc
?????文件????????741??2013-10-29?11:21??HR-12DM-SSH\sql\create.sql
?????文件???????2923??2013-10-29?11:21??HR-12DM-SSH\sql\init.sql
????..A.SHR???????163??2013-10-29?11:29??HR-12DM-SSH\sql\vssver2.scc
?????文件???????5505??2016-04-20?16:16??HR-12DM-SSH\src\applicationContext.xm
?????文件???????2977??2016-04-19?16:33??HR-12DM-SSH\src\cn\houserent\action\Add.java
?????文件?????????47??2013-10-29?11:21??HR-12DM-SSH\src\cn\houserent\action\Add.properties
?????文件????????446??2016-04-19?16:33??HR-12DM-SSH\src\cn\houserent\action\Default.java
?????文件????????969??2016-04-19?16:33??HR-12DM-SSH\src\cn\houserent\action\DetailAction.java
?????文件???????7089??2016-04-19?16:33??HR-12DM-SSH\src\cn\houserent\action\HouseAction.java
?????文件???????3634??2016-04-20?16:50??HR-12DM-SSH\src\cn\houserent\action\Manage.java
?????文件???????2327??2016-04-20?16:13??HR-12DM-SSH\src\cn\houserent\action\UserAction.java
????..A.SHR???????343??2013-10-29?11:29??HR-12DM-SSH\src\cn\houserent\action\vssver2.scc
?????文件????????869??2016-04-19?16:33??HR-12DM-SSH\src\cn\houserent\dao\ba
?????文件????????342??2016-04-20?09:24??HR-12DM-SSH\src\cn\houserent\dao\ba
?????文件????????440??2016-04-19?16:33??HR-12DM-SSH\src\cn\houserent\dao\DistrictDao.java
?????文件???????3747??2016-04-19?16:36??HR-12DM-SSH\src\cn\houserent\dao\hibimpl\DistrictDaoHibImpl.java
?????文件???????8993??2016-04-19?16:36??HR-12DM-SSH\src\cn\houserent\dao\hibimpl\HouseDaoHibImpl.java
............此處省略234個文件信息
- 上一篇:linux應用程序開發詳解(PDF+源碼)
- 下一篇:openpose源文章
評論
共有 條評論