This project has retired. For details please refer to its Attic page.
CategoryBag 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.List;
20  
21  import javax.persistence.CascadeType;
22  import javax.persistence.Entity;
23  import javax.persistence.FetchType;
24  import javax.persistence.GeneratedValue;
25  import javax.persistence.GenerationType;
26  import javax.persistence.Id;
27  import javax.persistence.Inheritance;
28  import javax.persistence.InheritanceType;
29  import javax.persistence.OneToMany;
30  import javax.persistence.OrderBy;
31  import javax.persistence.Table;
32  
33  /**
34   * @author <a href="mailto:kurt@apache.org">Kurt T Stam</a>
35   */
36  @Entity
37  @Table(name = "j3_category_bag")
38  @Inheritance(strategy = InheritanceType.JOINED)
39  
40  public class CategoryBag implements java.io.Serializable {
41  	
42  	private static final long serialVersionUID = 972745223104626841L;
43  	private Long id;
44  	private List<KeyedReference> keyedReferences = new ArrayList<KeyedReference>(0);
45  	private List<KeyedReferenceGroup> keyedReferenceGroups = new ArrayList<KeyedReferenceGroup>(0);
46  	
47  	public CategoryBag() {
48  	}
49  
50  	@Id
51  	@GeneratedValue(strategy=GenerationType.AUTO)
52  	public Long getId() {
53  		return this.id;
54  	}
55  
56  	public void setId(Long id) {
57  		this.id = id;
58  	}
59  	
60  	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "categoryBag")
61  	@OrderBy
62  	public List<KeyedReference> getKeyedReferences() {
63  		return keyedReferences;
64  	}
65  	public void setKeyedReferences(List<KeyedReference> keyedReferences) {
66  		this.keyedReferences = keyedReferences;
67  	}
68  	
69  	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "categoryBag")
70  	@OrderBy
71  	public List<KeyedReferenceGroup> getKeyedReferenceGroups() {
72  		return keyedReferenceGroups;
73  	}
74  	public void setKeyedReferenceGroups(
75  			List<KeyedReferenceGroup> keyedReferenceGroups) {
76  		this.keyedReferenceGroups = keyedReferenceGroups;
77  	}
78  
79  
80  }