Condition.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.mvc.properties;

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


  30. /** <p>Java class for condition complex type.
  31.  *
  32.  * <p>The following schema fragment specifies the expected content contained within this class.
  33.  *
  34.  * <pre>
  35.  * &lt;complexType name="condition"&gt;
  36.  *      &lt;sequence&gt;
  37.  *          &lt;element name="defined" type="{http://www.openspcoop2.org/core/mvc/properties}defined" minOccurs="0" maxOccurs="unbounded"/&gt;
  38.  *          &lt;element name="selected" type="{http://www.openspcoop2.org/core/mvc/properties}selected" minOccurs="0" maxOccurs="unbounded"/&gt;
  39.  *          &lt;element name="equals" type="{http://www.openspcoop2.org/core/mvc/properties}equals" minOccurs="0" maxOccurs="unbounded"/&gt;
  40.  *          &lt;element name="lessThen" type="{http://www.openspcoop2.org/core/mvc/properties}equals" minOccurs="0" maxOccurs="unbounded"/&gt;
  41.  *          &lt;element name="lessEquals" type="{http://www.openspcoop2.org/core/mvc/properties}equals" minOccurs="0" maxOccurs="unbounded"/&gt;
  42.  *          &lt;element name="greaterThen" type="{http://www.openspcoop2.org/core/mvc/properties}equals" minOccurs="0" maxOccurs="unbounded"/&gt;
  43.  *          &lt;element name="greaterEquals" type="{http://www.openspcoop2.org/core/mvc/properties}equals" minOccurs="0" maxOccurs="unbounded"/&gt;
  44.  *          &lt;element name="startsWith" type="{http://www.openspcoop2.org/core/mvc/properties}equals" minOccurs="0" maxOccurs="unbounded"/&gt;
  45.  *          &lt;element name="endsWith" type="{http://www.openspcoop2.org/core/mvc/properties}equals" minOccurs="0" maxOccurs="unbounded"/&gt;
  46.  *      &lt;/sequence&gt;
  47.  *      &lt;attribute name="and" type="{http://www.w3.org/2001/XMLSchema}boolean" use="optional" default="true"/&gt;
  48.  *      &lt;attribute name="not" type="{http://www.w3.org/2001/XMLSchema}boolean" use="optional" default="false"/&gt;
  49.  * &lt;/complexType&gt;
  50.  * </pre>
  51.  *
  52.  * @version $Rev$, $Date$
  53.  *
  54.  * @author Poli Andrea (poli@link.it)
  55.  * @author $Author$
  56.  * */

  57. @XmlAccessorType(XmlAccessType.FIELD)
  58. @XmlType(name = "condition",
  59.   propOrder = {
  60.     "defined",
  61.     "selected",
  62.     "equals",
  63.     "lessThen",
  64.     "lessEquals",
  65.     "greaterThen",
  66.     "greaterEquals",
  67.     "startsWith",
  68.     "endsWith"
  69.   }
  70. )

  71. @XmlRootElement(name = "condition")

  72. public class Condition extends org.openspcoop2.utils.beans.BaseBean implements Serializable , Cloneable {
  73.   public Condition() {
  74.     super();
  75.   }

  76.   public void addDefined(Defined defined) {
  77.     this.defined.add(defined);
  78.   }

  79.   public Defined getDefined(int index) {
  80.     return this.defined.get( index );
  81.   }

  82.   public Defined removeDefined(int index) {
  83.     return this.defined.remove( index );
  84.   }

  85.   public List<Defined> getDefinedList() {
  86.     return this.defined;
  87.   }

  88.   public void setDefinedList(List<Defined> defined) {
  89.     this.defined=defined;
  90.   }

  91.   public int sizeDefinedList() {
  92.     return this.defined.size();
  93.   }

  94.   public void addSelected(Selected selected) {
  95.     this.selected.add(selected);
  96.   }

  97.   public Selected getSelected(int index) {
  98.     return this.selected.get( index );
  99.   }

  100.   public Selected removeSelected(int index) {
  101.     return this.selected.remove( index );
  102.   }

  103.   public List<Selected> getSelectedList() {
  104.     return this.selected;
  105.   }

  106.   public void setSelectedList(List<Selected> selected) {
  107.     this.selected=selected;
  108.   }

  109.   public int sizeSelectedList() {
  110.     return this.selected.size();
  111.   }

  112.   public void addEquals(Equals equals) {
  113.     this.equals.add(equals);
  114.   }

  115.   public Equals getEquals(int index) {
  116.     return this.equals.get( index );
  117.   }

  118.   public Equals removeEquals(int index) {
  119.     return this.equals.remove( index );
  120.   }

  121.   public List<Equals> getEqualsList() {
  122.     return this.equals;
  123.   }

  124.   public void setEqualsList(List<Equals> equals) {
  125.     this.equals=equals;
  126.   }

  127.   public int sizeEqualsList() {
  128.     return this.equals.size();
  129.   }

  130.   public void addLessThen(Equals lessThen) {
  131.     this.lessThen.add(lessThen);
  132.   }

  133.   public Equals getLessThen(int index) {
  134.     return this.lessThen.get( index );
  135.   }

  136.   public Equals removeLessThen(int index) {
  137.     return this.lessThen.remove( index );
  138.   }

  139.   public List<Equals> getLessThenList() {
  140.     return this.lessThen;
  141.   }

  142.   public void setLessThenList(List<Equals> lessThen) {
  143.     this.lessThen=lessThen;
  144.   }

  145.   public int sizeLessThenList() {
  146.     return this.lessThen.size();
  147.   }

  148.   public void addLessEquals(Equals lessEquals) {
  149.     this.lessEquals.add(lessEquals);
  150.   }

  151.   public Equals getLessEquals(int index) {
  152.     return this.lessEquals.get( index );
  153.   }

  154.   public Equals removeLessEquals(int index) {
  155.     return this.lessEquals.remove( index );
  156.   }

  157.   public List<Equals> getLessEqualsList() {
  158.     return this.lessEquals;
  159.   }

  160.   public void setLessEqualsList(List<Equals> lessEquals) {
  161.     this.lessEquals=lessEquals;
  162.   }

  163.   public int sizeLessEqualsList() {
  164.     return this.lessEquals.size();
  165.   }

  166.   public void addGreaterThen(Equals greaterThen) {
  167.     this.greaterThen.add(greaterThen);
  168.   }

  169.   public Equals getGreaterThen(int index) {
  170.     return this.greaterThen.get( index );
  171.   }

  172.   public Equals removeGreaterThen(int index) {
  173.     return this.greaterThen.remove( index );
  174.   }

  175.   public List<Equals> getGreaterThenList() {
  176.     return this.greaterThen;
  177.   }

  178.   public void setGreaterThenList(List<Equals> greaterThen) {
  179.     this.greaterThen=greaterThen;
  180.   }

  181.   public int sizeGreaterThenList() {
  182.     return this.greaterThen.size();
  183.   }

  184.   public void addGreaterEquals(Equals greaterEquals) {
  185.     this.greaterEquals.add(greaterEquals);
  186.   }

  187.   public Equals getGreaterEquals(int index) {
  188.     return this.greaterEquals.get( index );
  189.   }

  190.   public Equals removeGreaterEquals(int index) {
  191.     return this.greaterEquals.remove( index );
  192.   }

  193.   public List<Equals> getGreaterEqualsList() {
  194.     return this.greaterEquals;
  195.   }

  196.   public void setGreaterEqualsList(List<Equals> greaterEquals) {
  197.     this.greaterEquals=greaterEquals;
  198.   }

  199.   public int sizeGreaterEqualsList() {
  200.     return this.greaterEquals.size();
  201.   }

  202.   public void addStartsWith(Equals startsWith) {
  203.     this.startsWith.add(startsWith);
  204.   }

  205.   public Equals getStartsWith(int index) {
  206.     return this.startsWith.get( index );
  207.   }

  208.   public Equals removeStartsWith(int index) {
  209.     return this.startsWith.remove( index );
  210.   }

  211.   public List<Equals> getStartsWithList() {
  212.     return this.startsWith;
  213.   }

  214.   public void setStartsWithList(List<Equals> startsWith) {
  215.     this.startsWith=startsWith;
  216.   }

  217.   public int sizeStartsWithList() {
  218.     return this.startsWith.size();
  219.   }

  220.   public void addEndsWith(Equals endsWith) {
  221.     this.endsWith.add(endsWith);
  222.   }

  223.   public Equals getEndsWith(int index) {
  224.     return this.endsWith.get( index );
  225.   }

  226.   public Equals removeEndsWith(int index) {
  227.     return this.endsWith.remove( index );
  228.   }

  229.   public List<Equals> getEndsWithList() {
  230.     return this.endsWith;
  231.   }

  232.   public void setEndsWithList(List<Equals> endsWith) {
  233.     this.endsWith=endsWith;
  234.   }

  235.   public int sizeEndsWithList() {
  236.     return this.endsWith.size();
  237.   }

  238.   public boolean isAnd() {
  239.     return this.and;
  240.   }

  241.   public boolean getAnd() {
  242.     return this.and;
  243.   }

  244.   public void setAnd(boolean and) {
  245.     this.and = and;
  246.   }

  247.   public boolean isNot() {
  248.     return this.not;
  249.   }

  250.   public boolean getNot() {
  251.     return this.not;
  252.   }

  253.   public void setNot(boolean not) {
  254.     this.not = not;
  255.   }

  256.   private static final long serialVersionUID = 1L;



  257.   @XmlElement(name="defined",required=true,nillable=false)
  258.   private List<Defined> defined = new ArrayList<>();

  259.   /**
  260.    * Use method getDefinedList
  261.    * @return List&lt;Defined&gt;
  262.   */
  263.   public List<Defined> getDefined() {
  264.     return this.getDefinedList();
  265.   }

  266.   /**
  267.    * Use method setDefinedList
  268.    * @param defined List&lt;Defined&gt;
  269.   */
  270.   public void setDefined(List<Defined> defined) {
  271.     this.setDefinedList(defined);
  272.   }

  273.   /**
  274.    * Use method sizeDefinedList
  275.    * @return lunghezza della lista
  276.   */
  277.   public int sizeDefined() {
  278.     return this.sizeDefinedList();
  279.   }

  280.   @XmlElement(name="selected",required=true,nillable=false)
  281.   private List<Selected> selected = new ArrayList<>();

  282.   /**
  283.    * Use method getSelectedList
  284.    * @return List&lt;Selected&gt;
  285.   */
  286.   public List<Selected> getSelected() {
  287.     return this.getSelectedList();
  288.   }

  289.   /**
  290.    * Use method setSelectedList
  291.    * @param selected List&lt;Selected&gt;
  292.   */
  293.   public void setSelected(List<Selected> selected) {
  294.     this.setSelectedList(selected);
  295.   }

  296.   /**
  297.    * Use method sizeSelectedList
  298.    * @return lunghezza della lista
  299.   */
  300.   public int sizeSelected() {
  301.     return this.sizeSelectedList();
  302.   }

  303.   @XmlElement(name="equals",required=true,nillable=false)
  304.   private List<Equals> equals = new ArrayList<>();

  305.   /**
  306.    * Use method getEqualsList
  307.    * @return List&lt;Equals&gt;
  308.   */
  309.   public List<Equals> getEquals() {
  310.     return this.getEqualsList();
  311.   }

  312.   /**
  313.    * Use method setEqualsList
  314.    * @param equals List&lt;Equals&gt;
  315.   */
  316.   public void setEquals(List<Equals> equals) {
  317.     this.setEqualsList(equals);
  318.   }

  319.   /**
  320.    * Use method sizeEqualsList
  321.    * @return lunghezza della lista
  322.   */
  323.   public int sizeEquals() {
  324.     return this.sizeEqualsList();
  325.   }

  326.   @XmlElement(name="lessThen",required=true,nillable=false)
  327.   private List<Equals> lessThen = new ArrayList<>();

  328.   /**
  329.    * Use method getLessThenList
  330.    * @return List&lt;Equals&gt;
  331.   */
  332.   public List<Equals> getLessThen() {
  333.     return this.getLessThenList();
  334.   }

  335.   /**
  336.    * Use method setLessThenList
  337.    * @param lessThen List&lt;Equals&gt;
  338.   */
  339.   public void setLessThen(List<Equals> lessThen) {
  340.     this.setLessThenList(lessThen);
  341.   }

  342.   /**
  343.    * Use method sizeLessThenList
  344.    * @return lunghezza della lista
  345.   */
  346.   public int sizeLessThen() {
  347.     return this.sizeLessThenList();
  348.   }

  349.   @XmlElement(name="lessEquals",required=true,nillable=false)
  350.   private List<Equals> lessEquals = new ArrayList<>();

  351.   /**
  352.    * Use method getLessEqualsList
  353.    * @return List&lt;Equals&gt;
  354.   */
  355.   public List<Equals> getLessEquals() {
  356.     return this.getLessEqualsList();
  357.   }

  358.   /**
  359.    * Use method setLessEqualsList
  360.    * @param lessEquals List&lt;Equals&gt;
  361.   */
  362.   public void setLessEquals(List<Equals> lessEquals) {
  363.     this.setLessEqualsList(lessEquals);
  364.   }

  365.   /**
  366.    * Use method sizeLessEqualsList
  367.    * @return lunghezza della lista
  368.   */
  369.   public int sizeLessEquals() {
  370.     return this.sizeLessEqualsList();
  371.   }

  372.   @XmlElement(name="greaterThen",required=true,nillable=false)
  373.   private List<Equals> greaterThen = new ArrayList<>();

  374.   /**
  375.    * Use method getGreaterThenList
  376.    * @return List&lt;Equals&gt;
  377.   */
  378.   public List<Equals> getGreaterThen() {
  379.     return this.getGreaterThenList();
  380.   }

  381.   /**
  382.    * Use method setGreaterThenList
  383.    * @param greaterThen List&lt;Equals&gt;
  384.   */
  385.   public void setGreaterThen(List<Equals> greaterThen) {
  386.     this.setGreaterThenList(greaterThen);
  387.   }

  388.   /**
  389.    * Use method sizeGreaterThenList
  390.    * @return lunghezza della lista
  391.   */
  392.   public int sizeGreaterThen() {
  393.     return this.sizeGreaterThenList();
  394.   }

  395.   @XmlElement(name="greaterEquals",required=true,nillable=false)
  396.   private List<Equals> greaterEquals = new ArrayList<>();

  397.   /**
  398.    * Use method getGreaterEqualsList
  399.    * @return List&lt;Equals&gt;
  400.   */
  401.   public List<Equals> getGreaterEquals() {
  402.     return this.getGreaterEqualsList();
  403.   }

  404.   /**
  405.    * Use method setGreaterEqualsList
  406.    * @param greaterEquals List&lt;Equals&gt;
  407.   */
  408.   public void setGreaterEquals(List<Equals> greaterEquals) {
  409.     this.setGreaterEqualsList(greaterEquals);
  410.   }

  411.   /**
  412.    * Use method sizeGreaterEqualsList
  413.    * @return lunghezza della lista
  414.   */
  415.   public int sizeGreaterEquals() {
  416.     return this.sizeGreaterEqualsList();
  417.   }

  418.   @XmlElement(name="startsWith",required=true,nillable=false)
  419.   private List<Equals> startsWith = new ArrayList<>();

  420.   /**
  421.    * Use method getStartsWithList
  422.    * @return List&lt;Equals&gt;
  423.   */
  424.   public List<Equals> getStartsWith() {
  425.     return this.getStartsWithList();
  426.   }

  427.   /**
  428.    * Use method setStartsWithList
  429.    * @param startsWith List&lt;Equals&gt;
  430.   */
  431.   public void setStartsWith(List<Equals> startsWith) {
  432.     this.setStartsWithList(startsWith);
  433.   }

  434.   /**
  435.    * Use method sizeStartsWithList
  436.    * @return lunghezza della lista
  437.   */
  438.   public int sizeStartsWith() {
  439.     return this.sizeStartsWithList();
  440.   }

  441.   @XmlElement(name="endsWith",required=true,nillable=false)
  442.   private List<Equals> endsWith = new ArrayList<>();

  443.   /**
  444.    * Use method getEndsWithList
  445.    * @return List&lt;Equals&gt;
  446.   */
  447.   public List<Equals> getEndsWith() {
  448.     return this.getEndsWithList();
  449.   }

  450.   /**
  451.    * Use method setEndsWithList
  452.    * @param endsWith List&lt;Equals&gt;
  453.   */
  454.   public void setEndsWith(List<Equals> endsWith) {
  455.     this.setEndsWithList(endsWith);
  456.   }

  457.   /**
  458.    * Use method sizeEndsWithList
  459.    * @return lunghezza della lista
  460.   */
  461.   public int sizeEndsWith() {
  462.     return this.sizeEndsWithList();
  463.   }

  464.   @javax.xml.bind.annotation.XmlSchemaType(name="boolean")
  465.   @XmlAttribute(name="and",required=false)
  466.   protected boolean and = true;

  467.   @javax.xml.bind.annotation.XmlSchemaType(name="boolean")
  468.   @XmlAttribute(name="not",required=false)
  469.   protected boolean not = false;

  470. }