KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > immutable > ContractVariation


1 //$Id: ContractVariation.java,v 1.1 2005/06/19 17:22:01 oneovthafew Exp $
2
package org.hibernate.test.immutable;
3
4 import java.io.Serializable JavaDoc;
5
6 public class ContractVariation implements Serializable JavaDoc {
7     
8     private int version;
9     private Contract contract;
10     private String JavaDoc text;
11
12     public Contract getContract() {
13         return contract;
14     }
15
16     public void setContract(Contract contract) {
17         this.contract = contract;
18     }
19
20     public String JavaDoc getText() {
21         return text;
22     }
23
24     public void setText(String JavaDoc text) {
25         this.text = text;
26     }
27
28     public int getVersion() {
29         return version;
30     }
31
32     public void setVersion(int version) {
33         this.version = version;
34     }
35
36     public ContractVariation() {
37         super();
38     }
39
40     public ContractVariation(int version, Contract contract) {
41         this.contract = contract;
42         this.version = version;
43         contract.getVariations().add(this);
44     }
45 }
46
Popular Tags