01: /*
02: * $Id: NameString.java 10789 2008-02-12 20:04:43Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.example.hello;
12:
13: import java.io.Serializable;
14:
15: /**
16: * <code>NameString</code> TODO (document class)
17: */
18: public class NameString implements Serializable {
19: /**
20: * Serial version
21: */
22: private static final long serialVersionUID = 7010138636008560022L;
23:
24: private String name;
25: private String greeting;
26:
27: public NameString() {
28: this .name = null;
29: }
30:
31: public NameString(String name) {
32: this .name = name;
33: }
34:
35: /**
36: * @return Returns the name.
37: */
38: public String getName() {
39: return name;
40: }
41:
42: /**
43: * @param name The name to set.
44: */
45: public void setName(String name) {
46: this .name = name;
47: }
48:
49: /**
50: * @return Returns the greeting.
51: */
52: public String getGreeting() {
53: return greeting;
54: }
55:
56: /**
57: * @param greeting The greeting to set.
58: */
59: public void setGreeting(String greeting) {
60: this .greeting = greeting;
61: }
62:
63: public boolean isValid() {
64: return name != null && name.length() > 0;
65: }
66:
67: }
|