KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > tutorial > dirbyresource > Customer


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.tutorial.dirbyresource;
8
9 import java.io.Serializable JavaDoc;
10 import javax.persistence.Entity;
11 import javax.persistence.Id;
12 import javax.persistence.GeneratorType;
13
14 /**
15  * Comment
16  *
17  * @author <a HREF="mailto:bill@jboss.org">Bill Burke</a>
18  * @version $Revision: 1.1 $
19  */

20 @Entity
21 public class Customer implements Serializable JavaDoc
22 {
23    private int id;
24    private String JavaDoc name;
25
26    @Id(generate=GeneratorType.AUTO)
27    public int getId()
28    {
29       return id;
30    }
31
32    public void setId(int id)
33    {
34       this.id = id;
35    }
36
37    public String JavaDoc getName()
38    {
39       return name;
40    }
41
42    public void setName(String JavaDoc name)
43    {
44       this.name = name;
45    }
46
47 }
48
Popular Tags