AccessoRegistro.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.config;

  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 accesso-registro complex type.
  30.  *
  31.  * <p>The following schema fragment specifies the expected content contained within this class.
  32.  *
  33.  * <pre>
  34.  * &lt;complexType name="accesso-registro"&gt;
  35.  *      &lt;sequence&gt;
  36.  *          &lt;element name="cache" type="{http://www.openspcoop2.org/core/config}cache" minOccurs="0" maxOccurs="1"/&gt;
  37.  *          &lt;element name="registro" type="{http://www.openspcoop2.org/core/config}accesso-registro-registro" minOccurs="1" maxOccurs="unbounded"/&gt;
  38.  *      &lt;/sequence&gt;
  39.  * &lt;/complexType&gt;
  40.  * </pre>
  41.  *
  42.  * @version $Rev$, $Date$
  43.  *
  44.  * @author Poli Andrea (poli@link.it)
  45.  * @author $Author$
  46.  * */

  47. @XmlAccessorType(XmlAccessType.FIELD)
  48. @XmlType(name = "accesso-registro",
  49.   propOrder = {
  50.     "cache",
  51.     "registro"
  52.   }
  53. )

  54. @XmlRootElement(name = "accesso-registro")

  55. public class AccessoRegistro extends org.openspcoop2.utils.beans.BaseBeanWithId implements Serializable , Cloneable {
  56.   public AccessoRegistro() {
  57.     super();
  58.   }

  59.   public Cache getCache() {
  60.     return this.cache;
  61.   }

  62.   public void setCache(Cache cache) {
  63.     this.cache = cache;
  64.   }

  65.   public void addRegistro(AccessoRegistroRegistro registro) {
  66.     this.registro.add(registro);
  67.   }

  68.   public AccessoRegistroRegistro getRegistro(int index) {
  69.     return this.registro.get( index );
  70.   }

  71.   public AccessoRegistroRegistro removeRegistro(int index) {
  72.     return this.registro.remove( index );
  73.   }

  74.   public List<AccessoRegistroRegistro> getRegistroList() {
  75.     return this.registro;
  76.   }

  77.   public void setRegistroList(List<AccessoRegistroRegistro> registro) {
  78.     this.registro=registro;
  79.   }

  80.   public int sizeRegistroList() {
  81.     return this.registro.size();
  82.   }

  83.   private static final long serialVersionUID = 1L;



  84.   @XmlElement(name="cache",required=false,nillable=false)
  85.   protected Cache cache;

  86.   @XmlElement(name="registro",required=true,nillable=false)
  87.   private List<AccessoRegistroRegistro> registro = new ArrayList<>();

  88.   /**
  89.    * Use method getRegistroList
  90.    * @return List&lt;AccessoRegistroRegistro&gt;
  91.   */
  92.   public List<AccessoRegistroRegistro> getRegistro() {
  93.     return this.getRegistroList();
  94.   }

  95.   /**
  96.    * Use method setRegistroList
  97.    * @param registro List&lt;AccessoRegistroRegistro&gt;
  98.   */
  99.   public void setRegistro(List<AccessoRegistroRegistro> registro) {
  100.     this.setRegistroList(registro);
  101.   }

  102.   /**
  103.    * Use method sizeRegistroList
  104.    * @return lunghezza della lista
  105.   */
  106.   public int sizeRegistro() {
  107.     return this.sizeRegistroList();
  108.   }

  109. }