KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > hql > KeyManyToOneEntity


1 // $Id: KeyManyToOneEntity.java,v 1.1 2005/06/08 19:31:26 steveebersole Exp $
2
package org.hibernate.test.hql;
3
4 import java.io.Serializable JavaDoc;
5
6 /**
7  * Implementation of KeyManyToOneEntity.
8  *
9  * @author Steve Ebersole
10  */

11 public class KeyManyToOneEntity {
12     private Id id;
13     private String JavaDoc name;
14
15     public KeyManyToOneEntity(String JavaDoc name) {
16         this.name = name;
17     }
18
19     public String JavaDoc getName() {
20         return name;
21     }
22
23     public void setName(String JavaDoc name) {
24         this.name = name;
25     }
26
27     public static class Id implements Serializable JavaDoc {
28         private KeyManyToOneKeyEntity key1;
29         private String JavaDoc key2;
30
31         public Id(KeyManyToOneKeyEntity key1, String JavaDoc 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 JavaDoc getKey2() {
45             return key2;
46         }
47
48         public void setKey2(String JavaDoc key2) {
49             this.key2 = key2;
50         }
51     }
52 }
53
Popular Tags