e股脑电脑教程网
  • 首 页
  • 操作系统
  • 应用软件
  • 下载工具
  • 影音视频
  • 办公软件
  • 媒体制作
  • 网站建设
  • 平面设计
  • 数据库
  • 程序开发
  • 视频教程
编辑推荐: | 文章搜索:
您现在的位置: e股脑 >> 程序开发 >> JSP教程 >> 利用Ant和XDoclet自动产生映射文件例子 >> 教程正文
 
教程搜索
 
 
相关教程
  • JSP分页技术实现
  • 使用XML封装数据库操作语句的实现(完
  • 结合”XML封装数据库操作语句的实现”
  • 如何使用XML实现多渠道接入网站的构架
  • 深入浅出taglib
  • 在JSP中编写你的第一个Tag
  • 用Java实现Web服务器
  • 如何利用xml,javascript绕开apple
  • 缓存JSP显示的内容
  • 关于JAVA的分页查询操作技术
  • 漫步j2ee之jsp技术(1)
  • 漫步j2ee之jsp技术(2)
  • Portlet应用开发(Portlet Specs v1.0)
  • 如何用jsp输出存在于oracle数据库Blob
  • Servlet设计
  • 用servlet显示图片
 
 

图文教程


  • Windows抢了谁的饭碗 非主流操作系统To

  • 地球还是火星 平常心看“非主流”

  • 综合运用Office 2007批量制作奖状

  • 没有系统盘如何才能修复受损系统?

  • 巧妙运用Excel中边界的附加功能!
 
 
赞 助 商
 
 
利用Ant和XDoclet自动产生映射文件例子
  • 来源:e股脑
  • 点击次数:
  • 更新时间:2007-8-9

//User.java

  1. package dbdemo;
  2. import java.util.Date ;
  3. import java.util.Set ;
  4. /**
  5. * @hibernate.class table="Users"
  6. *
  7. * @author MEagle
  8. *
  9. * Represents a User
  10. */
  11. public class User {
  12. private String userID;
  13. private String userName;
  14. private String password;
  15. private String emailAddress;
  16. private Date lastLogon;
  17. private Set contacts;
  18. private Set books;
  19. private Address address;
  20. /**
  21. * @hibernate.property column="EmailAddress" type="string"
  22. * @return String
  23. */
  24. public String getEmailAddress() {
  25. return emailAddress;
  26. }
  27. /**
  28. * @hibernate.property column="LastLogon" type="date"
  29. * @return Date
  30. */
  31. public Date getLastLogon() {
  32. return

    lastLogon;
  33. }
  34. /**
  35. * @hibernate.property column="Password" type="string"
  36. * @return String
  37. */
  38. public String getPassword() {
  39. return password;
  40. }
  41. /**
  42. * @hibernate.id generator-class="assigned" type="string"
  43. * column="LogonID"
  44. * @return String
  45. */
  46. public String getUserID() {
  47. return userID;
  48. }
  49. /**
  50. * @hibernate.property column="Name" type="string"
  51. * @return String
  52. */
  53. public String getUserName() {
  54. return userName;
  55. }
  56. /**
  57. * @param string
  58. */
  59. public void setEmailAddress(String string) {
  60. emailAddress = string;
  61. }
  62. /**
  63. * @param string
  64. */
  65. public void setLastLogon(Date date) {
  66. lastLogon = date;
  67. }
  68. /**
  69. * @param string
  70. */
  71. public void setPassword(String string) {
  72. password = string;
  73. }
  74. /**
  75. * @param string
  76. */
  77. public

    void setUserID(String string) {
  78. userID = string;
  79. }
  80. /**
  81. * @param string
  82. */
  83. public void setUserName(String string) {
  84. userName = string;
  85. }
  86. /**
  87. * @hibernate.set role="contacts" table="Contacts"
  88. * cascade="all" readonly="true"
  89. * @hibernate.collection-key column="User_ID"
  90. * @hibernate.collection-one-to-many class="dbdemo.Contact"
  91. * @return java.util.Set
  92. */
  93. public Set getContacts() {
  94. return contacts;
  95. }
  96. /**
  97. * @param set
  98. */
  99. public void setContacts(Set set) {
  100. contacts = set;
  101. }
  102. /**
  103. * @hibernate.set role="books" table="Book_User_Link"
  104. * cascade="all" eadonly="true"
  105. * @hibernate.collection-key column="UserID"
  106. * @hibernate.collection-many-to-many
  107. * class="dbdemo.Book" column="BookID"
  108. * @return java.util.Set
  109. */
  110. public Set getBooks() {
  111. return books;
  112. }
  113. /**
  114. * @param set
  115. */
  116. public void setBoo

    1 2 下一页
  • 上一篇教程: Web开发中防止浏览器的刷新键引起系统操作重复提交
  • 下一篇教程: JSP 语法详解
  •  

    关于本站 | 广告联系 | 版权声明 | 使用帮助

    Copyright © 2004-2008 www.egunao.com All rights reserved.