package org.xman.ws.jersey.model;

import javax.xml.bind.annotation.XmlRootElement;
import java.util.Date;

@XmlRootElement
public class Message {

    private long id;
    private String author;
    private String message;
    private Date created;

    // 列表序列化时需要无参构造函数
    public Message() {
    }

    public Message(long id, String author, String message) {
        this.id = id;
        this.author = author;
        this.message = message;
        this.created = new Date();
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }
}

@@ -140,17 +140,16 @@
 ssage %7B%0A
-%0A
     priv
@@ -255,16 +255,20 @@
 // %E5%88%97%E8%A1%A8%E5%BA%8F%E5%88%97%E5%8C%96
+%E4%B8%BAXML
 %E6%97%B6%E9%9C%80%E8%A6%81%E6%97%A0%E5%8F%82%E6%9E%84%E9%80%A0%E5%87%BD
@@ -268,16 +268,31 @@
 %E9%9C%80%E8%A6%81%E6%97%A0%E5%8F%82%E6%9E%84%E9%80%A0%E5%87%BD%E6%95%B0
+,%E5%A6%82%E6%9E%9C%E5%8F%AA%E6%98%AF%E5%8D%95%E4%B8%AA%E5%AF%B9%E8%B1%A1,%E5%88%99%E4%B8%8D%E9%9C%80%E8%A6%81.
 %0A    pub

add RESTful Java with JAX-RS 2.0 update model