InUseCondition.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.generic_project.beans;

  21. import java.util.ArrayList;
  22. import java.util.List;

  23. /**
  24.  * InUseCondition
  25.  *
  26.  * @author Poli Andrea (apoli@link.it)
  27.  * @author $Author$
  28.  * @version $Rev$, $Date$
  29.  */
  30. public class InUseCondition<ID,OBJECT> {

  31.     private Class<OBJECT> object;
  32.    
  33.     private String objectName; // Serve anche un objectName, poichè possono esistere elementi con lo stesso tipo, ma con nome differente
  34.    
  35.     private List<ID> ids = new ArrayList<ID>();
  36.    
  37.     private String cause;
  38.    
  39.     public String getCause() {
  40.         return this.cause;
  41.     }

  42.     public void setCause(String cause) {
  43.         this.cause = cause;
  44.     }

  45.     public Class<OBJECT> getObject() {
  46.         return this.object;
  47.     }

  48.     public void setObject(Class<OBJECT> object) {
  49.         this.object = object;
  50.     }

  51.     public List<ID> getIds() {
  52.         return this.ids;
  53.     }

  54.     public void setIds(List<ID> ids) {
  55.         this.ids = ids;
  56.     }
  57.    
  58.     public void addId(ID id){
  59.         this.ids.add(id);  
  60.     }
  61.    
  62.     public String getObjectName() {
  63.         return this.objectName;
  64.     }

  65.     public void setObjectName(String objectName) {
  66.         this.objectName = objectName;
  67.     }
  68. }