Registration.java
01 package com.bea.medrec.value;
02 
03 /**
04  <p>Represents information about a registration which is
05  * made up of patient data and user (username and password) date.</p>
06  *
07  @author Copyright (c) 2006 by BEA Systems. All Rights Reserved.
08  */
09 public final class Registration extends BaseVO {
10 
11   private Patient patient = null;
12   private User user = null;
13 
14   // Constuctors
15   public Registration() {
16   }
17 
18   public Registration(Patient pPatient, User pUser) {
19     this.patient = pPatient;
20     this.user = pUser;
21   }
22 
23   // Getters
24   public Patient getPatient() {
25     return this.patient;
26   }
27 
28   public User getUser() {
29     return this.user;
30   }
31 
32   // Setters
33   public void setPatient(Patient pPatient) {
34     this.patient = pPatient;
35   }
36 
37   public void setUser(User pUser) {
38     this.user = pUser;
39   }
40 
41   public String toString() {
42     StringBuffer str = new StringBuffer();
43     str.append("Registration["+user.toString());
44     str.append(" | "+patient.toStringLite());
45     str.append("]");
46     return str.toString();
47   }
48 }