- 1
- 0
- 约8.08千字
- 约 10页
- 2017-12-22 发布于河南
- 举报
自动生成映射文件和Hibernate配置文件
自动生成映射文件和Hibernate配置文件
01.import java.io.Serializable;
02.
03./**
04. * An Address component, its not have its own identity.
05. *
06. */
07.public class Address implements Serializable {
08. private String streetAddress;
09. private String city;
10. private String state;
11. private String zipCode;
12.
13. /**
14. * @perty
15. * @hibernate.column name=street_address
16. * @return
17. */
18. public String getStreetAddress() { return streetAddress; }
19. public void setStreetAddress(String streetAddress) { this.streetAddress = streetAddress;}
20.
21. /**
22. * @perty
23. * @hibernate.column name=city
24. * @return
25. */
26. public String getCity() { return city; }
27. public void setCity(String city) { this.city = city; }
28.
29. /**
30. * @perty
31. * @hibernate.column name=state
32. * @return
33. */
34. public String getState() { return state; }
35. public void setState(String state) { this.state = state; }
36.
37. /**
38. * @perty
39. * @hibernate.column name=zip_code
40. * @return
41. */
42. public String getZipCode() { return zipCode; }
43. public void setZipCode(String zipCode) { this.zipCode = zipCode; }
44.}
45.
46.
47.
48./////////////////////////////////////////////////////////////////////////
49.
50.import java.io.Serializable;
51.import java.util.Date;
52.import java.util.Set;
53.import java.util.LinkedHashSet;
54.
55./**
56. * A persistant Hibernate object.
57. *
58. * @hibernate.class table=events
59. */
60.public class Event implements Serializable {
61. private Long id;
62. private int duration;
63. private String name;
64. private Date startDate;
65. private Location location;
66. private Set speakers = new LinkedHashSet();
67.
68. /**
69. * @hiberna
您可能关注的文档
最近下载
- 部编版语文五年级下册第二单元教材解读大单元集体备课.pptx VIP
- 部编版语文五年级下册第一单元教材解读大单元集体备课.pptx VIP
- 车工 (数控车床)理论知识考核要素细目表四级.pdf VIP
- 本科课程《基础护理学》教案,第十二章给药.doc VIP
- 农村题材小品剧本村官.pdf VIP
- 小品剧本-小品《绰号》.docx VIP
- 小品剧本-小品《竞选》.docx VIP
- 本科课程基础护理学教给药教案(2025—2026学年).docx VIP
- LaserjetCP1025系列打印机打印质量故障排除手册.pdf VIP
- 年会小品剧本小品剧本:搞笑小品剧本《都是喝酒惹事》台词大全.docx VIP
原创力文档

文档评论(0)