This project has retired. For details please refer to its Attic page.
SubscriptionMatch xref
View Javadoc
1   /*
2    * Copyright 2001-2008 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   */
17  package org.apache.juddi.model;
18  
19  import javax.persistence.Column;
20  import javax.persistence.Entity;
21  import javax.persistence.FetchType;
22  import javax.persistence.GeneratedValue;
23  import javax.persistence.GenerationType;
24  import javax.persistence.Id;
25  import javax.persistence.JoinColumn;
26  import javax.persistence.ManyToOne;
27  import javax.persistence.Table;
28  
29  /**
30   * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
31   */
32  @Entity
33  @Table(name = "j3_subscription_match")
34  public class SubscriptionMatch implements java.io.Serializable {
35  
36  	private static final long serialVersionUID = -7603419240922639070L;
37  	private Long id;
38  	private Subscription subscription;
39  	private String entityKey;
40  
41  	public SubscriptionMatch() {
42  	}
43  	
44  	public SubscriptionMatch(Subscription subscription, String entityKey) {
45  		this.subscription = subscription;
46  		this.entityKey = entityKey;
47  	}
48  
49  	@Id
50  	@GeneratedValue(strategy=GenerationType.AUTO)
51  	public Long getId() {
52  		return id;
53  	}
54  	public void setId(Long id) {
55  		this.id = id;
56  	}
57  
58  	@ManyToOne(fetch = FetchType.LAZY)
59  	@JoinColumn(name = "subscription_key", nullable = false)
60  	public Subscription getSubscription() {
61  		return subscription;
62  	}
63  	public void setSubscription(Subscription subscription) {
64  		this.subscription = subscription;
65  	}
66  
67  	@Column(name = "entity_key", nullable = false)
68  	public String getEntityKey() {
69  		return entityKey;
70  	}
71  	public void setEntityKey(String entityKey) {
72  		this.entityKey = entityKey;
73  	}
74  
75  	
76  	
77  }