1 package info.ejava.examples.ejb.basic.dto;
2
3 import java.io.Serializable;
4 import java.util.Date;
5
6
7
8
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 }