This project has retired. For details please refer to its
Attic page.
Publisher 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 java.util.ArrayList;
19 import java.util.List;
20 import javax.persistence.CascadeType;
21 import javax.persistence.Column;
22 import javax.persistence.Entity;
23 import javax.persistence.FetchType;
24 import javax.persistence.OneToMany;
25 import javax.persistence.OrderBy;
26 import javax.persistence.Table;
27 import javax.persistence.Transient;
28
29
30
31
32
33 @Entity
34 @Table(name = "j3_publisher")
35
36 public class Publisher extends UddiEntityPublisher implements java.io.Serializable {
37
38 private static final long serialVersionUID = 1960575191518050887L;
39 private String publisherName;
40 private String emailAddress;
41 private Boolean isAdmin;
42 private Boolean isEnabled;
43 private Integer maxBusinesses;
44 private Integer maxServicesPerBusiness;
45 private Integer maxBindingsPerService;
46 private Integer maxTmodels;
47 private List<Signature> signatures = new ArrayList<Signature>(0);
48
49 public Publisher() {
50 super(null);
51 }
52
53 public Publisher(String publisherId, String publisherName) {
54 super(publisherId);
55 this.authorizedName = publisherId;
56 this.publisherName = publisherName;
57 }
58 public Publisher(String publisherId, String publisherName,
59 String emailAddress, Boolean isAdmin, Boolean isEnabled,
60 Integer maxBusinesses, Integer maxServicesPerBusiness,
61 Integer maxBindingsPerService, Integer maxTmodels) {
62
63 super(publisherId);
64 this.authorizedName = publisherId;
65 this.publisherName = publisherName;
66 this.emailAddress = emailAddress;
67 this.isAdmin = isAdmin;
68 this.isEnabled = isEnabled;
69 this.maxBusinesses = maxBusinesses;
70 this.maxServicesPerBusiness = maxServicesPerBusiness;
71 this.maxBindingsPerService = maxBindingsPerService;
72 this.maxTmodels = maxTmodels;
73 }
74
75
76 @Column(name = "publisher_name", nullable = false)
77 public String getPublisherName() {
78 return this.publisherName;
79 }
80 public void setPublisherName(String publisherName) {
81 this.publisherName = publisherName;
82 }
83
84 @Column(name = "email_address")
85 public String getEmailAddress() {
86 return this.emailAddress;
87 }
88 public void setEmailAddress(String emailAddress) {
89 this.emailAddress = emailAddress;
90 }
91
92 @Column(name = "is_admin", length = 5)
93 public Boolean getIsAdmin() {
94 return this.isAdmin;
95 }
96 public void setIsAdmin(Boolean isAdmin) {
97 this.isAdmin = isAdmin;
98 }
99
100 @Deprecated
101 public void setIsAdmin(String isAdmin) {
102 this.isAdmin = Boolean.parseBoolean(isAdmin);
103 }
104
105 @Transient
106 public boolean isAdmin() {
107
108 return isAdmin;
109 }
110
111 @Column(name = "is_enabled", length = 5)
112 public Boolean getIsEnabled() {
113 return this.isEnabled;
114 }
115 public void setIsEnabled(Boolean isEnabled) {
116 this.isEnabled = isEnabled;
117 }
118
119 @Deprecated
120 public void setIsEnabled(String isEnabled) {
121 this.isEnabled = Boolean.parseBoolean(isEnabled);
122 }
123
124 @Transient
125 public boolean isEnabled() {
126 return getIsEnabled();
127 }
128
129 @Column(name = "max_businesses")
130 public Integer getMaxBusinesses() {
131 return this.maxBusinesses;
132 }
133 public void setMaxBusinesses(Integer maxBusinesses) {
134 this.maxBusinesses = maxBusinesses;
135 }
136
137 @Column(name = "max_services_per_business")
138 public Integer getMaxServicesPerBusiness() {
139 return this.maxServicesPerBusiness;
140 }
141 public void setMaxServicesPerBusiness(Integer maxServicesPerBusiness) {
142 this.maxServicesPerBusiness = maxServicesPerBusiness;
143 }
144
145 @Column(name = "max_bindings_per_service")
146 public Integer getMaxBindingsPerService() {
147 return this.maxBindingsPerService;
148 }
149 public void setMaxBindingsPerService(Integer maxBindingsPerService) {
150 this.maxBindingsPerService = maxBindingsPerService;
151 }
152
153 @Column(name = "max_tmodels")
154 public Integer getMaxTmodels() {
155 return this.maxTmodels;
156 }
157 public void setMaxTmodels(Integer maxTmodels) {
158 this.maxTmodels = maxTmodels;
159 }
160
161 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "publisher")
162 @OrderBy
163 public List<Signature> getSignatures() {
164 return signatures;
165 }
166
167 public void setSignatures(List<Signature> signatures) {
168 this.signatures = signatures;
169 }
170 }