freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

畢業(yè)設(shè)計-在線新聞發(fā)布系統(tǒng)設(shè)計與實現(xiàn)(編輯修改稿)

2025-01-06 21:18 本頁面
 

【文章內(nèi)容簡介】 hibernatemapping class catalog=newsdb name= table=newspress id name=id type= column name=id/ generator class=increment/ /id manytoone class= fetch=select name=newstype column name=type notnull=true ment外鍵 /ment /column /manytoone property generated=never lazy=false name=tiele type= column length=50 name=tiele notnull=true ment標(biāo)題 /ment /column /property property generated=never lazy=false name=content type= column length=5000 name=content notnull=true ment內(nèi)容 /ment /column /property property generated=never lazy=false name=author type= column length=20 name=author notnull=true ment作者 /ment /column /property property generated=never lazy=false name=presstime type= column length=10 name=presstime ment發(fā)布時間 /ment /column /property property generated=never lazy=false name=remark type= 廣東廣播電視大學(xué) 07 春計算機信息管理 0744001400379 陳勁 勛 11 column length=200 name=remark ment備注 /ment /column /property /class /hibernatemapping 映射 數(shù)據(jù) 庫中的 newstype表, 代碼如 表 9: 表 9 ?xml version= encoding=utf8? !DOCTYPE hibernatemapping PUBLIC //Hibernate/Hibernate Mapping DTD hibernatemapping class name= table=newstype catalog=newsdb id name=id type= column name=id / generator class=identity / /id property name=name type= column name=name length=20 notnull=true ment名稱 /ment /column /property property name=remark type= column name=remark length=200 ment備注 /ment /column /property set name=newspresses inverse=true key column name=type notnull=true ment外鍵 /ment /column /key onetomany class= / /set /class /hibernatemapping 利用 Hibernate 提供的 hbm2java 工具,根據(jù)以上得到的 4 個 文件,可以自動生成編程開發(fā)所需要的 *.java 文件。這些 Java 文件便可以充當(dāng) Struts 架構(gòu)中模型組件的代碼。 與 Java 文件對應(yīng)關(guān)系如 表 10 所示。 表 10 文件對應(yīng)關(guān)系表 文件 Java文件 廣東廣播電視大學(xué) 07 春計算機信息管理 0744001400379 陳勁 勛 12 下面將分別介紹根據(jù) Java代碼 。 如 表 11 所示為 ,Hibernate從數(shù)據(jù)庫中讀取 user表的一條記錄,并保存到 。程序中通過操作這些實例對象, 達到操作數(shù)據(jù)庫中數(shù)據(jù)的目的。 表 11 package 。 /** * 數(shù)據(jù)庫用戶表的 DAO對象 */ public class User implements { //用戶編號 private Integer id。 //用戶權(quán)限 private Power power。 //用戶名 private String name。 //用戶密碼 private String pwd。 public Integer getId() { return 。 } public void setId(Integer id) { = id。 } public Power getPower() { return 。 } public void setPower(Power power) { = power。 } public String getName() { return 。 } 廣東廣播電視大學(xué) 07 春計算機信息管理 0744001400379 陳勁 勛 13 public void setName(String name) { = name。 } public String getPwd() { return 。 } public void setPwd(String pwd) { = pwd。 } } 如 表 12 所示為 ,與數(shù)據(jù)庫 power表對應(yīng)的 Java對象。 表 12 package 。 import 。 import 。 /** * 數(shù)據(jù)庫權(quán)限表的 DAO對象 */ public class Power implements { //權(quán)限類型編號 private Integer id。 //權(quán)限類型名稱 private String name。 //權(quán)限類型備注 private String remarks。 //相同權(quán)限的用戶集合 private Set users = new HashSet(0)。 public Integer getId() { return 。 } public void setId(Integer id) { = id。 } public String getName() { 廣東廣播電視大學(xué) 07 春計算機信息管理 0744001400379 陳勁 勛 14 return 。 } public void setName(String name) { = name。 } public String getRemarks() { return 。 } public void setRemarks(String remarks) { = remarks。 } public Set getUsers() { return 。 } public void setUsers(Set users) { = users。 } } 如 表 13所示為 ,與數(shù)據(jù)庫 newstype表對應(yīng)的 Java對象。 表 13 package 。 import 。 import 。 /** * 數(shù)據(jù)庫新聞類型表的 DAO對象 */ public class Newstype implements { //新聞類型編號 private Integer id。 //新聞類型名稱 private String name。 //新聞類型備注 private String remark。 //相同新聞類型的新聞信息集合 private Set newspresses = new HashSet(0)。 廣東廣播電視大學(xué) 07 春計算機信息管理 0744001400379 陳勁 勛 15 public Integer getId() { return 。 } public void setId(Integer id) { = id。 } public String getName() { return 。 } public void setName(String name) { = name。 } public String getRemark() { return 。 } public void setRemark(String remark) { = remark。 } public Set getNewspresses() { return 。 } public void setNewspresses(Set newspresses) { = newspresses。 } } 如 表 13所示為 ,與數(shù)據(jù)庫 newspress表對應(yīng)的 Java對象。 表 14 package 。 import 。 /** * 數(shù)據(jù)庫新聞信息表的 DAO對象 */ public class Newspress implements { //新聞 信息編號 private Integer id。 廣東廣播電視大學(xué) 07 春計算機信息管理 0744001400379 陳勁 勛 16 //新聞信息類型 private Newstype newstype。 //新聞信息標(biāo)題 private String tiele。 //新聞信息內(nèi)容 private String content。 //新聞信息作者 private String author。 //新聞信息發(fā)布時間 private Date presstime。 //新聞信息備注 private String remark。 public Newspress() { } //構(gòu)造方法 public Newspress(Integer id,Newstype newstype, String tiele, String content, String author, String remark) { = id。 = newstype。 = tiele。 = content。 = author。 = remark。 } // Property accessors public Integer getId() { return 。 } public void setId(Integer id) { = id。 } public Newstype getNewstype() { return 。 } 廣東廣播電視大學(xué) 07 春計算機信息管理 0744001400379 陳勁 勛 17 public void setNewstype(Newstype newstype) { = newstype。 }
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1