01: /*
02: * Copyright 2004-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.compass.gps.device.hibernate.eg;
18:
19: /**
20: * @author Gavin King
21: */
22: public class Name {
23: private String firstName;
24:
25: private String lastName;
26:
27: private Character initial;
28:
29: private Name() {
30: }
31:
32: public Name(String first, Character middle, String last) {
33: firstName = first;
34: initial = middle;
35: lastName = last;
36: }
37:
38: public String getFirstName() {
39: return firstName;
40: }
41:
42: public void setFirstName(String firstName) {
43: this .firstName = firstName;
44: }
45:
46: public Character getInitial() {
47: return initial;
48: }
49:
50: public void setInitial(Character initial) {
51: this .initial = initial;
52: }
53:
54: public String getLastName() {
55: return lastName;
56: }
57:
58: public void setLastName(String lastName) {
59: this .lastName = lastName;
60: }
61:
62: public String toString() {
63: StringBuffer buf = new StringBuffer().append(firstName).append(
64: ' ');
65: if (initial != null)
66: buf.append(initial).append(' ');
67: return buf.append(lastName).toString();
68: }
69:
70: }
|