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.Date;
19  
20  import javax.persistence.Column;
21  import javax.persistence.Entity;
22  import javax.persistence.FetchType;
23  import javax.persistence.Id;
24  import javax.persistence.ManyToOne;
25  import javax.persistence.Table;
26  import javax.persistence.Temporal;
27  import javax.persistence.TemporalType;
28  import javax.persistence.Transient;
29  
30  /**
31   * @author <a href="mailto:kurt@apache.org">Kurt T Stam</a>
32   */
33  @Entity
34  @Table(name = "j3_client_subscriptioninfo")
35  public class ClientSubscriptionInfo implements java.io.Serializable {
36  
37  	@Transient
38  	private static final long serialVersionUID = -1739525637445572028L;
39  	
40  	@Id()
41  	@Column(name="subscription_key", nullable = false, length=255)
42  	private String subscriptionKey;
43  	@ManyToOne(fetch = FetchType.EAGER)
44  	private Clerk fromClerk;
45  	@ManyToOne(fetch = FetchType.EAGER)
46  	private Clerk toClerk;
47  	@Temporal(TemporalType.TIMESTAMP)
48  	@Column(name="last_notified", length = 29)
49  	private Date lastNotified;
50  	
51  	public ClientSubscriptionInfo(){}
52  	
53  	public ClientSubscriptionInfo(Clerk fromClerk, Clerk toClerk, Date lastNotified,
54  			String subscriptionKey) {
55  		super();
56  		this.fromClerk = fromClerk;
57  		this.toClerk = toClerk;
58  		this.lastNotified = lastNotified;
59  		this.subscriptionKey = subscriptionKey;
60  	}
61  	public String getSubscriptionKey() {
62  		return subscriptionKey;
63  	}
64  	public void setSubscriptionKey(String subscriptionKey) {
65  		this.subscriptionKey = subscriptionKey;
66  	}
67  	public Clerk getFromClerk() {
68  		return fromClerk;
69  	}
70  	public void setFromClerk(Clerk fromClerk) {
71  		this.fromClerk = fromClerk;
72  	}
73  	public Clerk getToClerk() {
74  		return toClerk;
75  	}
76  	public void setToClerk(Clerk toClerk) {
77  		this.toClerk = toClerk;
78  	}
79  	public Date getLastNotified() {
80  		return lastNotified;
81  	}
82  	public void setLastNotified(Date lastNotified) {
83  		this.lastNotified = lastNotified;
84  	}
85  	
86  	
87  
88  }