This project has retired. For details please refer to its Attic page.
BusinessService xref
View Javadoc
1   package org.apache.juddi.model;
2   /*
3    * Copyright 2001-2008 The Apache Software Foundation.
4    * 
5    * Licensed under the Apache License, Version 2.0 (the "License");
6    * you may not use this file except in compliance with the License.
7    * You may obtain a copy of the License at
8    * 
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   * 
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  import java.util.ArrayList;
19  import java.util.Date;
20  import java.util.List;
21  
22  import javax.persistence.CascadeType;
23  import javax.persistence.Entity;
24  import javax.persistence.FetchType;
25  import javax.persistence.JoinColumn;
26  import javax.persistence.ManyToOne;
27  import javax.persistence.OneToMany;
28  import javax.persistence.OneToOne;
29  import javax.persistence.OrderBy;
30  import javax.persistence.Table;
31  
32  /**
33   * @author <a href="mailto:kurt@apache.org">Kurt T Stam</a>
34   * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
35   */
36  @Entity
37  @Table(name = "j3_business_service")
38  public class BusinessService extends UddiEntity implements java.io.Serializable {
39  
40  	private static final long serialVersionUID = 7793243417208829793L;
41  	private BusinessEntity businessEntity;
42  	private List<ServiceName> serviceNames = new ArrayList<ServiceName>(0);
43  	private List<ServiceDescr> serviceDescrs = new ArrayList<ServiceDescr>(0);
44  	private List<BindingTemplate> bindingTemplates = new ArrayList<BindingTemplate>(0);
45  	private ServiceCategoryBag categoryBag;
46      private List<ServiceProjection> projectingBusinesses = new ArrayList<ServiceProjection>(0);
47      private List<Signature> signatures = new ArrayList<Signature>(0);
48  
49  	public BusinessService() {
50  	}
51  
52  	public BusinessService(String entityKey, BusinessEntity businessEntity, Date modified) {
53  		this.entityKey = entityKey;
54  		this.businessEntity = businessEntity;
55  		this.modified = modified;
56  	}
57  	public BusinessService(String entityKey, BusinessEntity businessEntity, Date modified,
58  			List<ServiceName> serviceNames, List<ServiceDescr> serviceDescrs,
59  			List<BindingTemplate> bindingTemplates,
60  			ServiceCategoryBag categoryBag) {
61  		this.entityKey = entityKey;
62  		this.businessEntity = businessEntity;
63  		this.modified = modified;
64  		this.serviceNames = serviceNames;
65  		this.serviceDescrs = serviceDescrs;
66  		this.bindingTemplates = bindingTemplates;
67  		this.categoryBag = categoryBag;
68  	}
69  
70  	@ManyToOne(fetch = FetchType.LAZY)
71  	@JoinColumn(name = "business_key", nullable = false)
72  	public BusinessEntity getBusinessEntity() {
73  		return this.businessEntity;
74  	}
75  	public void setBusinessEntity(BusinessEntity businessEntity) {
76  		this.businessEntity = businessEntity;
77  	}
78  
79  	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessService")
80  	@OrderBy
81  	public List<ServiceName> getServiceNames() {
82  		return this.serviceNames;
83  	}
84  	public void setServiceNames(List<ServiceName> serviceNames) {
85  		this.serviceNames = serviceNames;
86  	}
87  
88  	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessService")
89  	@OrderBy
90  	public List<ServiceDescr> getServiceDescrs() {
91  		return this.serviceDescrs;
92  	}
93  	public void setServiceDescrs(List<ServiceDescr> serviceDescrs) {
94  		this.serviceDescrs = serviceDescrs;
95  	}
96  
97  	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessService")
98  	@OrderBy
99  	public List<BindingTemplate> getBindingTemplates() {
100 		return this.bindingTemplates;
101 	}
102 	public void setBindingTemplates(List<BindingTemplate> bindingTemplates) {
103 		this.bindingTemplates = bindingTemplates;
104 	}
105 
106 	@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessService")
107 	public ServiceCategoryBag getCategoryBag() {
108 		return this.categoryBag;
109 	}
110 	public void setCategoryBag(ServiceCategoryBag categoryBag) {
111 		this.categoryBag = categoryBag;
112 	}
113 
114 	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessService")
115 	public List<ServiceProjection> getProjectingBusinesses() {
116 		return projectingBusinesses;
117 	}
118 	public void setProjectingBusinesses(List<ServiceProjection> projectingBusinesses) {
119 		this.projectingBusinesses = projectingBusinesses;
120 	}
121         
122         @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessService")
123 	@OrderBy
124         public List<Signature> getSignatures() {
125                 return signatures;
126         }
127 
128         public void setSignatures(List<Signature> signatures) {
129                 this.signatures = signatures;
130         }
131 }