FiltroRicercaDiagnosticiConPaginazione.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.protocol.sdk.diagnostica;

  21. import java.io.Serializable;

  22. /**
  23.  * Oggetto contenente informazioni per la ricerca di diagnostici
  24.  *
  25.  * @author Stefano Corallo (corallo@link.it)
  26.  * @author Lorenzo Nardi (nardi@link.it)
  27.  * @author $Author$
  28.  * @version $Rev$, $Date$
  29.  */


  30. public class FiltroRicercaDiagnosticiConPaginazione extends FiltroRicercaDiagnostici implements Serializable{


  31.     private static final long serialVersionUID = 2103096411857601491L;
  32.    
  33.     protected int limit;
  34.     protected int offset;
  35.     protected boolean asc = true;

  36.     protected long[] offsetMap = {0,0,0};
  37.     protected boolean partial;
  38.    
  39.     public FiltroRicercaDiagnosticiConPaginazione() {
  40.         super();
  41.     }
  42.     public FiltroRicercaDiagnosticiConPaginazione(FiltroRicercaDiagnostici filtro) {
  43.         super();
  44.        
  45.         this.dataFine = filtro.dataFine;
  46.         this.dataInizio = filtro.dataInizio;

  47.         this.idTransazione = filtro.idTransazione;

  48.         this.idFunzione = filtro.idFunzione;
  49.         this.dominio = filtro.dominio;
  50.        
  51.         this.idBustaRichiesta = filtro.idBustaRichiesta;
  52.         this.idBustaRisposta = filtro.idBustaRisposta;
  53.        
  54.         this.severita = filtro.severita;
  55.        
  56.         this.codice = filtro.codice;
  57.        
  58.         this.messaggioCercatoInternamenteTestoDiagnostico = filtro.messaggioCercatoInternamenteTestoDiagnostico;
  59.        
  60.         this.protocollo = filtro.protocollo;
  61.        
  62.         this.properties = filtro.properties;
  63.        
  64.     }
  65.    
  66.  
  67.    
  68.     public boolean isPartial() {
  69.         return this.partial;
  70.     }
  71.    
  72.     public void setPartial(boolean partial) {
  73.         this.partial = partial;
  74.     }
  75.    
  76.     /**
  77.      * Mappa per gli offset
  78.      * In caso di search complessa (union) mi serve questa mappa per gestire gli offset
  79.      * offsetmap[0] = offset correlazione
  80.      * offsetmap[1] = offset diagnostici
  81.      * offsetmap[2] = offset notexist
  82.      */
  83.     public long[] getOffsetMap() {
  84.         return this.offsetMap;
  85.     }
  86.     /**
  87.      * Mappa per gli offset
  88.      * In caso di search complessa (union) mi serve questa mappa per gestire gli offset
  89.      * offsetmap[0] = offset correlazione
  90.      * offsetmap[1] = offset diagnostici
  91.      * offsetmap[2] = offset notexist
  92.      */
  93.     public void setOffsetMap(long[] offsetMap) {
  94.         this.offsetMap = offsetMap;
  95.     }
  96.    
  97.     public int getOffset() {
  98.         return this.offset;
  99.     }
  100.     public void setOffset(int offset) {
  101.         this.offset = offset;
  102.     }
  103.     public int getLimit() {
  104.         return this.limit;
  105.     }
  106.     public void setLimit(int limit) {
  107.         this.limit = limit;
  108.     }
  109.     public boolean isAsc() {
  110.         return this.asc;
  111.     }

  112.     public void setAsc(boolean asc) {
  113.         this.asc = asc;
  114.     }
  115.    
  116.     @Override
  117.     public String toString() {
  118.         return super.toString() + " " +
  119.             " offset ["+this.offset+"]" +
  120.             " limit  ["+this.limit+"]" +
  121.             " asc  ["+this.asc+"]";
  122.     }

  123.  
  124. }