KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > tutorial > extended > bean > Customer


1 //$Id: Customer.java,v 1.1.2.2 2005/06/24 05:26:28 bill Exp $
2
package org.jboss.tutorial.extended.bean;
3
4 import javax.persistence.Entity;
5 import javax.persistence.GeneratorType;
6 import javax.persistence.Id;
7
8 /**
9  * Company customer
10  *
11  * @author Emmanuel Bernard
12  */

13 @Entity
14 public class Customer implements java.io.Serializable JavaDoc
15 {
16    long id;
17    String JavaDoc name;
18
19    public
20    Customer()
21    {
22    }
23
24    @Id(generate = GeneratorType.IDENTITY)
25    public
26    long getId()
27    {
28       return id;
29    }
30
31    public
32    String JavaDoc getName()
33    {
34       return name;
35    }
36
37    public
38    void setId(long long1)
39    {
40       id = long1;
41    }
42
43    public
44    void setName(String JavaDoc string)
45    {
46       name = string;
47    }
48
49 }
50
51
Popular Tags