KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > annotations > onetoone > Address


1 //$Id: Address.java,v 1.1 2005/05/12 13:33:34 epbernard Exp $
2
package org.hibernate.test.annotations.onetoone;
3
4 import javax.persistence.Entity;
5 import javax.persistence.GeneratorType;
6 import javax.persistence.Id;
7
8 /**
9  * @author Emmanuel Bernard
10  */

11 @Entity
12 public class Address {
13
14     private Integer JavaDoc id;
15     private String JavaDoc city;
16
17     @Id(generate = GeneratorType.AUTO)
18     public Integer JavaDoc getId() {
19         return id;
20     }
21
22     public void setId(Integer JavaDoc id) {
23         this.id = id;
24     }
25
26     public String JavaDoc getCity() {
27         return city;
28     }
29
30     public void setCity(String JavaDoc city) {
31         this.city = city;
32     }
33 }
34
Popular Tags