View Javadoc
1   /*
2    * Copyright 2012 The Apache Software Foundation.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.apache.juddi.model;
17  
18  import java.util.List;
19  import javax.persistence.CascadeType;
20  import javax.persistence.Column;
21  import javax.persistence.Entity;
22  import javax.persistence.FetchType;
23  import javax.persistence.GeneratedValue;
24  import javax.persistence.GenerationType;
25  import javax.persistence.Id;
26  import javax.persistence.JoinColumn;
27  import javax.persistence.ManyToOne;
28  import javax.persistence.OneToMany;
29  import javax.persistence.OrderBy;
30  import javax.persistence.Table;
31  
32  /**
33   *
34   */
35  @Entity
36  @Table(name = "j3_sig")
37  public class Signature implements java.io.Serializable {
38      private static final long serialVersionUID = -3233157941119408718L;
39      
40      private Long id;
41      private SignedInfo signedInfo;
42      private SignatureValue signatureValue;
43      private KeyInfo keyInfo;
44      private List<ObjectType> object;
45      private BusinessEntity businessEntity;
46      private BusinessService businessService;
47      private Publisher publisher;
48      private BindingTemplate bindingTemplate;
49      private ReplicationConfiguration replConfig;
50      private Tmodel tmodel;
51      private String xmlID;
52      private String assertionFromKey;
53      private String assertionToKey;
54  
55      @Id
56      @GeneratedValue(strategy=GenerationType.AUTO)
57      public Long getId() {
58          return id;
59      }
60  
61      public void setId(Long id) {
62          this.id = id;
63      }
64  
65      @ManyToOne
66      @JoinColumn(name = "binding_template_key", nullable = true)
67      public BindingTemplate getBindingTemplate() {
68          return bindingTemplate;
69      }
70  
71      public void setBindingTemplate(BindingTemplate bindingTemplate) {
72          this.bindingTemplate = bindingTemplate;
73      }
74      
75      
76      
77      @Column(nullable = true, length = 255, name = "passertionfrom")
78      public String getPublisherAssertionFromKey() {
79          return assertionFromKey;
80      }
81  
82      public void setPublisherAssertionFromKey(String item) {
83          this.assertionFromKey = item;
84      }
85      @Column(nullable = true, length = 255, name = "passertionto")
86      public String getPublisherAssertionToKey() {
87          return assertionFromKey;
88      }
89      public void setPublisherAssertionToKey(String item) {
90          this.assertionToKey = item;
91      }
92   
93      
94       @ManyToOne
95      @JoinColumn(name = "repl_config_key", nullable = true)
96      public ReplicationConfiguration getReplicationConfiguration() {
97          return replConfig;
98      }
99  
100     public void setReplicationConfiguration(ReplicationConfiguration bindingTemplate) {
101         this.replConfig = bindingTemplate;
102     }
103     
104 
105     @ManyToOne
106     @JoinColumn(name = "tmodel_key", nullable = true)
107     public Tmodel getTmodel() {
108         return tmodel;
109     }
110 
111     public void setTmodel(Tmodel tmodel) {
112         this.tmodel = tmodel;
113     }
114     
115     @ManyToOne
116     @JoinColumn(name = "publisher_key", nullable = true)
117     public Publisher getPublisher() {
118         return publisher;
119     }
120 
121     public void setPublisher(Publisher publisher) {
122         this.publisher = publisher;
123     }
124     
125     @ManyToOne
126     @JoinColumn(name = "business_service_key", nullable = true)
127     public BusinessService getBusinessService() {
128         return businessService;
129     }
130 
131     public void setBusinessService(BusinessService businessService) {
132         this.businessService = businessService;
133     }
134     
135     @ManyToOne
136     @JoinColumn(name = "business_key", nullable = true)
137     public BusinessEntity getBusinessEntity() {
138         return businessEntity;
139     }
140 
141     public void setBusinessEntity(BusinessEntity businessEntity) {
142         this.businessEntity = businessEntity;
143     }
144 
145     @ManyToOne(fetch = FetchType.LAZY, cascade=CascadeType.ALL)
146     @JoinColumn(name = "signed_info", nullable = false)
147     public SignedInfo getSignedInfo() {
148         return signedInfo;
149     }
150 
151     public void setSignedInfo(SignedInfo signedInfo) {
152         this.signedInfo = signedInfo;
153     }
154 
155     @ManyToOne(fetch = FetchType.LAZY, cascade=CascadeType.ALL)
156     @JoinColumn(name = "signature_value", nullable = false)
157     public SignatureValue getSignatureValue() {
158         return signatureValue;
159     }
160 
161     public void setSignatureValue(SignatureValue signatureValue) {
162         this.signatureValue = signatureValue;
163     }
164 
165     @ManyToOne(fetch = FetchType.LAZY, cascade=CascadeType.ALL)
166     @JoinColumn(name = "key_info", nullable = false)
167     public KeyInfo getKeyInfo() {
168         return keyInfo;
169     }
170 
171     public void setKeyInfo(KeyInfo keyInfo) {
172         this.keyInfo = keyInfo;
173     }
174 
175     @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "signature")
176     @OrderBy
177     public List<ObjectType> getObject() {
178         return object;
179     }
180 
181     public void setObject(List<ObjectType> object) {
182         this.object = object;
183     }
184 
185     @Column(name="xml_id")
186     public String getXmlID() {
187         return xmlID;
188     }
189 
190     public void setXmlID(String xmlID) {
191         this.xmlID = xmlID;
192     }
193 }