KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > ejb > test > pack > excludehbmpar > Caipirinha


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