SoggettoCtrlStat.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.web.ctrlstat.dao;

  21. import org.openspcoop2.core.registry.Soggetto;

  22. /**
  23.  * SoggettoCtrlstat
  24.  *
  25.  * @author Andrea Poli (apoli@link.it)
  26.  * @author Stefano Corallo (corallo@link.it)
  27.  * @author Sandra Giangrandi (sandra@link.it)
  28.  * @author $Author$
  29.  * @version $Rev$, $Date$
  30.  *
  31.  */
  32. public class SoggettoCtrlStat {

  33.     private Soggetto soggettoReg;
  34.     private org.openspcoop2.core.config.Soggetto soggettoConf;
  35.     private String nome;
  36.     private String tipo;
  37.     private String oldNomeForUpdate;
  38.     private String oldTipoForUpdate;

  39.     private Long id;

  40.     public void setId(Long id) {
  41.         this.id = id;
  42.     }

  43.     public Long getId() {
  44.         return this.id;
  45.     }

  46.     public SoggettoCtrlStat(Soggetto sogReg, org.openspcoop2.core.config.Soggetto sogConf) {
  47.         this.soggettoReg = sogReg;
  48.         this.soggettoConf = sogConf;

  49.         if(sogReg!=null){
  50.             this.nome = sogReg.getNome();
  51.             this.tipo = sogReg.getTipo();
  52.             this.id = sogReg.getId();
  53.         }else{
  54.             this.nome = sogConf.getNome();
  55.             this.tipo = sogConf.getTipo();
  56.             this.id = sogConf.getId();
  57.         }
  58.     }

  59.     public Soggetto getSoggettoReg() {
  60.         return this.soggettoReg;
  61.     }

  62.     public org.openspcoop2.core.config.Soggetto getSoggettoConf() {
  63.         return this.soggettoConf;
  64.     }

  65.     public String getNome() {
  66.         return this.nome;
  67.     }

  68.     public String getTipo() {
  69.         return this.tipo;
  70.     }

  71.     public String getOldNomeForUpdate() {
  72.         return this.oldNomeForUpdate;
  73.     }

  74.     public void setOldNomeForUpdate(String oldNomeForUpdate) {
  75.         this.oldNomeForUpdate = oldNomeForUpdate;
  76.     }

  77.     public String getOldTipoForUpdate() {
  78.         return this.oldTipoForUpdate;
  79.     }

  80.     public void setOldTipoForUpdate(String oldTipoForUpdate) {
  81.         this.oldTipoForUpdate = oldTipoForUpdate;
  82.     }

  83. }