]> git.aero2k.de Git - tmp/jakarta-migration.git/blob
bf4fc509658187beeccf4b8e9797c6ac607dd95e
[tmp/jakarta-migration.git] /
1 package org.collectionspace.hello.entity;
2
3 import javax.xml.bind.annotation.XmlAccessType;
4 import javax.xml.bind.annotation.XmlAccessorType;
5 import javax.xml.bind.annotation.XmlAttribute;
6 import javax.xml.bind.annotation.XmlRootElement;
7 import javax.xml.bind.annotation.XmlType;
8 import javax.xml.bind.Unmarshaller;
9 import javax.xml.bind.Unmarshaller.Listener;
10 import javax.xml.bind.annotation.XmlElement;
11
12 @XmlRootElement
13 @XmlAccessorType(XmlAccessType.FIELD)
14 @XmlType(name = "person", propOrder = {
15     "firstName",
16     "lastName",
17     "street",
18     "city",
19     "state",
20     "zip",
21     "country"
22 })
23 public class Person extends Listener {
24
25     @XmlAttribute
26     private int id;
27     @XmlAttribute
28     private int version = 1;
29     private String firstName;
30     private String lastName;
31     private String street;
32     private String city;
33     private String state;
34     private String zip;
35     private String country;
36
37     public int getId() {
38         return id;
39     }
40
41     public void setId(int id) {
42         this.id = id;
43     }
44
45     /**
46      * @return the version
47      */
48     public int getVersion() {
49         return version;
50     }
51
52     /**
53      * @param version the version to set
54      */
55     public void setVersion(int version) {
56         this.version = version;
57     }
58
59     public String getFirstName() {
60         return firstName;
61     }
62
63     public void setFirstName(String firstName) {
64         this.firstName = firstName;
65     }
66
67     public String getLastName() {
68         return lastName;
69     }
70
71     public void setLastName(String lastName) {
72         this.lastName = lastName;
73     }
74
75     public String getStreet() {
76         return street;
77     }
78
79     public void setStreet(String street) {
80         this.street = street;
81     }
82
83     public String getCity() {
84         return city;
85     }
86
87     public void setCity(String city) {
88         this.city = city;
89     }
90
91     public String getState() {
92         return state;
93     }
94
95     public void setState(String state) {
96         this.state = state;
97     }
98
99     public String getZip() {
100         return zip;
101     }
102
103     public void setZip(String zip) {
104         this.zip = zip;
105     }
106
107     public String getCountry() {
108         return country;
109     }
110
111     public void setCountry(String country) {
112         this.country = country;
113     }
114
115     /**
116      * JAXB Callback method used to reassociate the item with the owning contact.
117      * JAXB doesn't seem to read this method from a super class and it must
118      * therefore be placed on any subclass.
119      *
120      * @param unmarshaller the JAXB {@link Unmarshaller}.
121      * @param parent the owning {@link Contact} instance.
122      */
123     public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
124         super.afterUnmarshal(unmarshaller, parent);
125     }
126 }