1 package info.ejava.examples.jaxrs.todos.dto; 2 3 import java.io.Serializable; 4 5 import javax.xml.bind.annotation.XmlRootElement; 6 7 @XmlRootElement(name="message", namespace="urn:ejava.jaxrs.todos") 8 public class MessageDTO implements Serializable { 9 private static final long serialVersionUID = 1L; 10 private String text; 11 12 public MessageDTO() {} 13 public MessageDTO(String message) { 14 this.text = message; 15 } 16 17 public String getText() { 18 return text; 19 } 20 public void setText(String text) { 21 this.text = text; 22 } 23 24 @Override 25 public String toString() { 26 return text; 27 } 28 }