View Javadoc
1   package info.ejava.examples.ejb.basic.dto;
2   
3   import java.io.Serializable;
4   
5   /**
6    * This class represents a serializable DTO object that can be used to send and
7    * receive data to/from a remote interface.
8    */
9   public class Name implements Serializable {
10      private static final long serialVersionUID = 1L;
11      private String firstName;
12      private String lastName;
13  
14      public Name(String firstName, String lastName) {
15          this.firstName = firstName;
16          this.lastName = lastName;
17      }
18  
19      public String getFirstName() {
20          return firstName;
21      }
22  
23      public void setFirstName(String firstName) {
24          this.firstName = firstName;
25      }
26  
27      public String getLastName() {
28          return lastName;
29      }
30  
31      public void setLastName(String lastName) {
32          this.lastName = lastName;
33      }
34  
35      @Override
36      public String toString() {
37          StringBuilder builder = new StringBuilder();
38          builder.append("Name [firstName=").append(firstName)
39                  .append(", lastName=").append(lastName).append("]");
40          return builder.toString();
41      }
42  }