This project has retired. For details please refer to its
Attic page.
Email xref
1 package org.apache.juddi.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 import javax.persistence.Column;
19 import javax.persistence.Entity;
20 import javax.persistence.FetchType;
21 import javax.persistence.GeneratedValue;
22 import javax.persistence.GenerationType;
23 import javax.persistence.Id;
24 import javax.persistence.JoinColumn;
25 import javax.persistence.Lob;
26 import javax.persistence.ManyToOne;
27 import javax.persistence.Table;
28
29
30
31
32
33 @Entity
34 @Table(name = "j3_email")
35 public class Email implements java.io.Serializable {
36
37 private static final long serialVersionUID = 6699730616675634879L;
38 private Long id;
39 private Contact contact;
40 private String useType;
41 private String emailAddress;
42
43 public Email() {
44 }
45
46 public Email(Contact contact, String emailAddress) {
47 this.contact = contact;
48 this.emailAddress = emailAddress;
49 }
50 public Email(Contact contact, String useType,
51 String emailAddress) {
52 this.contact = contact;
53 this.useType = useType;
54 this.emailAddress = emailAddress;
55 }
56
57 @Id
58 @GeneratedValue(strategy=GenerationType.AUTO)
59 public Long getId() {
60 return this.id;
61 }
62 public void setId(Long id) {
63 this.id = id;
64 }
65
66 @ManyToOne(fetch = FetchType.LAZY)
67 @JoinColumn(name = "contact_id", nullable = false)
68 public Contact getContact() {
69 return this.contact;
70 }
71 public void setContact(Contact contact) {
72 this.contact = contact;
73 }
74
75 @Column(name = "use_type", length=255)
76 public String getUseType() {
77 return this.useType;
78 }
79 public void setUseType(String useType) {
80 this.useType = useType;
81 }
82
83 @Lob
84 @Column(name = "email_address", nullable = false, length=4096)
85 public String getEmailAddress() {
86 return this.emailAddress;
87 }
88 public void setEmailAddress(String emailAddress) {
89 this.emailAddress = emailAddress;
90 }
91
92 }