// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package xmlproc;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;

public class Employee {
	private int no;
	private String name;
	private String role;
	public Employee() {
		this(0, null, null);
	}
	public Employee(int no, String name, String role) {
		this.no = no;
		this.name = name;
		this.role = role;
	}
	@XmlAttribute
	public int getNo() {
		return no;
	}
	public void setNo(int no) {
		this.no = no;
	}
	@XmlElement
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@XmlElement
	public String getRole() {
		return role;
	}
	public void setRole(String role) {
		this.role = role;
	}
	@Override
	public String toString() {
		return String.format("[%d,%s,%s]", no, name, role);
	}
}
