1 package org.hibernate.test.annotations.embedded; 3 4 import javax.persistence.AccessType; 5 import javax.persistence.Column; 6 import javax.persistence.Embeddable; 7 import java.io.Serializable ; 8 9 13 @Embeddable(access=AccessType.PROPERTY) 14 public class Country implements Serializable { 15 private String iso2; 16 private String name; 17 18 public String getIso2() { 19 return iso2; 20 } 21 22 public void setIso2(String iso2) { 23 this.iso2 = iso2; 24 } 25 26 @Column(name="countryName") 27 public String getName() { 28 return name; 29 } 30 31 public void setName(String name) { 32 this.name = name; 33 } 34 35 } 36 | Popular Tags |