OSDN Git Service

(no commit message)
[spiga-app/vaadin.git] / src / main / java / net / korabo / app / vaadin01 / ent / Contact.java
1 /*
2  * To change this license header, choose License Headers in Project Properties.
3  * To change this template file, choose Tools | Templates
4  * and open the template in the editor.
5  */
6 package net.korabo.app.vaadin01.ent;
7
8 import java.io.Serializable;
9 import java.util.Date;
10 import javax.persistence.Id;
11 import net.korabo.lib.beans.InstanceUtil;
12
13 /**
14  *
15  * @author cintake
16  */
17 public class Contact implements Serializable, Cloneable {
18
19     private Long id;
20
21     private String firstName = "";
22     private String lastName = "";
23     private String phone = "";
24     private String email = "";
25     private Date birthDate;
26
27     public Long getId() {
28         return id;
29     }
30
31     public void setId(Long id) {
32         this.id = id;
33     }
34
35     public String getFirstName() {
36         return firstName;
37     }
38
39     public void setFirstName(String firstName) {
40         this.firstName = firstName;
41     }
42
43     public String getLastName() {
44         return lastName;
45     }
46
47     public void setLastName(String lastName) {
48         this.lastName = lastName;
49     }
50
51     public String getPhone() {
52         return phone;
53     }
54
55     public void setPhone(String phone) {
56         this.phone = phone;
57     }
58
59     public String getEmail() {
60         return email;
61     }
62
63     public void setEmail(String email) {
64         this.email = email;
65     }
66
67     public Date getBirthDate() {
68         return birthDate;
69     }
70
71     public void setBirthDate(Date birthDate) {
72         this.birthDate = birthDate;
73     }
74
75     @Override
76     public Contact clone() throws CloneNotSupportedException {
77         try {
78             return (Contact) InstanceUtil.dupObj(this);
79         } catch (Exception ex) {
80             throw new CloneNotSupportedException();
81         }
82     }
83
84     @Override
85     public String toString() {
86         return "Contact{" + "id=" + id + ", firstName=" + firstName
87                 + ", lastName=" + lastName + ", phone=" + phone + ", email="
88                 + email + ", birthDate=" + birthDate + '}';
89     }
90
91 }
92  
93