View Javadoc
1   package info.ejava.examples.ejb.basic.dto;
2   
3   import java.io.Serializable;
4   import java.util.Date;
5   
6   /**
7    * This class represents a serializable DTO object that can be used to send and
8    * receive data to/from a remote interface.
9    */
10  public class Greeting implements Serializable {
11      private static final long serialVersionUID = 1L;
12      private Date date;
13      private String message;
14  
15      public Greeting(Date date, String message) {
16          this.date = date;
17          this.message = message;
18      }
19  
20      public String getGreeting() {
21          return date + ":" + message;
22      }
23  
24      @Override
25      public String toString() {
26          return getGreeting();
27      }
28  }