1 package jspPhoneBook.business; 2 3 import jspPhoneBook.data.PersonDO; 4 5 6 11 public class Person { 12 13 private PersonDO p; 14 15 protected Person(PersonDO p) { 16 this.p = p; 17 } 18 19 public String getFirstName() { 20 try { 21 return p.getFirstName(); 22 } catch (Exception e) { 23 System.out.println(e); 24 return ""; 25 } 26 } 27 28 public String getLastName() { 29 try { 30 return p.getLastName(); 31 } catch (Exception e) { 32 System.out.println(e); 33 return ""; 34 } 35 } 36 37 public String getPhoneNumber() { 38 try { 39 return p.getPhoneNumber(); 40 } catch (Exception e) { 41 System.out.println(e); 42 return ""; 43 } 44 } 45 46 public String getId() throws Exception { 47 try { 48 return "" + p.getOId(); 49 } catch (Exception e) { 50 System.out.println(e); 51 return ""; 52 } 53 } 54 55 } 56 57 58 | Popular Tags |