Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. @XmlRootElement(name="institut")
  2. @XmlAccessorType(javax.xml.bind.annotation.XmlAccessType.NONE)
  3.  
  4. @XmlType(propOrder= {"nom", "alumnes"})
  5. public class Institut {
  6. String nom;
  7. ArrayList<Alumne> alumnes = new ArrayList<Alumne>();
  8.  
  9. public Institut(String nom, ArrayList<Alumne> alumnes) {
  10. super();
  11. this.nom = nom;
  12. this.alumnes = alumnes;
  13. }
  14. public Institut() {
  15. super();
  16. }
  17. @XmlElement(name = "nom")
  18. public String getNom() {
  19. return nom;
  20. }
  21. public void setNom(String nom) {
  22. this.nom = nom;
  23. }
  24. @XmlElementWrapper(name="alumnes")
  25. @XmlElement(name="alumne")
  26. public ArrayList<Alumne> getAlumnes() {
  27. return alumnes;
  28. }
  29. public void setAlumnes(ArrayList<Alumne> alumnes) {
  30. this.alumnes = alumnes;
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement