Merge "BUG-2329 Add test for anyxmls inside rpc resonse for netcfon-connector"
[controller.git] / opendaylight / northbound / commons / src / test / java / org / opendaylight / controller / northbound / commons / query / PersonBean.java
1 /**
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.controller.northbound.commons.query;
9
10 import java.util.List;
11
12 import javax.xml.bind.annotation.XmlElement;
13 import javax.xml.bind.annotation.XmlElementWrapper;
14 import javax.xml.bind.annotation.XmlRootElement;
15
16 @XmlRootElement(name="person")
17
18 public class PersonBean {
19
20     @XmlElement
21     public String firstName;
22     @XmlElement
23     public String lastName;
24     @XmlElement
25     public String city;
26     @XmlElement
27     public int id;
28
29     @XmlElementWrapper(name="emails") // ElementWrapper iteratable type
30     @XmlElement
31     public List<String> email;
32
33     public PersonBean(){}
34     public PersonBean(int n, String f, String l, String c) {
35         firstName = f;
36         lastName = l;
37         city = c;
38         id = n;
39     }
40
41     public void setEmail(List<String> emails){
42         email = emails;
43     }
44     @Override
45     public String toString() {
46         return "PersonBean [firstName=" + firstName + ", lastName=" + lastName
47                 + ", city=" + city + ", id=" + id + "]";
48     }
49
50 }