Cache.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.controllo_traffico;

  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 org.openspcoop2.core.controllo_traffico.constants.CacheAlgorithm;
  27. import java.io.Serializable;


  28. /** <p>Java class for cache complex type.
  29.  *
  30.  * <p>The following schema fragment specifies the expected content contained within this class.
  31.  *
  32.  * <pre>
  33.  * &lt;complexType name="cache"&gt;
  34.  *      &lt;sequence&gt;
  35.  *          &lt;element name="cache" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="1" maxOccurs="1" default="true"/&gt;
  36.  *          &lt;element name="size" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0" maxOccurs="1"/&gt;
  37.  *          &lt;element name="algorithm" type="{http://www.openspcoop2.org/core/controllo_traffico}cache-algorithm" minOccurs="0" maxOccurs="1"/&gt;
  38.  *          &lt;element name="idle-time" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0" maxOccurs="1"/&gt;
  39.  *          &lt;element name="life-time" type="{http://www.w3.org/2001/XMLSchema}unsignedLong" minOccurs="0" maxOccurs="1"/&gt;
  40.  *      &lt;/sequence&gt;
  41.  * &lt;/complexType&gt;
  42.  * </pre>
  43.  *
  44.  * @version $Rev$, $Date$
  45.  *
  46.  * @author Poli Andrea (poli@link.it)
  47.  * @author $Author$
  48.  * */

  49. @XmlAccessorType(XmlAccessType.FIELD)
  50. @XmlType(name = "cache",
  51.   propOrder = {
  52.     "cache",
  53.     "size",
  54.     "algorithm",
  55.     "idleTime",
  56.     "lifeTime"
  57.   }
  58. )

  59. @XmlRootElement(name = "cache")

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

  64.   public boolean isCache() {
  65.     return this.cache;
  66.   }

  67.   public boolean getCache() {
  68.     return this.cache;
  69.   }

  70.   public void setCache(boolean cache) {
  71.     this.cache = cache;
  72.   }

  73.   public java.lang.Long getSize() {
  74.     return this.size;
  75.   }

  76.   public void setSize(java.lang.Long size) {
  77.     this.size = size;
  78.   }

  79.   public void setAlgorithmRawEnumValue(String value) {
  80.     this.algorithm = (CacheAlgorithm) CacheAlgorithm.toEnumConstantFromString(value);
  81.   }

  82.   public String getAlgorithmRawEnumValue() {
  83.     if(this.algorithm == null){
  84.         return null;
  85.     }else{
  86.         return this.algorithm.toString();
  87.     }
  88.   }

  89.   public org.openspcoop2.core.controllo_traffico.constants.CacheAlgorithm getAlgorithm() {
  90.     return this.algorithm;
  91.   }

  92.   public void setAlgorithm(org.openspcoop2.core.controllo_traffico.constants.CacheAlgorithm algorithm) {
  93.     this.algorithm = algorithm;
  94.   }

  95.   public java.lang.Long getIdleTime() {
  96.     return this.idleTime;
  97.   }

  98.   public void setIdleTime(java.lang.Long idleTime) {
  99.     this.idleTime = idleTime;
  100.   }

  101.   public java.lang.Long getLifeTime() {
  102.     return this.lifeTime;
  103.   }

  104.   public void setLifeTime(java.lang.Long lifeTime) {
  105.     this.lifeTime = lifeTime;
  106.   }

  107.   private static final long serialVersionUID = 1L;



  108.   @javax.xml.bind.annotation.XmlSchemaType(name="boolean")
  109.   @XmlElement(name="cache",required=true,nillable=false,defaultValue="true")
  110.   protected boolean cache = true;

  111.   @javax.xml.bind.annotation.XmlSchemaType(name="unsignedLong")
  112.   @XmlElement(name="size",required=false,nillable=false)
  113.   protected java.lang.Long size;

  114.   @javax.xml.bind.annotation.XmlTransient
  115.   protected java.lang.String algorithmRawEnumValue;

  116.   @XmlElement(name="algorithm",required=false,nillable=false)
  117.   protected CacheAlgorithm algorithm;

  118.   @javax.xml.bind.annotation.XmlSchemaType(name="unsignedLong")
  119.   @XmlElement(name="idle-time",required=false,nillable=false)
  120.   protected java.lang.Long idleTime;

  121.   @javax.xml.bind.annotation.XmlSchemaType(name="unsignedLong")
  122.   @XmlElement(name="life-time",required=false,nillable=false)
  123.   protected java.lang.Long lifeTime;

  124. }