KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > tutorial > packaging > bean > Entity1


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.packaging.bean;
8
9 import java.io.Serializable JavaDoc;
10 import javax.persistence.Entity;
11 import javax.persistence.GeneratorType;
12 import javax.persistence.Id;
13
14 /**
15  * Comment
16  *
17  * @author <a HREF="mailto:bill@jboss.org">Bill Burke</a>
18  * @version $Revision: 1.1.2.2 $
19  */

20 @Entity
21 public class Entity1 implements Serializable JavaDoc
22 {
23    private int id;
24    private String JavaDoc string;
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 getString()
38    {
39       return string;
40    }
41
42    public void setString(String JavaDoc string)
43    {
44       this.string = string;
45    }
46 }
47
Popular Tags