KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > annotations > manytomany > City


1 //$Id: City.java,v 1.1 2005/05/12 13:33:33 epbernard Exp $
2
package org.hibernate.test.annotations.manytomany;
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 City {
13     private Integer JavaDoc id;
14     private String JavaDoc name;
15
16     @Id(generate = GeneratorType.AUTO)
17     public Integer JavaDoc getId() {
18         return id;
19     }
20
21     public void setId(Integer JavaDoc id) {
22         this.id = id;
23     }
24
25     public String JavaDoc getName() {
26         return name;
27     }
28
29     public void setName(String JavaDoc name) {
30         this.name = name;
31     }
32 }
33
Popular Tags