1 package org.hibernate.test.hql; 3 4 import java.io.Serializable ; 5 6 11 public class KeyManyToOneEntity { 12 private Id id; 13 private String name; 14 15 public KeyManyToOneEntity(String name) { 16 this.name = name; 17 } 18 19 public String getName() { 20 return name; 21 } 22 23 public void setName(String name) { 24 this.name = name; 25 } 26 27 public static class Id implements Serializable { 28 private KeyManyToOneKeyEntity key1; 29 private String key2; 30 31 public Id(KeyManyToOneKeyEntity key1, String key2) { 32 this.key1 = key1; 33 this.key2 = key2; 34 } 35 36 public KeyManyToOneKeyEntity getKey1() { 37 return key1; 38 } 39 40 public void setKey1(KeyManyToOneKeyEntity key1) { 41 this.key1 = key1; 42 } 43 44 public String getKey2() { 45 return key2; 46 } 47 48 public void setKey2(String key2) { 49 this.key2 = key2; 50 } 51 } 52 } 53 | Popular Tags |