PhysicianBean.java
01 package com.bea.medrec.beans;
02 
03 import com.bea.medrec.value.Physician;
04 
05 /**
06  <p>Form bean for the physician web application.</p>
07  *
08  @author Copyright (c) 2006 by BEA Systems. All Rights Reserved.
09  */
10 public final class PhysicianBean extends BaseBean {
11   // Instance Variables
12   private String firstName = "";
13   private String middleName = "";
14   private String lastName = "";
15   private String email = "";
16   private String phone = "";
17 
18   // Constructors
19   public PhysicianBean() {
20   }
21 
22   public PhysicianBean(String firstName,
23                        String lastName,
24                        String email) {
25     this.firstName = firstName;
26     this.lastName = lastName;
27     this.email = email;
28   }
29 
30   public PhysicianBean(String firstName,
31                        String middleName,
32                        String lastName,
33                        String email,
34                        String phone) {
35     this.firstName = firstName;
36     this.middleName = middleName;
37     this.lastName = lastName;
38     this.email = email;
39     this.phone = phone;
40   }
41 
42   // Getters
43   public String getFirstName() {
44     return this.firstName;
45   }
46 
47   public String getMiddleName() {
48     return this.middleName;
49   }
50 
51   public String getLastName() {
52     return this.lastName;
53   }
54 
55   public String getEmail() {
56     return this.email;
57   }
58 
59   public String getPhone() {
60     return this.phone;
61   }
62 
63   // Setters
64   public void setFirstName(String firstName) {
65     this.firstName = firstName;
66   }
67 
68   public void setMiddleName(String middleName) {
69     this.middleName = middleName;
70   }
71 
72   public void setLastName(String lastName) {
73     this.lastName = lastName;
74   }
75 
76   public void setEmail(String email) {
77     this.email = email;
78   }
79 
80   public void setPhone(String phone) {
81     this.phone = phone;
82   }
83 
84   public Physician toPhysician() {
85     Physician physician = new Physician();
86     physician.setFirstName(this.firstName);
87     physician.setMiddleName(this.middleName);
88     physician.setLastName(this.lastName);
89     physician.setEmail(this.email);
90     physician.setPhone(this.phone);
91     return physician;
92   }
93 
94 }