1 16 package org.apache.cocoon.forms.samples.dreamteam; 17 18 21 public class TeamMember { 22 private String memberId = null; 23 private String name = null; 24 private String position = null; 25 private String country = null; 26 27 public TeamMember() { 28 super(); 29 } 30 31 public String getMemberId() { 32 return memberId; 33 } 34 35 public void setMemberId(String memberID) { 36 this.memberId = memberID; 37 } 38 39 public String getName() { 40 return name; 41 } 42 43 public String getLastName() { 44 if (name == null) { 45 return "Name not set!"; 46 } 47 String lastName = name.substring(name.indexOf(" ") + 1); 48 if (lastName.equals("")) { 49 lastName = name; 50 } 51 return lastName; 52 } 53 54 public void setName(String name) { 55 this.name = name; 56 } 57 58 public String getPosition() { 59 return position; 60 } 61 62 public void setPosition(String profession) { 63 this.position = profession; 64 } 65 66 public String getCountry() { 67 return country; 68 } 69 70 public void setCountry(String country) { 71 this.country = country; 72 } 73 74 public String toString() { 75 String result = "<member id='" + memberId + "'><name>" + name 76 + "</name><position>" + position + "</position><country>" 77 + country + "</country></member>"; 78 return result; 79 } 80 81 } 82 | Popular Tags |