package com.primeton.dgs.workspace.extractor.jaxb; import javax.xml.bind.annotation.XmlAccessOrder; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorOrder; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlType; import java.io.Serializable; /** *
 *
 * Created by zhaopx.
 * User: zhaopx
 * Date: 2019/9/10
 * Time: 14:14
 *
 * 
* * @author zhaopx */ @XmlType(propOrder = {}) @XmlRootElement(name = "user") @XmlAccessorType(XmlAccessType.PROPERTY) @XmlAccessorOrder(XmlAccessOrder.ALPHABETICAL) public class User implements Serializable { private String userName; private int age; private String role; private String bibi; public User() { } public User(String userName, int age, String role, String bibi) { this.userName = userName; this.age = age; this.role = role; this.bibi = bibi; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } @XmlAttribute public int getAge() { return age; } public void setAge(int age) { this.age = age; } @XmlElement public String getRole() { return role; } public void setRole(String role) { this.role = role; } @XmlTransient public String getBibi() { return bibi; } public void setBibi(String bibi) { this.bibi = bibi; } @Override public String toString() { return "User{" + "userName='" + userName + '\'' + ", age=" + age + ", role='" + role + '\'' + ", bibi='" + bibi + '\'' + '}'; } }