Soggetto.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.core.commons.search;

  21. import javax.xml.bind.annotation.XmlAccessType;
  22. import javax.xml.bind.annotation.XmlAccessorType;
  23. import javax.xml.bind.annotation.XmlElement;
  24. import javax.xml.bind.annotation.XmlRootElement;
  25. import javax.xml.bind.annotation.XmlType;
  26. import java.io.Serializable;
  27. import java.util.ArrayList;
  28. import java.util.List;


  29. /** <p>Java class for soggetto complex type.
  30.  *
  31.  * <p>The following schema fragment specifies the expected content contained within this class.
  32.  *
  33.  * <pre>
  34.  * &lt;complexType name="soggetto"&gt;
  35.  *      &lt;sequence&gt;
  36.  *          &lt;element name="nome-soggetto" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="1" maxOccurs="1"/&gt;
  37.  *          &lt;element name="tipo-soggetto" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="1" maxOccurs="1"/&gt;
  38.  *          &lt;element name="server" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0" maxOccurs="1"/&gt;
  39.  *          &lt;element name="identificativo-porta" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0" maxOccurs="1"/&gt;
  40.  *          &lt;element name="soggetto-ruolo" type="{http://www.openspcoop2.org/core/commons/search}soggetto-ruolo" minOccurs="0" maxOccurs="unbounded"/&gt;
  41.  *      &lt;/sequence&gt;
  42.  * &lt;/complexType&gt;
  43.  * </pre>
  44.  *
  45.  * @version $Rev$, $Date$
  46.  *
  47.  * @author Poli Andrea (poli@link.it)
  48.  * @author $Author$
  49.  * */

  50. @XmlAccessorType(XmlAccessType.FIELD)
  51. @XmlType(name = "soggetto",
  52.   propOrder = {
  53.     "nomeSoggetto",
  54.     "tipoSoggetto",
  55.     "server",
  56.     "identificativoPorta",
  57.     "soggettoRuolo"
  58.   }
  59. )

  60. @XmlRootElement(name = "soggetto")

  61. public class Soggetto extends org.openspcoop2.utils.beans.BaseBeanWithId implements Serializable , Cloneable {
  62.   public Soggetto() {
  63.     super();
  64.   }

  65.   public java.lang.String getNomeSoggetto() {
  66.     return this.nomeSoggetto;
  67.   }

  68.   public void setNomeSoggetto(java.lang.String nomeSoggetto) {
  69.     this.nomeSoggetto = nomeSoggetto;
  70.   }

  71.   public java.lang.String getTipoSoggetto() {
  72.     return this.tipoSoggetto;
  73.   }

  74.   public void setTipoSoggetto(java.lang.String tipoSoggetto) {
  75.     this.tipoSoggetto = tipoSoggetto;
  76.   }

  77.   public java.lang.String getServer() {
  78.     return this.server;
  79.   }

  80.   public void setServer(java.lang.String server) {
  81.     this.server = server;
  82.   }

  83.   public java.lang.String getIdentificativoPorta() {
  84.     return this.identificativoPorta;
  85.   }

  86.   public void setIdentificativoPorta(java.lang.String identificativoPorta) {
  87.     this.identificativoPorta = identificativoPorta;
  88.   }

  89.   public void addSoggettoRuolo(SoggettoRuolo soggettoRuolo) {
  90.     this.soggettoRuolo.add(soggettoRuolo);
  91.   }

  92.   public SoggettoRuolo getSoggettoRuolo(int index) {
  93.     return this.soggettoRuolo.get( index );
  94.   }

  95.   public SoggettoRuolo removeSoggettoRuolo(int index) {
  96.     return this.soggettoRuolo.remove( index );
  97.   }

  98.   public List<SoggettoRuolo> getSoggettoRuoloList() {
  99.     return this.soggettoRuolo;
  100.   }

  101.   public void setSoggettoRuoloList(List<SoggettoRuolo> soggettoRuolo) {
  102.     this.soggettoRuolo=soggettoRuolo;
  103.   }

  104.   public int sizeSoggettoRuoloList() {
  105.     return this.soggettoRuolo.size();
  106.   }

  107.   private static final long serialVersionUID = 1L;

  108.   private static org.openspcoop2.core.commons.search.model.SoggettoModel modelStaticInstance = null;
  109.   private static synchronized void initModelStaticInstance(){
  110.       if(org.openspcoop2.core.commons.search.Soggetto.modelStaticInstance==null){
  111.             org.openspcoop2.core.commons.search.Soggetto.modelStaticInstance = new org.openspcoop2.core.commons.search.model.SoggettoModel();
  112.       }
  113.   }
  114.   public static org.openspcoop2.core.commons.search.model.SoggettoModel model(){
  115.       if(org.openspcoop2.core.commons.search.Soggetto.modelStaticInstance==null){
  116.             initModelStaticInstance();
  117.       }
  118.       return org.openspcoop2.core.commons.search.Soggetto.modelStaticInstance;
  119.   }


  120.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  121.   @XmlElement(name="nome-soggetto",required=true,nillable=false)
  122.   protected java.lang.String nomeSoggetto;

  123.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  124.   @XmlElement(name="tipo-soggetto",required=true,nillable=false)
  125.   protected java.lang.String tipoSoggetto;

  126.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  127.   @XmlElement(name="server",required=false,nillable=false)
  128.   protected java.lang.String server;

  129.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  130.   @XmlElement(name="identificativo-porta",required=false,nillable=false)
  131.   protected java.lang.String identificativoPorta;

  132.   @XmlElement(name="soggetto-ruolo",required=true,nillable=false)
  133.   private List<SoggettoRuolo> soggettoRuolo = new ArrayList<>();

  134.   /**
  135.    * Use method getSoggettoRuoloList
  136.    * @return List&lt;SoggettoRuolo&gt;
  137.   */
  138.   public List<SoggettoRuolo> getSoggettoRuolo() {
  139.     return this.getSoggettoRuoloList();
  140.   }

  141.   /**
  142.    * Use method setSoggettoRuoloList
  143.    * @param soggettoRuolo List&lt;SoggettoRuolo&gt;
  144.   */
  145.   public void setSoggettoRuolo(List<SoggettoRuolo> soggettoRuolo) {
  146.     this.setSoggettoRuoloList(soggettoRuolo);
  147.   }

  148.   /**
  149.    * Use method sizeSoggettoRuoloList
  150.    * @return lunghezza della lista
  151.   */
  152.   public int sizeSoggettoRuolo() {
  153.     return this.sizeSoggettoRuoloList();
  154.   }

  155. }