CausalePagamentoType.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 it.gov.fatturapa.sdi.fatturapa.v1_0.constants;

  21. import java.io.Serializable;
  22. import java.util.List;

  23. import org.openspcoop2.generic_project.beans.IEnumeration;
  24. import org.openspcoop2.generic_project.exception.NotFoundException;

  25. /**    
  26.  * Enumeration dell'elemento CausalePagamentoType xsd (tipo:string)
  27.  *
  28.  * @author Poli Andrea (poli@link.it)
  29.  * @author $Author$
  30.  * @version $Rev$, $Date$
  31.  */
  32. @javax.xml.bind.annotation.XmlType(name = "CausalePagamentoType")
  33. @javax.xml.bind.annotation.XmlEnum(java.lang.String.class)
  34. public enum CausalePagamentoType implements IEnumeration , Serializable , Cloneable {

  35.     @javax.xml.bind.annotation.XmlEnumValue("A")
  36.     A ('A'),
  37.     @javax.xml.bind.annotation.XmlEnumValue("B")
  38.     B ('B'),
  39.     @javax.xml.bind.annotation.XmlEnumValue("C")
  40.     C ('C'),
  41.     @javax.xml.bind.annotation.XmlEnumValue("D")
  42.     D ('D'),
  43.     @javax.xml.bind.annotation.XmlEnumValue("E")
  44.     E ('E'),
  45.     @javax.xml.bind.annotation.XmlEnumValue("F")
  46.     F ('F'),
  47.     @javax.xml.bind.annotation.XmlEnumValue("G")
  48.     G ('G'),
  49.     @javax.xml.bind.annotation.XmlEnumValue("H")
  50.     H ('H'),
  51.     @javax.xml.bind.annotation.XmlEnumValue("I")
  52.     I ('I'),
  53.     @javax.xml.bind.annotation.XmlEnumValue("L")
  54.     L ('L'),
  55.     @javax.xml.bind.annotation.XmlEnumValue("M")
  56.     M ('M'),
  57.     @javax.xml.bind.annotation.XmlEnumValue("N")
  58.     N ('N'),
  59.     @javax.xml.bind.annotation.XmlEnumValue("O")
  60.     O ('O'),
  61.     @javax.xml.bind.annotation.XmlEnumValue("P")
  62.     P ('P'),
  63.     @javax.xml.bind.annotation.XmlEnumValue("Q")
  64.     Q ('Q'),
  65.     @javax.xml.bind.annotation.XmlEnumValue("R")
  66.     R ('R'),
  67.     @javax.xml.bind.annotation.XmlEnumValue("S")
  68.     S ('S'),
  69.     @javax.xml.bind.annotation.XmlEnumValue("T")
  70.     T ('T'),
  71.     @javax.xml.bind.annotation.XmlEnumValue("U")
  72.     U ('U'),
  73.     @javax.xml.bind.annotation.XmlEnumValue("V")
  74.     V ('V'),
  75.     @javax.xml.bind.annotation.XmlEnumValue("W")
  76.     W ('W'),
  77.     @javax.xml.bind.annotation.XmlEnumValue("X")
  78.     X ('X'),
  79.     @javax.xml.bind.annotation.XmlEnumValue("Y")
  80.     Y ('Y'),
  81.     @javax.xml.bind.annotation.XmlEnumValue("Z")
  82.     Z ('Z');
  83.    
  84.    
  85.     /** Value */
  86.     private java.lang.Character value;
  87.     @Override
  88.     public java.lang.Character getValue()
  89.     {
  90.         return this.value;
  91.     }


  92.     /** Official Constructor */
  93.     CausalePagamentoType(java.lang.Character value)
  94.     {
  95.         this.value = value;
  96.     }


  97.    
  98.     @Override
  99.     public String toString(){
  100.         return this.value+"";
  101.     }
  102.     public boolean equals(java.lang.Character object){
  103.         if(object==null)
  104.             return false;
  105.         return object.toString().equals(this.getValue().toString());    
  106.     }
  107.    
  108.        
  109.    
  110.     /** compatibility with the generated bean (reflection) */
  111.     public boolean equals(Object object,List<String> fieldsNotCheck){
  112.         if( !(object instanceof CausalePagamentoType) ){
  113.             java.lang.StringBuilder sb = new java.lang.StringBuilder();
  114.             if(fieldsNotCheck!=null && !fieldsNotCheck.isEmpty()){
  115.                 sb.append(" (fieldsNotCheck: ").append(fieldsNotCheck).append(")");
  116.             }
  117.             throw new org.openspcoop2.utils.UtilsRuntimeException("Wrong type"+sb.toString()+": "+object.getClass().getName());
  118.         }
  119.         return this.equals(object);
  120.     }
  121.     private String toStringEngine(Object object,boolean reportHTML,List<String> fieldsNotIncluded, StringBuilder bf){
  122.         java.lang.StringBuilder sb = new java.lang.StringBuilder();
  123.         if(reportHTML){
  124.             sb.append(" (reportHTML)");
  125.         }
  126.         if(fieldsNotIncluded!=null && !fieldsNotIncluded.isEmpty()){
  127.             sb.append(" (fieldsNotIncluded: ").append(fieldsNotIncluded).append(")");
  128.         }
  129.         if(object!=null){
  130.             sb.append(" (object: ").append(object.getClass().getName()).append(")");
  131.         }
  132.         if(sb.length()>0) {
  133.             bf.append(sb.toString());
  134.         }
  135.         return sb.length()>0 ? this.toString()+sb.toString() : this.toString();
  136.     }
  137.     public String toString(boolean reportHTML){
  138.         return toStringEngine(null, reportHTML, null, null);
  139.     }
  140.     public String toString(boolean reportHTML,List<String> fieldsNotIncluded){
  141.         return toStringEngine(null, reportHTML, fieldsNotIncluded, null);
  142.     }
  143.     public String diff(Object object,StringBuilder bf,boolean reportHTML){
  144.         return toStringEngine(object, reportHTML, null, bf);
  145.     }
  146.     public String diff(Object object,StringBuilder bf,boolean reportHTML,List<String> fieldsNotIncluded){
  147.         return toStringEngine(object, reportHTML, fieldsNotIncluded, bf);
  148.     }
  149.    
  150.    
  151.     /** Utilities */
  152.    
  153.     public static java.lang.Character[] toArray(){
  154.         java.lang.Character[] res = new java.lang.Character[values().length];
  155.         int i=0;
  156.         for (CausalePagamentoType tmp : values()) {
  157.             res[i]=tmp.getValue();
  158.             i++;
  159.         }
  160.         return res;
  161.     }  
  162.     public static String[] toStringArray(){
  163.         String[] res = new String[values().length];
  164.         int i=0;
  165.         for (CausalePagamentoType tmp : values()) {
  166.             res[i]=tmp.toString();
  167.             i++;
  168.         }
  169.         return res;
  170.     }
  171.     public static String[] toEnumNameArray(){
  172.         String[] res = new String[values().length];
  173.         int i=0;
  174.         for (CausalePagamentoType tmp : values()) {
  175.             res[i]=tmp.name();
  176.             i++;
  177.         }
  178.         return res;
  179.     }
  180.    
  181.     public static boolean contains(java.lang.Character value){
  182.         return toEnumConstant(value)!=null;
  183.     }
  184.    
  185.     public static CausalePagamentoType toEnumConstant(java.lang.Character value){
  186.         try{
  187.             return toEnumConstant(value,false);
  188.         }catch(NotFoundException notFound){
  189.             return null;
  190.         }
  191.     }
  192.     public static CausalePagamentoType toEnumConstant(java.lang.Character value, boolean throwNotFoundException) throws NotFoundException{
  193.         CausalePagamentoType res = null;
  194.         for (CausalePagamentoType tmp : values()) {
  195.             if(tmp.getValue().toString().equals(value!=null?value.toString():null)){
  196.                 res = tmp;
  197.                 break;
  198.             }
  199.         }
  200.         if(res==null && throwNotFoundException){
  201.             throw new NotFoundException("Enum with value ["+value+"] not found");
  202.         }
  203.         return res;
  204.     }
  205.    
  206.     public static IEnumeration toEnumConstantFromString(String value){
  207.         try{
  208.             return toEnumConstantFromString(value,false);
  209.         }catch(NotFoundException notFound){
  210.             return null;
  211.         }
  212.     }
  213.     public static IEnumeration toEnumConstantFromString(String value, boolean throwNotFoundException) throws NotFoundException{
  214.         CausalePagamentoType res = null;
  215.         for (CausalePagamentoType tmp : values()) {
  216.             if(tmp.toString().equals(value)){
  217.                 res = tmp;
  218.                 break;
  219.             }
  220.         }
  221.         if(res==null && throwNotFoundException){
  222.             throw new NotFoundException("Enum with value ["+value+"] not found");
  223.         }
  224.         return res;
  225.     }
  226. }