This project has retired. For details please refer to its Attic page.
TransferToken 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  
18  package org.apache.juddi.model;
19  
20  import javax.persistence.*;
21  import java.util.ArrayList;
22  import java.util.Date;
23  import java.util.List;
24  
25  /**
26   * @author <a href="mailto:jfaath@apache.org">Jeff Faath</a>
27   */
28  @Entity
29  @Table(name = "j3_transfer_token")
30  public class TransferToken implements java.io.Serializable{
31  
32  	private static final long serialVersionUID = -7361461730400118274L;
33  	private String transferToken;
34  	private Date expirationDate;
35  	protected List<TransferTokenKey> transferKeys = new ArrayList<TransferTokenKey>(0);
36  	
37  	public TransferToken() {
38  	}
39  
40  	public TransferToken(String transferToken, Date expirationDate,
41  			List<TransferTokenKey> transferKeys) {
42  		this.transferToken = transferToken;
43  		this.expirationDate = expirationDate;
44  		this.transferKeys = transferKeys;
45  	}
46  
47  	@Id
48  	@Column(name = "transfer_token", nullable = false, length = 51)
49  	public String getTransferToken() {
50  		return transferToken;
51  	}
52  	public void setTransferToken(String transferToken) {
53  		this.transferToken = transferToken;
54  	}
55  
56  	@Temporal(TemporalType.TIMESTAMP)
57      @Column(name="expiration_date", nullable = false, updatable = false)
58  	public Date getExpirationDate() {
59  		return expirationDate;
60  	}
61  	public void setExpirationDate(Date expirationDate) {
62  		this.expirationDate = expirationDate;
63  	}
64  
65  	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "transferToken")
66  	@OrderBy
67  	public List<TransferTokenKey> getTransferKeys() {
68  		return transferKeys;
69  	}
70  	public void setTransferKeys(List<TransferTokenKey> transferKeys) {
71  		this.transferKeys = transferKeys;
72  	}
73  	
74  
75  }