EventoModel.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.eventi.model;

  21. import org.openspcoop2.core.eventi.Evento;

  22. import org.openspcoop2.generic_project.beans.AbstractModel;
  23. import org.openspcoop2.generic_project.beans.IField;
  24. import org.openspcoop2.generic_project.beans.Field;
  25. import org.openspcoop2.generic_project.beans.ComplexField;


  26. /**    
  27.  * Model Evento
  28.  *
  29.  * @author Poli Andrea (poli@link.it)
  30.  * @author $Author$
  31.  * @version $Rev$, $Date$
  32.  */
  33. public class EventoModel extends AbstractModel<Evento> {

  34.     public EventoModel(){
  35.    
  36.         super();
  37.    
  38.         this.TIPO = new Field("tipo",java.lang.String.class,"evento",Evento.class);
  39.         this.CODICE = new Field("codice",java.lang.String.class,"evento",Evento.class);
  40.         this.SEVERITA = new Field("severita",int.class,"evento",Evento.class);
  41.         this.ORA_REGISTRAZIONE = new Field("ora-registrazione",java.util.Date.class,"evento",Evento.class);
  42.         this.DESCRIZIONE = new Field("descrizione",java.lang.String.class,"evento",Evento.class);
  43.         this.ID_TRANSAZIONE = new Field("id-transazione",java.lang.String.class,"evento",Evento.class);
  44.         this.ID_CONFIGURAZIONE = new Field("id-configurazione",java.lang.String.class,"evento",Evento.class);
  45.         this.CONFIGURAZIONE = new Field("configurazione",java.lang.String.class,"evento",Evento.class);
  46.         this.CLUSTER_ID = new Field("cluster-id",java.lang.String.class,"evento",Evento.class);
  47.    
  48.     }
  49.    
  50.     public EventoModel(IField father){
  51.    
  52.         super(father);
  53.    
  54.         this.TIPO = new ComplexField(father,"tipo",java.lang.String.class,"evento",Evento.class);
  55.         this.CODICE = new ComplexField(father,"codice",java.lang.String.class,"evento",Evento.class);
  56.         this.SEVERITA = new ComplexField(father,"severita",int.class,"evento",Evento.class);
  57.         this.ORA_REGISTRAZIONE = new ComplexField(father,"ora-registrazione",java.util.Date.class,"evento",Evento.class);
  58.         this.DESCRIZIONE = new ComplexField(father,"descrizione",java.lang.String.class,"evento",Evento.class);
  59.         this.ID_TRANSAZIONE = new ComplexField(father,"id-transazione",java.lang.String.class,"evento",Evento.class);
  60.         this.ID_CONFIGURAZIONE = new ComplexField(father,"id-configurazione",java.lang.String.class,"evento",Evento.class);
  61.         this.CONFIGURAZIONE = new ComplexField(father,"configurazione",java.lang.String.class,"evento",Evento.class);
  62.         this.CLUSTER_ID = new ComplexField(father,"cluster-id",java.lang.String.class,"evento",Evento.class);
  63.    
  64.     }
  65.    
  66.    

  67.     public IField TIPO = null;
  68.      
  69.     public IField CODICE = null;
  70.      
  71.     public IField SEVERITA = null;
  72.      
  73.     public IField ORA_REGISTRAZIONE = null;
  74.      
  75.     public IField DESCRIZIONE = null;
  76.      
  77.     public IField ID_TRANSAZIONE = null;
  78.      
  79.     public IField ID_CONFIGURAZIONE = null;
  80.      
  81.     public IField CONFIGURAZIONE = null;
  82.      
  83.     public IField CLUSTER_ID = null;
  84.      

  85.     @Override
  86.     public Class<Evento> getModeledClass(){
  87.         return Evento.class;
  88.     }
  89.    
  90.     @Override
  91.     public String toString(){
  92.         if(this.getModeledClass()!=null){
  93.             return this.getModeledClass().getName();
  94.         }else{
  95.             return "N.D.";
  96.         }
  97.     }

  98. }