This project has retired. For details please refer to its
Attic page.
KeyedReferenceGroup 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
21 import javax.persistence.CascadeType;
22 import javax.persistence.Column;
23 import javax.persistence.Entity;
24 import javax.persistence.FetchType;
25 import javax.persistence.GeneratedValue;
26 import javax.persistence.GenerationType;
27 import javax.persistence.Id;
28 import javax.persistence.JoinColumn;
29 import javax.persistence.ManyToOne;
30 import javax.persistence.OneToMany;
31 import javax.persistence.OrderBy;
32 import javax.persistence.Table;
33
34
35
36
37 @Entity
38 @Table(name = "j3_keyed_reference_group")
39 public class KeyedReferenceGroup implements java.io.Serializable {
40
41 private static final long serialVersionUID = 837654280200149969L;
42 private Long id;
43 private CategoryBag categoryBag;
44 private String tmodelKey;
45 private List<KeyedReference> keyedReferences = new ArrayList<KeyedReference>(0);
46
47
48 public KeyedReferenceGroup() {
49 }
50
51 public KeyedReferenceGroup(CategoryBag categoryBag, String tmodelKey) {
52 this.categoryBag = categoryBag;
53 this.tmodelKey = tmodelKey;
54 }
55
56 @Id
57 @GeneratedValue(strategy=GenerationType.AUTO)
58 public Long getId() {
59 return this.id;
60 }
61 public void setId(Long id) {
62 this.id = id;
63 }
64
65 @Column(name = "tmodel_key", length = 255)
66 public String getTmodelKey() {
67 return this.tmodelKey;
68 }
69 public void setTmodelKey(String tmodelKey) {
70 this.tmodelKey = tmodelKey;
71 }
72
73 @ManyToOne(fetch = FetchType.LAZY)
74 @JoinColumn(name = "category_bag_id", nullable = false)
75 public CategoryBag getCategoryBag() {
76 return this.categoryBag;
77 }
78 public void setCategoryBag(CategoryBag categoryBag) {
79 this.categoryBag = categoryBag;
80 }
81
82 @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "keyedReferenceGroup")
83 @OrderBy
84 public List<KeyedReference> getKeyedReferences() {
85 return keyedReferences;
86 }
87 public void setKeyedReferences(List<KeyedReference> keyedReferences) {
88 this.keyedReferences = keyedReferences;
89 }
90
91 }