1 package org.hibernate.test.immutable; 3 4 import java.io.Serializable ; 5 6 public class ContractVariation implements Serializable { 7 8 private int version; 9 private Contract contract; 10 private String 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 getText() { 21 return text; 22 } 23 24 public void setText(String 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 |