1 package org.hibernate.test.lob; 3 4 import java.io.Serializable ; 5 6 11 public class Name implements Serializable { 12 13 private String firstName; 14 private String lastName; 15 private Character initial; 16 17 public Name() {} 18 19 public Name(String first, Character middle, String last) { 20 firstName = first; 21 initial = middle; 22 lastName = last; 23 } 24 25 public String getFirstName() { 26 return firstName; 27 } 28 29 public void setFirstName(String firstName) { 30 this.firstName = firstName; 31 } 32 33 public Character getInitial() { 34 return initial; 35 } 36 37 public void setInitial(Character initial) { 38 this.initial = initial; 39 } 40 41 public String getLastName() { 42 return lastName; 43 } 44 45 public void setLastName(String lastName) { 46 this.lastName = lastName; 47 } 48 49 public String toString() { 50 StringBuffer buf = new StringBuffer () 51 .append(firstName) 52 .append(' '); 53 if (initial!=null) buf.append(initial) 54 .append(' '); 55 return buf.append(lastName) 56 .toString(); 57 } 58 } 59 | Popular Tags |