This project has retired. For details please refer to its Attic page.
Tmodel 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.Column;
24  import javax.persistence.Entity;
25  import javax.persistence.FetchType;
26  import javax.persistence.OneToMany;
27  import javax.persistence.OneToOne;
28  import javax.persistence.OrderBy;
29  import javax.persistence.Table;
30  
31  /**
32   * @author <a href="mailto:kurt@apache.org">Kurt T Stam</a>
33   * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
34   * @author <a href="mailto:tcunning@apache.org">Tom Cunningham</a>
35   */
36  @Entity
37  @Table(name = "j3_tmodel")
38  public class Tmodel extends UddiEntity implements java.io.Serializable {
39  
40  	private static final long serialVersionUID = -4577524699559324289L;
41  	private String name;
42  	private String langCode;
43  	private boolean deleted;
44  	private List<OverviewDoc> overviewDocs = new ArrayList<OverviewDoc>(0);
45  	private List<TmodelDescr> tmodelDescrs = new ArrayList<TmodelDescr>(0);
46  	private List<TmodelIdentifier> tmodelIdentifiers = new ArrayList<TmodelIdentifier>(0);
47  	private TmodelCategoryBag categoryBag;
48      private List<Signature> signatures = new ArrayList<Signature>(0);
49  
50  	public Tmodel() {
51  	}
52  
53  	public Tmodel(String entityKey, String name, Date modified) {
54  		this.entityKey = entityKey;
55  		this.name = name;
56  		this.modified = modified;
57  	}
58  	public Tmodel(String entityKey, String authorizedName, String operator,
59  			String name, String langCode, boolean deleted, Date modified,
60  			List<OverviewDoc> overviewDocs,
61  			List<TmodelDescr> tmodelDescrs,
62  			List<TmodelIdentifier> tmodelIdentifiers,
63  			TmodelCategoryBag categoryBag) {
64  		this.entityKey = entityKey;
65  		this.authorizedName = authorizedName;
66  		this.name = name;
67  		this.langCode = langCode;
68  		this.deleted = deleted;
69  		this.modified = modified;
70  		this.overviewDocs = overviewDocs;
71  		this.tmodelDescrs = tmodelDescrs;
72  		this.tmodelIdentifiers = tmodelIdentifiers;
73  		this.categoryBag = categoryBag;
74  	}
75  
76  	@Column(name = "name", nullable = false, length = 255)
77  	public String getName() {
78  		return this.name;
79  	}
80  	public void setName(String name) {
81  		this.name = name;
82  	}
83  
84  	@Column(name = "lang_code", length = 26)
85  	public String getLangCode() {
86  		return this.langCode;
87  	}
88  	public void setLangCode(String langCode) {
89  		this.langCode = langCode;
90  	}
91  
92  	@Column(name = "deleted")
93  	public boolean getDeleted() {
94  		return deleted;
95  	}
96  	public void setDeleted(boolean deleted) {
97  		this.deleted = deleted;
98  	}
99  	
100 	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmodel")
101 	@OrderBy
102 	public List<OverviewDoc> getOverviewDocs() {
103 		return this.overviewDocs;
104 	}
105 	
106 	public void setOverviewDocs(List<OverviewDoc> overviewDocs) {
107 		this.overviewDocs = overviewDocs;
108 	}
109 
110 	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmodel")
111 	@OrderBy
112 	public List<TmodelDescr> getTmodelDescrs() {
113 		return this.tmodelDescrs;
114 	}
115 	public void setTmodelDescrs(List<TmodelDescr> tmodelDescrs) {
116 		this.tmodelDescrs = tmodelDescrs;
117 	}
118 
119 	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmodel")
120 	@OrderBy
121 	public List<TmodelIdentifier> getTmodelIdentifiers() {
122 		return this.tmodelIdentifiers;
123 	}
124 	public void setTmodelIdentifiers(List<TmodelIdentifier> tmodelIdentifiers) {
125 		this.tmodelIdentifiers = tmodelIdentifiers;
126 	}
127 
128 	@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmodel")
129 	public TmodelCategoryBag getCategoryBag() {
130 		return this.categoryBag;
131 	}
132 	public void setCategoryBag(TmodelCategoryBag categoryBag) {
133 		this.categoryBag = categoryBag;
134 	}
135 
136         @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmodel")
137 	@OrderBy
138         public List<Signature> getSignatures() {
139                 return signatures;
140         }
141 
142         public void setSignatures(List<Signature> signatures) {
143                 this.signatures = signatures;
144         }
145 }