KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > enterprise > web_jpa_war > entity > Person


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * Person.java
26  *
27  * Created on July 18, 2006, 4:30 PM
28  *
29  * To change this template, choose Tools | Template Manager
30  * and open the template in the editor.
31  */

32
33 package enterprise.web_jpa_war.entity;
34
35 import javax.persistence.Column;
36 import javax.persistence.Entity;
37 import javax.persistence.Id;
38 import javax.persistence.Table;
39
40 /**
41  *
42  * @author mitesh
43  */

44 @Entity
45 @Table(name = "PERSON")
46 public class Person {
47
48     @Id
49     @Column(name = "ID")
50     private String JavaDoc id;
51
52     @Column(name = "LASTNAME")
53     private String JavaDoc lastName;
54
55     @Column(name = "FIRSTNAME")
56     private String JavaDoc firstName;
57
58     /**
59      * Creates a new instance of Person
60      */

61     public Person() {
62     }
63
64     public Person(String JavaDoc id, String JavaDoc firstName, String JavaDoc lastName) {
65         this.id = id;
66         this.firstName = firstName;
67         this.lastName = lastName;
68     }
69
70     public String JavaDoc getId() {
71         return this.id;
72     }
73
74     public String JavaDoc getLastName() {
75         return this.lastName;
76     }
77
78     public String JavaDoc getFirstName() {
79         return this.firstName;
80     }
81     
82 }
83
Popular Tags