//$Id: Name.java,v 1.1.2.1 2004/07/29 05:30:21 steveebersole Exp $
package org.jboss.test.hibernate.model;

import java.io.Serializable;

/**
 * @author Gavin King
 */
public class Name implements Serializable {
	private String firstName;
	private String lastName;
	private Character initial;
	
	public Name() {}
	
	public Name(String first, Character middle, String last) {
		firstName = first;
		initial = middle;
		lastName = last;
	}
	
	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public Character getInitial() {
		return initial;
	}

	public void setInitial(Character initial) {
		this.initial = initial;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	
	public String toString() {
		StringBuffer buf = new StringBuffer()
			.append(firstName)
			.append(' ');
		if (initial!=null) buf.append(initial)
			.append(' ');
		return buf.append(lastName)
			.toString();
	}

}

