JDBCTransazioneServiceImpl.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.transazioni.dao.jdbc;

  21. import java.sql.Connection;
  22. import java.util.ArrayList;
  23. import java.util.Date;
  24. import java.util.List;

  25. import org.openspcoop2.utils.TipiDatabase;
  26. import org.openspcoop2.utils.date.DateUtils;
  27. import org.openspcoop2.utils.date.UnitaTemporale;
  28. import org.openspcoop2.utils.jdbc.JDBCAdapterException;
  29. import org.openspcoop2.utils.sql.ISQLQueryObject;
  30. import org.openspcoop2.utils.sql.SQLQueryObjectException;
  31. import org.slf4j.Logger;

  32. import org.openspcoop2.generic_project.dao.jdbc.IJDBCServiceCRUDWithId;
  33. import java.lang.String;
  34. import org.openspcoop2.generic_project.beans.NonNegativeNumber;
  35. import org.openspcoop2.generic_project.beans.UpdateField;
  36. import org.openspcoop2.generic_project.beans.UpdateModel;

  37. import org.openspcoop2.generic_project.dao.jdbc.utils.GenericJDBCUtilities;
  38. import org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject;
  39. import org.openspcoop2.generic_project.exception.ExpressionException;
  40. import org.openspcoop2.generic_project.exception.NotFoundException;
  41. import org.openspcoop2.generic_project.exception.NotImplementedException;
  42. import org.openspcoop2.generic_project.exception.ServiceException;
  43. import org.openspcoop2.generic_project.expression.IExpression;
  44. import org.openspcoop2.generic_project.dao.jdbc.JDBCExpression;
  45. import org.openspcoop2.generic_project.dao.jdbc.JDBCPaginatedExpression;

  46. import org.openspcoop2.generic_project.dao.jdbc.JDBCServiceManagerProperties;

  47. import org.openspcoop2.core.transazioni.Transazione;
  48. import org.openspcoop2.core.transazioni.TransazioneExtendedInfo;
  49. import org.openspcoop2.core.transazioni.utils.TransazioneDaoExt;

  50. /**    
  51.  * JDBCTransazioneServiceImpl
  52.  *
  53.  * @author Poli Andrea (poli@link.it)
  54.  * @author $Author$
  55.  * @version $Rev$, $Date$
  56.  */
  57. public class JDBCTransazioneServiceImpl extends JDBCTransazioneServiceSearchImpl
  58.     implements IJDBCServiceCRUDWithId<Transazione, String, JDBCServiceManager> {

  59.     @Override
  60.     public void create(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, Transazione transazione, org.openspcoop2.generic_project.beans.IDMappingBehaviour idMappingResolutionBehaviour) throws NotImplementedException,ServiceException,Exception {

  61.         if(TipiDatabase.POSTGRESQL.equals(jdbcProperties.getDatabase())){
  62.             if(transazione.getFaultCooperazione()!=null && org.openspcoop2.utils.jdbc.PostgreSQLUtilities.containsNullByteSequence(transazione.getFaultCooperazione())) {
  63.                 transazione.setFaultCooperazione(org.openspcoop2.utils.jdbc.PostgreSQLUtilities.normalizeString(transazione.getFaultCooperazione()));
  64.             }
  65.             if(transazione.getFaultIntegrazione()!=null && org.openspcoop2.utils.jdbc.PostgreSQLUtilities.containsNullByteSequence(transazione.getFaultIntegrazione())) {
  66.                 transazione.setFaultIntegrazione(org.openspcoop2.utils.jdbc.PostgreSQLUtilities.normalizeString(transazione.getFaultIntegrazione()));
  67.             }
  68.             if(transazione.getCredenziali()!=null && org.openspcoop2.utils.jdbc.PostgreSQLUtilities.containsNullByteSequence(transazione.getCredenziali())) {
  69.                 transazione.setCredenziali(org.openspcoop2.utils.jdbc.PostgreSQLUtilities.normalizeString(transazione.getCredenziali()));
  70.             }
  71.         }
  72.            
  73.         org.openspcoop2.generic_project.dao.jdbc.utils.JDBCPreparedStatementUtilities jdbcUtilities =
  74.                 new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCPreparedStatementUtilities(sqlQueryObject.getTipoDatabaseOpenSPCoop2(), log, connection);
  75.        
  76.         ISQLQueryObject sqlQueryObjectInsert = sqlQueryObject.newSQLQueryObject();
  77.                


  78.         // Object transazione
  79.         sqlQueryObjectInsert.addInsertTable(this.getTransazioneFieldConverter().toTable(Transazione.model()));
  80.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_TRANSAZIONE,false),"?");
  81.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().STATO,false),"?");
  82.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().RUOLO_TRANSAZIONE,false),"?");
  83.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ESITO,false),"?");
  84.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ESITO_SINCRONO,false),"?");
  85.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CONSEGNE_MULTIPLE_IN_CORSO,false),"?");
  86.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ESITO_CONTESTO,false),"?");
  87.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PROTOCOLLO,false),"?");
  88.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_RICHIESTA,false),"?");
  89.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CODICE_RISPOSTA_INGRESSO,false),"?");
  90.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CODICE_RISPOSTA_USCITA,false),"?");
  91.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_ACCETTAZIONE_RICHIESTA,false),"?");
  92.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_INGRESSO_RICHIESTA,false),"?");
  93.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_INGRESSO_RICHIESTA_STREAM,false),"?");
  94.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_USCITA_RICHIESTA,false),"?");
  95.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_USCITA_RICHIESTA_STREAM,false),"?");
  96.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_ACCETTAZIONE_RISPOSTA,false),"?");
  97.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_INGRESSO_RISPOSTA,false),"?");
  98.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_INGRESSO_RISPOSTA_STREAM,false),"?");
  99.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_USCITA_RISPOSTA,false),"?");
  100.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_USCITA_RISPOSTA_STREAM,false),"?");
  101.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().RICHIESTA_INGRESSO_BYTES,false),"?");
  102.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().RICHIESTA_USCITA_BYTES,false),"?");
  103.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().RISPOSTA_INGRESSO_BYTES,false),"?");
  104.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().RISPOSTA_USCITA_BYTES,false),"?");
  105.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PDD_CODICE,false),"?");
  106.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PDD_TIPO_SOGGETTO,false),"?");
  107.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PDD_NOME_SOGGETTO,false),"?");
  108.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PDD_RUOLO,false),"?");
  109.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().FAULT_INTEGRAZIONE,false),"?");
  110.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().FORMATO_FAULT_INTEGRAZIONE,false),"?");
  111.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().FAULT_COOPERAZIONE,false),"?");
  112.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().FORMATO_FAULT_COOPERAZIONE,false),"?");
  113.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_SOGGETTO_FRUITORE,false),"?");
  114.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().NOME_SOGGETTO_FRUITORE,false),"?");
  115.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().IDPORTA_SOGGETTO_FRUITORE,false),"?");
  116.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().INDIRIZZO_SOGGETTO_FRUITORE,false),"?");
  117.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_SOGGETTO_EROGATORE,false),"?");
  118.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().NOME_SOGGETTO_EROGATORE,false),"?");
  119.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().IDPORTA_SOGGETTO_EROGATORE,false),"?");
  120.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().INDIRIZZO_SOGGETTO_EROGATORE,false),"?");
  121.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_MESSAGGIO_RICHIESTA,false),"?");
  122.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_MESSAGGIO_RISPOSTA,false),"?");
  123.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_ID_MSG_RICHIESTA,false),"?");
  124.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_ID_MSG_RISPOSTA,false),"?");
  125.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PROFILO_COLLABORAZIONE_OP_2,false),"?");
  126.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PROFILO_COLLABORAZIONE_PROT,false),"?");
  127.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_COLLABORAZIONE,false),"?");
  128.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().URI_ACCORDO_SERVIZIO,false),"?");
  129.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_SERVIZIO,false),"?");
  130.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().NOME_SERVIZIO,false),"?");
  131.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().VERSIONE_SERVIZIO,false),"?");
  132.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().AZIONE,false),"?");
  133.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_ASINCRONO,false),"?");
  134.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_SERVIZIO_CORRELATO,false),"?");
  135.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().NOME_SERVIZIO_CORRELATO,false),"?");
  136.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().HEADER_PROTOCOLLO_RICHIESTA,false),"?");
  137.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIGEST_RICHIESTA,false),"?");
  138.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PROTOCOLLO_EXT_INFO_RICHIESTA,false),"?");
  139.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().HEADER_PROTOCOLLO_RISPOSTA,false),"?");
  140.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIGEST_RISPOSTA,false),"?");
  141.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PROTOCOLLO_EXT_INFO_RISPOSTA,false),"?");
  142.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TRACCIA_RICHIESTA,false),"?");
  143.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TRACCIA_RISPOSTA,false),"?");
  144.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIAGNOSTICI,false),"?");
  145.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIAGNOSTICI_LIST_1,false),"?");
  146.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIAGNOSTICI_LIST_2,false),"?");
  147.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIAGNOSTICI_LIST_EXT,false),"?");
  148.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIAGNOSTICI_EXT,false),"?");
  149.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ERROR_LOG,false),"?");
  150.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().WARNING_LOG,false),"?");
  151.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_CORRELAZIONE_APPLICATIVA,false),"?");
  152.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_CORRELAZIONE_APPLICATIVA_RISPOSTA,false),"?");
  153.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().SERVIZIO_APPLICATIVO_FRUITORE,false),"?");
  154.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().SERVIZIO_APPLICATIVO_EROGATORE,false),"?");
  155.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().OPERAZIONE_IM,false),"?");
  156.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().LOCATION_RICHIESTA,false),"?");
  157.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().LOCATION_RISPOSTA,false),"?");
  158.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().NOME_PORTA,false),"?");
  159.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CREDENZIALI,false),"?");
  160.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().LOCATION_CONNETTORE,false),"?");
  161.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().URL_INVOCAZIONE,false),"?");
  162.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TRASPORTO_MITTENTE,false),"?");
  163.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_ISSUER,false),"?");
  164.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_CLIENT_ID,false),"?");
  165.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_SUBJECT,false),"?");
  166.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_USERNAME,false),"?");
  167.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_MAIL,false),"?");
  168.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_INFO,false),"?");
  169.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TEMPI_ELABORAZIONE,false),"?");
  170.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DUPLICATI_RICHIESTA,false),"?");
  171.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DUPLICATI_RISPOSTA,false),"?");
  172.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CLUSTER_ID,false),"?");
  173.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().SOCKET_CLIENT_ADDRESS,false),"?");
  174.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TRANSPORT_CLIENT_ADDRESS,false),"?");
  175.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CLIENT_ADDRESS,false),"?");
  176.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().EVENTI_GESTIONE,false),"?");
  177.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_API,false),"?");
  178.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().URI_API,false),"?");
  179.         sqlQueryObjectInsert.addInsertField(this.getTransazioneFieldConverter().toColumn(Transazione.model().GRUPPI,false),"?");
  180.         if(transazione.sizeTransazioneExtendedInfoList()>0){
  181.             for (TransazioneExtendedInfo transazioneExtedendInfo : transazione.getTransazioneExtendedInfoList()) {
  182.                 sqlQueryObjectInsert.addInsertField(transazioneExtedendInfo.getNome(),"?");
  183.             }
  184.         }
  185.            
  186.         // Insert transazione
  187.         String insertSql = sqlQueryObjectInsert.createSQLInsert();
  188.         List<JDBCObject> listaJDBCObject = new ArrayList<>();
  189.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIdTransazione(),Transazione.model().ID_TRANSAZIONE.getFieldType()) );
  190.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getStato(),Transazione.model().STATO.getFieldType()) );
  191.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getRuoloTransazione(),Transazione.model().RUOLO_TRANSAZIONE.getFieldType()) );
  192.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getEsito(),Transazione.model().ESITO.getFieldType()) );
  193.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getEsitoSincrono(),Transazione.model().ESITO_SINCRONO.getFieldType()) );
  194.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getConsegneMultipleInCorso(),Transazione.model().CONSEGNE_MULTIPLE_IN_CORSO.getFieldType()) );
  195.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getEsitoContesto(),Transazione.model().ESITO_CONTESTO.getFieldType()) );
  196.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getProtocollo(),Transazione.model().PROTOCOLLO.getFieldType()) );
  197.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTipoRichiesta(),Transazione.model().TIPO_RICHIESTA.getFieldType()) );
  198.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getCodiceRispostaIngresso(),Transazione.model().CODICE_RISPOSTA_INGRESSO.getFieldType()) );
  199.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getCodiceRispostaUscita(),Transazione.model().CODICE_RISPOSTA_USCITA.getFieldType()) );
  200.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataAccettazioneRichiesta(),Transazione.model().DATA_ACCETTAZIONE_RICHIESTA.getFieldType()) );
  201.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataIngressoRichiesta(),Transazione.model().DATA_INGRESSO_RICHIESTA.getFieldType()) );
  202.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataIngressoRichiestaStream(),Transazione.model().DATA_INGRESSO_RICHIESTA_STREAM.getFieldType()) );
  203.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataUscitaRichiesta(),Transazione.model().DATA_USCITA_RICHIESTA.getFieldType()) );
  204.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataUscitaRichiestaStream(),Transazione.model().DATA_USCITA_RICHIESTA_STREAM.getFieldType()) );
  205.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataAccettazioneRisposta(),Transazione.model().DATA_ACCETTAZIONE_RISPOSTA.getFieldType()) );
  206.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataIngressoRisposta(),Transazione.model().DATA_INGRESSO_RISPOSTA.getFieldType()) );
  207.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataIngressoRispostaStream(),Transazione.model().DATA_INGRESSO_RISPOSTA_STREAM.getFieldType()) );
  208.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataUscitaRisposta(),Transazione.model().DATA_USCITA_RISPOSTA.getFieldType()) );
  209.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataUscitaRispostaStream(),Transazione.model().DATA_USCITA_RISPOSTA_STREAM.getFieldType()) );
  210.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getRichiestaIngressoBytes(),Transazione.model().RICHIESTA_INGRESSO_BYTES.getFieldType()) );
  211.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getRichiestaUscitaBytes(),Transazione.model().RICHIESTA_USCITA_BYTES.getFieldType()) );
  212.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getRispostaIngressoBytes(),Transazione.model().RISPOSTA_INGRESSO_BYTES.getFieldType()) );
  213.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getRispostaUscitaBytes(),Transazione.model().RISPOSTA_USCITA_BYTES.getFieldType()) );
  214.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getPddCodice(),Transazione.model().PDD_CODICE.getFieldType()) );
  215.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getPddTipoSoggetto(),Transazione.model().PDD_TIPO_SOGGETTO.getFieldType()) );
  216.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getPddNomeSoggetto(),Transazione.model().PDD_NOME_SOGGETTO.getFieldType()) );
  217.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getPddRuolo(),Transazione.model().PDD_RUOLO.getFieldType()) );
  218.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getFaultIntegrazione(),Transazione.model().FAULT_INTEGRAZIONE.getFieldType()) );
  219.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getFormatoFaultIntegrazione(),Transazione.model().FORMATO_FAULT_INTEGRAZIONE.getFieldType()) );
  220.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getFaultCooperazione(),Transazione.model().FAULT_COOPERAZIONE.getFieldType()) );
  221.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getFormatoFaultCooperazione(),Transazione.model().FORMATO_FAULT_COOPERAZIONE.getFieldType()) );
  222.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTipoSoggettoFruitore(),Transazione.model().TIPO_SOGGETTO_FRUITORE.getFieldType()) );
  223.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getNomeSoggettoFruitore(),Transazione.model().NOME_SOGGETTO_FRUITORE.getFieldType()) );
  224.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIdportaSoggettoFruitore(),Transazione.model().IDPORTA_SOGGETTO_FRUITORE.getFieldType()) );
  225.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIndirizzoSoggettoFruitore(),Transazione.model().INDIRIZZO_SOGGETTO_FRUITORE.getFieldType()) );
  226.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTipoSoggettoErogatore(),Transazione.model().TIPO_SOGGETTO_EROGATORE.getFieldType()) );
  227.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getNomeSoggettoErogatore(),Transazione.model().NOME_SOGGETTO_EROGATORE.getFieldType()) );
  228.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIdportaSoggettoErogatore(),Transazione.model().IDPORTA_SOGGETTO_EROGATORE.getFieldType()) );
  229.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIndirizzoSoggettoErogatore(),Transazione.model().INDIRIZZO_SOGGETTO_EROGATORE.getFieldType()) );
  230.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIdMessaggioRichiesta(),Transazione.model().ID_MESSAGGIO_RICHIESTA.getFieldType()) );
  231.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIdMessaggioRisposta(),Transazione.model().ID_MESSAGGIO_RISPOSTA.getFieldType()) );
  232.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataIdMsgRichiesta(),Transazione.model().DATA_ID_MSG_RICHIESTA.getFieldType()) );
  233.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDataIdMsgRisposta(),Transazione.model().DATA_ID_MSG_RISPOSTA.getFieldType()) );
  234.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getProfiloCollaborazioneOp2(),Transazione.model().PROFILO_COLLABORAZIONE_OP_2.getFieldType()) );
  235.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getProfiloCollaborazioneProt(),Transazione.model().PROFILO_COLLABORAZIONE_PROT.getFieldType()) );
  236.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIdCollaborazione(),Transazione.model().ID_COLLABORAZIONE.getFieldType()) );
  237.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getUriAccordoServizio(),Transazione.model().URI_ACCORDO_SERVIZIO.getFieldType()) );
  238.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTipoServizio(),Transazione.model().TIPO_SERVIZIO.getFieldType()) );
  239.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getNomeServizio(),Transazione.model().NOME_SERVIZIO.getFieldType()) );
  240.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getVersioneServizio(),Transazione.model().VERSIONE_SERVIZIO.getFieldType()) );
  241.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getAzione(),Transazione.model().AZIONE.getFieldType()) );
  242.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIdAsincrono(),Transazione.model().ID_ASINCRONO.getFieldType()) );
  243.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTipoServizioCorrelato(),Transazione.model().TIPO_SERVIZIO_CORRELATO.getFieldType()) );
  244.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getNomeServizioCorrelato(),Transazione.model().NOME_SERVIZIO_CORRELATO.getFieldType()) );
  245.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getHeaderProtocolloRichiesta(),Transazione.model().HEADER_PROTOCOLLO_RICHIESTA.getFieldType()) );
  246.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDigestRichiesta(),Transazione.model().DIGEST_RICHIESTA.getFieldType()) );
  247.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getProtocolloExtInfoRichiesta(),Transazione.model().PROTOCOLLO_EXT_INFO_RICHIESTA.getFieldType()) );
  248.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getHeaderProtocolloRisposta(),Transazione.model().HEADER_PROTOCOLLO_RISPOSTA.getFieldType()) );
  249.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDigestRisposta(),Transazione.model().DIGEST_RISPOSTA.getFieldType()) );
  250.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getProtocolloExtInfoRisposta(),Transazione.model().PROTOCOLLO_EXT_INFO_RISPOSTA.getFieldType()) );
  251.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTracciaRichiesta(),Transazione.model().TRACCIA_RICHIESTA.getFieldType()) );
  252.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTracciaRisposta(),Transazione.model().TRACCIA_RISPOSTA.getFieldType()) );
  253.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDiagnostici(),Transazione.model().DIAGNOSTICI.getFieldType()) );
  254.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDiagnosticiList1(),Transazione.model().DIAGNOSTICI_LIST_1.getFieldType()) );
  255.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDiagnosticiList2(),Transazione.model().DIAGNOSTICI_LIST_2.getFieldType()) );
  256.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDiagnosticiListExt(),Transazione.model().DIAGNOSTICI_LIST_EXT.getFieldType()) );
  257.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDiagnosticiExt(),Transazione.model().DIAGNOSTICI_EXT.getFieldType()) );
  258.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getErrorLog(),Transazione.model().ERROR_LOG.getFieldType()) );
  259.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getWarningLog(),Transazione.model().WARNING_LOG.getFieldType()) );
  260.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIdCorrelazioneApplicativa(),Transazione.model().ID_CORRELAZIONE_APPLICATIVA.getFieldType()) );
  261.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getIdCorrelazioneApplicativaRisposta(),Transazione.model().ID_CORRELAZIONE_APPLICATIVA_RISPOSTA.getFieldType()) );
  262.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getServizioApplicativoFruitore(),Transazione.model().SERVIZIO_APPLICATIVO_FRUITORE.getFieldType()) );
  263.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getServizioApplicativoErogatore(),Transazione.model().SERVIZIO_APPLICATIVO_EROGATORE.getFieldType()) );
  264.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getOperazioneIm(),Transazione.model().OPERAZIONE_IM.getFieldType()) );
  265.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getLocationRichiesta(),Transazione.model().LOCATION_RICHIESTA.getFieldType()) );
  266.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getLocationRisposta(),Transazione.model().LOCATION_RISPOSTA.getFieldType()) );
  267.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getNomePorta(),Transazione.model().NOME_PORTA.getFieldType()) );
  268.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getCredenziali(),Transazione.model().CREDENZIALI.getFieldType()) );
  269.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getLocationConnettore(),Transazione.model().LOCATION_CONNETTORE.getFieldType()) );
  270.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getUrlInvocazione(),Transazione.model().URL_INVOCAZIONE.getFieldType()) );
  271.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTrasportoMittente(),Transazione.model().TRASPORTO_MITTENTE.getFieldType()) );
  272.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTokenIssuer(),Transazione.model().TOKEN_ISSUER.getFieldType()) );
  273.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTokenClientId(),Transazione.model().TOKEN_CLIENT_ID.getFieldType()) );
  274.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTokenSubject(),Transazione.model().TOKEN_SUBJECT.getFieldType()) );
  275.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTokenUsername(),Transazione.model().TOKEN_USERNAME.getFieldType()) );
  276.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTokenMail(),Transazione.model().TOKEN_MAIL.getFieldType()) );
  277.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTokenInfo(),Transazione.model().TOKEN_INFO.getFieldType()) );
  278.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTempiElaborazione(),Transazione.model().TEMPI_ELABORAZIONE.getFieldType()) );
  279.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDuplicatiRichiesta(),Transazione.model().DUPLICATI_RICHIESTA.getFieldType()) );
  280.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getDuplicatiRisposta(),Transazione.model().DUPLICATI_RISPOSTA.getFieldType()) );
  281.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getClusterId(),Transazione.model().CLUSTER_ID.getFieldType()) );
  282.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getSocketClientAddress(),Transazione.model().SOCKET_CLIENT_ADDRESS.getFieldType()) );
  283.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTransportClientAddress(),Transazione.model().TRANSPORT_CLIENT_ADDRESS.getFieldType()) );
  284.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getClientAddress(),Transazione.model().CLIENT_ADDRESS.getFieldType()));
  285.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getEventiGestione(),Transazione.model().EVENTI_GESTIONE.getFieldType()));
  286.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getTipoApi(),Transazione.model().TIPO_API.getFieldType()));
  287.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getUriApi(),Transazione.model().URI_API.getFieldType()));
  288.         listaJDBCObject.add(new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazione.getGruppi(),Transazione.model().GRUPPI.getFieldType()));
  289.         // transazione-extended-info: serve ad estendere la tabella transazioni su progetti specifici (es. pdc, fwuuid)
  290.         if(transazione.sizeTransazioneExtendedInfoList()>0){
  291.             for (TransazioneExtendedInfo transazioneExtedendInfo : transazione.getTransazioneExtendedInfoList()) {
  292.                 listaJDBCObject.add( new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCObject(transazioneExtedendInfo.getValore(),String.class));
  293.             }
  294.         }
  295.         jdbcUtilities.execute(insertSql, jdbcProperties.isShowSql(),
  296.                 listaJDBCObject.toArray(new JDBCObject[1])
  297.         );
  298.        
  299.     }
  300.    
  301.     @Override
  302.     public void update(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, String oldId, Transazione transazioneParam, org.openspcoop2.generic_project.beans.IDMappingBehaviour idMappingResolutionBehaviour) throws NotFoundException, NotImplementedException, ServiceException, Exception {
  303.        
  304.         Transazione transazione = null;
  305.         boolean useDayIntervalForUpdate = false;
  306.         if(transazioneParam instanceof TransazioneDaoExt) {
  307.             TransazioneDaoExt ext = (TransazioneDaoExt) transazioneParam;
  308.             transazione = ext.getWrapped();
  309.             useDayIntervalForUpdate = ext.isUseDayIntervalForUpdate();
  310.         }
  311.         else {
  312.             transazione = transazioneParam;
  313.         }
  314.        
  315.         if(TipiDatabase.POSTGRESQL.equals(jdbcProperties.getDatabase())){
  316.             if(transazione.getFaultCooperazione()!=null && org.openspcoop2.utils.jdbc.PostgreSQLUtilities.containsNullByteSequence(transazione.getFaultCooperazione())) {
  317.                 transazione.setFaultCooperazione(org.openspcoop2.utils.jdbc.PostgreSQLUtilities.normalizeString(transazione.getFaultCooperazione()));
  318.             }
  319.             if(transazione.getFaultIntegrazione()!=null && org.openspcoop2.utils.jdbc.PostgreSQLUtilities.containsNullByteSequence(transazione.getFaultIntegrazione())) {
  320.                 transazione.setFaultIntegrazione(org.openspcoop2.utils.jdbc.PostgreSQLUtilities.normalizeString(transazione.getFaultIntegrazione()));
  321.             }
  322.             if(transazione.getCredenziali()!=null && org.openspcoop2.utils.jdbc.PostgreSQLUtilities.containsNullByteSequence(transazione.getCredenziali())) {
  323.                 transazione.setCredenziali(org.openspcoop2.utils.jdbc.PostgreSQLUtilities.normalizeString(transazione.getCredenziali()));
  324.             }
  325.         }
  326.            
  327.         ISQLQueryObject sqlQueryObjectUpdate = sqlQueryObject.newSQLQueryObject();
  328.         Object longIdByLogicId = this.findIdTransazione(jdbcProperties, log, connection, sqlQueryObjectUpdate.newSQLQueryObject(), oldId, true, false);
  329.         if(longIdByLogicId==null){
  330.             throw new Exception("Retrieve logicId failed");
  331.         }

  332.    
  333.         org.openspcoop2.generic_project.dao.jdbc.utils.JDBCPreparedStatementUtilities jdbcUtilities =
  334.                 new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCPreparedStatementUtilities(sqlQueryObject.getTipoDatabaseOpenSPCoop2(), log, connection);
  335.        
  336.         // Object transazione
  337.         sqlQueryObjectUpdate.setANDLogicOperator(true);
  338.         sqlQueryObjectUpdate.addUpdateTable(this.getTransazioneFieldConverter().toTable(Transazione.model()));
  339.         boolean isUpdate_transazione = true;
  340.         java.util.List<JDBCObject> lstObjects_transazione = new java.util.ArrayList<>();
  341.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_TRANSAZIONE,false), "?");
  342.         lstObjects_transazione.add(new JDBCObject(transazione.getIdTransazione(), Transazione.model().ID_TRANSAZIONE.getFieldType()));
  343.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().STATO,false), "?");
  344.         lstObjects_transazione.add(new JDBCObject(transazione.getStato(), Transazione.model().STATO.getFieldType()));
  345.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().RUOLO_TRANSAZIONE,false), "?");
  346.         lstObjects_transazione.add(new JDBCObject(transazione.getRuoloTransazione(), Transazione.model().RUOLO_TRANSAZIONE.getFieldType()));
  347.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ESITO,false), "?");
  348.         lstObjects_transazione.add(new JDBCObject(transazione.getEsito(), Transazione.model().ESITO.getFieldType()));
  349.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ESITO_SINCRONO,false), "?");
  350.         lstObjects_transazione.add(new JDBCObject(transazione.getEsitoSincrono(), Transazione.model().ESITO_SINCRONO.getFieldType()));
  351.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CONSEGNE_MULTIPLE_IN_CORSO,false), "?");
  352.         lstObjects_transazione.add(new JDBCObject(transazione.getConsegneMultipleInCorso(), Transazione.model().CONSEGNE_MULTIPLE_IN_CORSO.getFieldType()));
  353.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ESITO_CONTESTO,false), "?");
  354.         lstObjects_transazione.add(new JDBCObject(transazione.getEsitoContesto(), Transazione.model().ESITO_CONTESTO.getFieldType()));
  355.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PROTOCOLLO,false), "?");
  356.         lstObjects_transazione.add(new JDBCObject(transazione.getProtocollo(), Transazione.model().PROTOCOLLO.getFieldType()));
  357.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_RICHIESTA,false), "?");
  358.         lstObjects_transazione.add(new JDBCObject(transazione.getTipoRichiesta(), Transazione.model().TIPO_RICHIESTA.getFieldType()));
  359.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CODICE_RISPOSTA_INGRESSO,false), "?");
  360.         lstObjects_transazione.add(new JDBCObject(transazione.getCodiceRispostaIngresso(), Transazione.model().CODICE_RISPOSTA_INGRESSO.getFieldType()));
  361.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CODICE_RISPOSTA_USCITA,false), "?");
  362.         lstObjects_transazione.add(new JDBCObject(transazione.getCodiceRispostaUscita(), Transazione.model().CODICE_RISPOSTA_USCITA.getFieldType()));
  363.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_ACCETTAZIONE_RICHIESTA,false), "?");
  364.         lstObjects_transazione.add(new JDBCObject(transazione.getDataAccettazioneRichiesta(), Transazione.model().DATA_ACCETTAZIONE_RICHIESTA.getFieldType()));
  365.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_INGRESSO_RICHIESTA,false), "?");
  366.         lstObjects_transazione.add(new JDBCObject(transazione.getDataIngressoRichiesta(), Transazione.model().DATA_INGRESSO_RICHIESTA.getFieldType()));
  367.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_INGRESSO_RICHIESTA_STREAM,false), "?");
  368.         lstObjects_transazione.add(new JDBCObject(transazione.getDataIngressoRichiestaStream(), Transazione.model().DATA_INGRESSO_RICHIESTA_STREAM.getFieldType()));
  369.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_USCITA_RICHIESTA,false), "?");
  370.         lstObjects_transazione.add(new JDBCObject(transazione.getDataUscitaRichiesta(), Transazione.model().DATA_USCITA_RICHIESTA.getFieldType()));
  371.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_USCITA_RICHIESTA_STREAM,false), "?");
  372.         lstObjects_transazione.add(new JDBCObject(transazione.getDataUscitaRichiestaStream(), Transazione.model().DATA_USCITA_RICHIESTA_STREAM.getFieldType()));
  373.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_ACCETTAZIONE_RISPOSTA,false), "?");
  374.         lstObjects_transazione.add(new JDBCObject(transazione.getDataAccettazioneRisposta(), Transazione.model().DATA_ACCETTAZIONE_RISPOSTA.getFieldType()));
  375.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_INGRESSO_RISPOSTA,false), "?");
  376.         lstObjects_transazione.add(new JDBCObject(transazione.getDataIngressoRisposta(), Transazione.model().DATA_INGRESSO_RISPOSTA.getFieldType()));
  377.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_INGRESSO_RISPOSTA_STREAM,false), "?");
  378.         lstObjects_transazione.add(new JDBCObject(transazione.getDataIngressoRispostaStream(), Transazione.model().DATA_INGRESSO_RISPOSTA_STREAM.getFieldType()));
  379.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_USCITA_RISPOSTA,false), "?");
  380.         lstObjects_transazione.add(new JDBCObject(transazione.getDataUscitaRisposta(), Transazione.model().DATA_USCITA_RISPOSTA.getFieldType()));
  381.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_USCITA_RISPOSTA_STREAM,false), "?");
  382.         lstObjects_transazione.add(new JDBCObject(transazione.getDataUscitaRispostaStream(), Transazione.model().DATA_USCITA_RISPOSTA_STREAM.getFieldType()));
  383.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().RICHIESTA_INGRESSO_BYTES,false), "?");
  384.         lstObjects_transazione.add(new JDBCObject(transazione.getRichiestaIngressoBytes(), Transazione.model().RICHIESTA_INGRESSO_BYTES.getFieldType()));
  385.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().RICHIESTA_USCITA_BYTES,false), "?");
  386.         lstObjects_transazione.add(new JDBCObject(transazione.getRichiestaUscitaBytes(), Transazione.model().RICHIESTA_USCITA_BYTES.getFieldType()));
  387.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().RISPOSTA_INGRESSO_BYTES,false), "?");
  388.         lstObjects_transazione.add(new JDBCObject(transazione.getRispostaIngressoBytes(), Transazione.model().RISPOSTA_INGRESSO_BYTES.getFieldType()));
  389.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().RISPOSTA_USCITA_BYTES,false), "?");
  390.         lstObjects_transazione.add(new JDBCObject(transazione.getRispostaUscitaBytes(), Transazione.model().RISPOSTA_USCITA_BYTES.getFieldType()));
  391.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PDD_CODICE,false), "?");
  392.         lstObjects_transazione.add(new JDBCObject(transazione.getPddCodice(), Transazione.model().PDD_CODICE.getFieldType()));
  393.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PDD_TIPO_SOGGETTO,false), "?");
  394.         lstObjects_transazione.add(new JDBCObject(transazione.getPddTipoSoggetto(), Transazione.model().PDD_TIPO_SOGGETTO.getFieldType()));
  395.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PDD_NOME_SOGGETTO,false), "?");
  396.         lstObjects_transazione.add(new JDBCObject(transazione.getPddNomeSoggetto(), Transazione.model().PDD_NOME_SOGGETTO.getFieldType()));
  397.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PDD_RUOLO,false), "?");
  398.         lstObjects_transazione.add(new JDBCObject(transazione.getPddRuolo(), Transazione.model().PDD_RUOLO.getFieldType()));
  399.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().FAULT_INTEGRAZIONE,false), "?");
  400.         lstObjects_transazione.add(new JDBCObject(transazione.getFaultIntegrazione(), Transazione.model().FAULT_INTEGRAZIONE.getFieldType()));
  401.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().FORMATO_FAULT_INTEGRAZIONE,false), "?");
  402.         lstObjects_transazione.add(new JDBCObject(transazione.getFormatoFaultIntegrazione(), Transazione.model().FORMATO_FAULT_INTEGRAZIONE.getFieldType()));
  403.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().FAULT_COOPERAZIONE,false), "?");
  404.         lstObjects_transazione.add(new JDBCObject(transazione.getFaultCooperazione(), Transazione.model().FAULT_COOPERAZIONE.getFieldType()));
  405.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().FORMATO_FAULT_COOPERAZIONE,false), "?");
  406.         lstObjects_transazione.add(new JDBCObject(transazione.getFormatoFaultCooperazione(), Transazione.model().FORMATO_FAULT_COOPERAZIONE.getFieldType()));
  407.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_SOGGETTO_FRUITORE,false), "?");
  408.         lstObjects_transazione.add(new JDBCObject(transazione.getTipoSoggettoFruitore(), Transazione.model().TIPO_SOGGETTO_FRUITORE.getFieldType()));
  409.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().NOME_SOGGETTO_FRUITORE,false), "?");
  410.         lstObjects_transazione.add(new JDBCObject(transazione.getNomeSoggettoFruitore(), Transazione.model().NOME_SOGGETTO_FRUITORE.getFieldType()));
  411.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().IDPORTA_SOGGETTO_FRUITORE,false), "?");
  412.         lstObjects_transazione.add(new JDBCObject(transazione.getIdportaSoggettoFruitore(), Transazione.model().IDPORTA_SOGGETTO_FRUITORE.getFieldType()));
  413.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().INDIRIZZO_SOGGETTO_FRUITORE,false), "?");
  414.         lstObjects_transazione.add(new JDBCObject(transazione.getIndirizzoSoggettoFruitore(), Transazione.model().INDIRIZZO_SOGGETTO_FRUITORE.getFieldType()));
  415.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_SOGGETTO_EROGATORE,false), "?");
  416.         lstObjects_transazione.add(new JDBCObject(transazione.getTipoSoggettoErogatore(), Transazione.model().TIPO_SOGGETTO_EROGATORE.getFieldType()));
  417.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().NOME_SOGGETTO_EROGATORE,false), "?");
  418.         lstObjects_transazione.add(new JDBCObject(transazione.getNomeSoggettoErogatore(), Transazione.model().NOME_SOGGETTO_EROGATORE.getFieldType()));
  419.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().IDPORTA_SOGGETTO_EROGATORE,false), "?");
  420.         lstObjects_transazione.add(new JDBCObject(transazione.getIdportaSoggettoErogatore(), Transazione.model().IDPORTA_SOGGETTO_EROGATORE.getFieldType()));
  421.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().INDIRIZZO_SOGGETTO_EROGATORE,false), "?");
  422.         lstObjects_transazione.add(new JDBCObject(transazione.getIndirizzoSoggettoErogatore(), Transazione.model().INDIRIZZO_SOGGETTO_EROGATORE.getFieldType()));
  423.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_MESSAGGIO_RICHIESTA,false), "?");
  424.         lstObjects_transazione.add(new JDBCObject(transazione.getIdMessaggioRichiesta(), Transazione.model().ID_MESSAGGIO_RICHIESTA.getFieldType()));
  425.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_MESSAGGIO_RISPOSTA,false), "?");
  426.         lstObjects_transazione.add(new JDBCObject(transazione.getIdMessaggioRisposta(), Transazione.model().ID_MESSAGGIO_RISPOSTA.getFieldType()));
  427.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_ID_MSG_RICHIESTA,false), "?");
  428.         lstObjects_transazione.add(new JDBCObject(transazione.getDataIdMsgRichiesta(), Transazione.model().DATA_ID_MSG_RICHIESTA.getFieldType()));
  429.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_ID_MSG_RISPOSTA,false), "?");
  430.         lstObjects_transazione.add(new JDBCObject(transazione.getDataIdMsgRisposta(), Transazione.model().DATA_ID_MSG_RISPOSTA.getFieldType()));
  431.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PROFILO_COLLABORAZIONE_OP_2,false), "?");
  432.         lstObjects_transazione.add(new JDBCObject(transazione.getProfiloCollaborazioneOp2(), Transazione.model().PROFILO_COLLABORAZIONE_OP_2.getFieldType()));
  433.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PROFILO_COLLABORAZIONE_PROT,false), "?");
  434.         lstObjects_transazione.add(new JDBCObject(transazione.getProfiloCollaborazioneProt(), Transazione.model().PROFILO_COLLABORAZIONE_PROT.getFieldType()));
  435.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_COLLABORAZIONE,false), "?");
  436.         lstObjects_transazione.add(new JDBCObject(transazione.getIdCollaborazione(), Transazione.model().ID_COLLABORAZIONE.getFieldType()));
  437.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().URI_ACCORDO_SERVIZIO,false), "?");
  438.         lstObjects_transazione.add(new JDBCObject(transazione.getUriAccordoServizio(), Transazione.model().URI_ACCORDO_SERVIZIO.getFieldType()));
  439.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_SERVIZIO,false), "?");
  440.         lstObjects_transazione.add(new JDBCObject(transazione.getTipoServizio(), Transazione.model().TIPO_SERVIZIO.getFieldType()));
  441.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().NOME_SERVIZIO,false), "?");
  442.         lstObjects_transazione.add(new JDBCObject(transazione.getNomeServizio(), Transazione.model().NOME_SERVIZIO.getFieldType()));
  443.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().VERSIONE_SERVIZIO,false), "?");
  444.         lstObjects_transazione.add(new JDBCObject(transazione.getVersioneServizio(), Transazione.model().VERSIONE_SERVIZIO.getFieldType()));
  445.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().AZIONE,false), "?");
  446.         lstObjects_transazione.add(new JDBCObject(transazione.getAzione(), Transazione.model().AZIONE.getFieldType()));
  447.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_ASINCRONO,false), "?");
  448.         lstObjects_transazione.add(new JDBCObject(transazione.getIdAsincrono(), Transazione.model().ID_ASINCRONO.getFieldType()));
  449.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_SERVIZIO_CORRELATO,false), "?");
  450.         lstObjects_transazione.add(new JDBCObject(transazione.getTipoServizioCorrelato(), Transazione.model().TIPO_SERVIZIO_CORRELATO.getFieldType()));
  451.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().NOME_SERVIZIO_CORRELATO,false), "?");
  452.         lstObjects_transazione.add(new JDBCObject(transazione.getNomeServizioCorrelato(), Transazione.model().NOME_SERVIZIO_CORRELATO.getFieldType()));
  453.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().HEADER_PROTOCOLLO_RICHIESTA,false), "?");
  454.         lstObjects_transazione.add(new JDBCObject(transazione.getHeaderProtocolloRichiesta(), Transazione.model().HEADER_PROTOCOLLO_RICHIESTA.getFieldType()));
  455.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIGEST_RICHIESTA,false), "?");
  456.         lstObjects_transazione.add(new JDBCObject(transazione.getDigestRichiesta(), Transazione.model().DIGEST_RICHIESTA.getFieldType()));
  457.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PROTOCOLLO_EXT_INFO_RICHIESTA,false), "?");
  458.         lstObjects_transazione.add(new JDBCObject(transazione.getProtocolloExtInfoRichiesta(), Transazione.model().PROTOCOLLO_EXT_INFO_RICHIESTA.getFieldType()));
  459.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().HEADER_PROTOCOLLO_RISPOSTA,false), "?");
  460.         lstObjects_transazione.add(new JDBCObject(transazione.getHeaderProtocolloRisposta(), Transazione.model().HEADER_PROTOCOLLO_RISPOSTA.getFieldType()));
  461.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIGEST_RISPOSTA,false), "?");
  462.         lstObjects_transazione.add(new JDBCObject(transazione.getDigestRisposta(), Transazione.model().DIGEST_RISPOSTA.getFieldType()));
  463.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().PROTOCOLLO_EXT_INFO_RISPOSTA,false), "?");
  464.         lstObjects_transazione.add(new JDBCObject(transazione.getProtocolloExtInfoRisposta(), Transazione.model().PROTOCOLLO_EXT_INFO_RISPOSTA.getFieldType()));
  465.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TRACCIA_RICHIESTA,false), "?");
  466.         lstObjects_transazione.add(new JDBCObject(transazione.getTracciaRichiesta(), Transazione.model().TRACCIA_RICHIESTA.getFieldType()));
  467.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TRACCIA_RISPOSTA,false), "?");
  468.         lstObjects_transazione.add(new JDBCObject(transazione.getTracciaRisposta(), Transazione.model().TRACCIA_RISPOSTA.getFieldType()));
  469.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIAGNOSTICI,false), "?");
  470.         lstObjects_transazione.add(new JDBCObject(transazione.getDiagnostici(), Transazione.model().DIAGNOSTICI.getFieldType()));
  471.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIAGNOSTICI_LIST_1,false), "?");
  472.         lstObjects_transazione.add(new JDBCObject(transazione.getDiagnosticiList1(), Transazione.model().DIAGNOSTICI_LIST_1.getFieldType()));
  473.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIAGNOSTICI_LIST_2,false), "?");
  474.         lstObjects_transazione.add(new JDBCObject(transazione.getDiagnosticiList2(), Transazione.model().DIAGNOSTICI_LIST_2.getFieldType()));
  475.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIAGNOSTICI_LIST_EXT,false), "?");
  476.         lstObjects_transazione.add(new JDBCObject(transazione.getDiagnosticiListExt(), Transazione.model().DIAGNOSTICI_LIST_EXT.getFieldType()));
  477.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DIAGNOSTICI_EXT,false), "?");
  478.         lstObjects_transazione.add(new JDBCObject(transazione.getDiagnosticiExt(), Transazione.model().DIAGNOSTICI_EXT.getFieldType()));
  479.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ERROR_LOG,false), "?");
  480.         lstObjects_transazione.add(new JDBCObject(transazione.getErrorLog(), Transazione.model().ERROR_LOG.getFieldType()));
  481.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().WARNING_LOG,false), "?");
  482.         lstObjects_transazione.add(new JDBCObject(transazione.getWarningLog(), Transazione.model().WARNING_LOG.getFieldType()));
  483.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_CORRELAZIONE_APPLICATIVA,false), "?");
  484.         lstObjects_transazione.add(new JDBCObject(transazione.getIdCorrelazioneApplicativa(), Transazione.model().ID_CORRELAZIONE_APPLICATIVA.getFieldType()));
  485.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_CORRELAZIONE_APPLICATIVA_RISPOSTA,false), "?");
  486.         lstObjects_transazione.add(new JDBCObject(transazione.getIdCorrelazioneApplicativaRisposta(), Transazione.model().ID_CORRELAZIONE_APPLICATIVA_RISPOSTA.getFieldType()));
  487.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().SERVIZIO_APPLICATIVO_FRUITORE,false), "?");
  488.         lstObjects_transazione.add(new JDBCObject(transazione.getServizioApplicativoFruitore(), Transazione.model().SERVIZIO_APPLICATIVO_FRUITORE.getFieldType()));
  489.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().SERVIZIO_APPLICATIVO_EROGATORE,false), "?");
  490.         lstObjects_transazione.add(new JDBCObject(transazione.getServizioApplicativoErogatore(), Transazione.model().SERVIZIO_APPLICATIVO_EROGATORE.getFieldType()));
  491.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().OPERAZIONE_IM,false), "?");
  492.         lstObjects_transazione.add(new JDBCObject(transazione.getOperazioneIm(), Transazione.model().OPERAZIONE_IM.getFieldType()));
  493.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().LOCATION_RICHIESTA,false), "?");
  494.         lstObjects_transazione.add(new JDBCObject(transazione.getLocationRichiesta(), Transazione.model().LOCATION_RICHIESTA.getFieldType()));
  495.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().LOCATION_RISPOSTA,false), "?");
  496.         lstObjects_transazione.add(new JDBCObject(transazione.getLocationRisposta(), Transazione.model().LOCATION_RISPOSTA.getFieldType()));
  497.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().NOME_PORTA,false), "?");
  498.         lstObjects_transazione.add(new JDBCObject(transazione.getNomePorta(), Transazione.model().NOME_PORTA.getFieldType()));
  499.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CREDENZIALI,false), "?");
  500.         lstObjects_transazione.add(new JDBCObject(transazione.getCredenziali(), Transazione.model().CREDENZIALI.getFieldType()));
  501.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().LOCATION_CONNETTORE,false), "?");
  502.         lstObjects_transazione.add(new JDBCObject(transazione.getLocationConnettore(), Transazione.model().LOCATION_CONNETTORE.getFieldType()));
  503.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().URL_INVOCAZIONE,false), "?");
  504.         lstObjects_transazione.add(new JDBCObject(transazione.getUrlInvocazione(), Transazione.model().URL_INVOCAZIONE.getFieldType()));
  505.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TRASPORTO_MITTENTE,false), "?");
  506.         lstObjects_transazione.add(new JDBCObject(transazione.getTrasportoMittente(), Transazione.model().TRASPORTO_MITTENTE.getFieldType()));
  507.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_ISSUER,false), "?");
  508.         lstObjects_transazione.add(new JDBCObject(transazione.getTokenIssuer(), Transazione.model().TOKEN_ISSUER.getFieldType()));
  509.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_CLIENT_ID,false), "?");
  510.         lstObjects_transazione.add(new JDBCObject(transazione.getTokenClientId(), Transazione.model().TOKEN_CLIENT_ID.getFieldType()));
  511.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_SUBJECT,false), "?");
  512.         lstObjects_transazione.add(new JDBCObject(transazione.getTokenSubject(), Transazione.model().TOKEN_SUBJECT.getFieldType()));
  513.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_USERNAME,false), "?");
  514.         lstObjects_transazione.add(new JDBCObject(transazione.getTokenUsername(), Transazione.model().TOKEN_USERNAME.getFieldType()));
  515.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_MAIL,false), "?");
  516.         lstObjects_transazione.add(new JDBCObject(transazione.getTokenMail(), Transazione.model().TOKEN_MAIL.getFieldType()));
  517.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TOKEN_INFO,false), "?");
  518.         lstObjects_transazione.add(new JDBCObject(transazione.getTokenInfo(), Transazione.model().TOKEN_INFO.getFieldType()));
  519.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TEMPI_ELABORAZIONE,false), "?");
  520.         lstObjects_transazione.add(new JDBCObject(transazione.getTempiElaborazione(), Transazione.model().TEMPI_ELABORAZIONE.getFieldType()));
  521.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DUPLICATI_RICHIESTA,false), "?");
  522.         lstObjects_transazione.add(new JDBCObject(transazione.getDuplicatiRichiesta(), Transazione.model().DUPLICATI_RICHIESTA.getFieldType()));
  523.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().DUPLICATI_RISPOSTA,false), "?");
  524.         lstObjects_transazione.add(new JDBCObject(transazione.getDuplicatiRisposta(), Transazione.model().DUPLICATI_RISPOSTA.getFieldType()));
  525.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CLUSTER_ID,false), "?");
  526.         lstObjects_transazione.add(new JDBCObject(transazione.getClusterId(), Transazione.model().CLUSTER_ID.getFieldType()));
  527.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().SOCKET_CLIENT_ADDRESS,false), "?");
  528.         lstObjects_transazione.add(new JDBCObject(transazione.getSocketClientAddress(), Transazione.model().SOCKET_CLIENT_ADDRESS.getFieldType()));
  529.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TRANSPORT_CLIENT_ADDRESS,false), "?");
  530.         lstObjects_transazione.add(new JDBCObject(transazione.getTransportClientAddress(), Transazione.model().TRANSPORT_CLIENT_ADDRESS.getFieldType()));
  531.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().CLIENT_ADDRESS,false), "?");
  532.         lstObjects_transazione.add(new JDBCObject(transazione.getClientAddress(), Transazione.model().CLIENT_ADDRESS.getFieldType()));
  533.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().EVENTI_GESTIONE,false), "?");
  534.         lstObjects_transazione.add(new JDBCObject(transazione.getEventiGestione(), Transazione.model().EVENTI_GESTIONE.getFieldType()));
  535.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().TIPO_API,false), "?");
  536.         lstObjects_transazione.add(new JDBCObject(transazione.getTipoApi(), Transazione.model().TIPO_API.getFieldType()));
  537.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().URI_API,false), "?");
  538.         lstObjects_transazione.add(new JDBCObject(transazione.getUriApi(), Transazione.model().URI_API.getFieldType()));
  539.         sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(Transazione.model().GRUPPI,false), "?");
  540.         lstObjects_transazione.add(new JDBCObject(transazione.getGruppi(), Transazione.model().GRUPPI.getFieldType()));
  541.         if(transazione.sizeTransazioneExtendedInfoList()>0){
  542.             for (TransazioneExtendedInfo transazioneExtedendInfo : transazione.getTransazioneExtendedInfoList()) {
  543.                 sqlQueryObjectUpdate.addUpdateField(transazioneExtedendInfo.getNome(), "?");
  544.                 lstObjects_transazione.add(new JDBCObject(transazioneExtedendInfo.getValore(), String.class));
  545.             }
  546.         }
  547.         sqlQueryObjectUpdate.addWhereCondition(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_TRANSAZIONE,false)+"=?");
  548.         lstObjects_transazione.add(new JDBCObject(longIdByLogicId, longIdByLogicId.getClass()));
  549.        
  550.         if(useDayIntervalForUpdate) {
  551.            
  552.             Date left = DateUtils.convertToLeftInterval(transazione.getDataIngressoRichiesta(), UnitaTemporale.GIORNALIERO);
  553.             sqlQueryObjectUpdate.addWhereCondition(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_INGRESSO_RICHIESTA,false)+">=?");
  554.             lstObjects_transazione.add(new JDBCObject(left, left.getClass()));
  555.            
  556.             Date right = DateUtils.convertToRightInterval(transazione.getDataIngressoRichiesta(), UnitaTemporale.GIORNALIERO);
  557.             sqlQueryObjectUpdate.addWhereCondition(this.getTransazioneFieldConverter().toColumn(Transazione.model().DATA_INGRESSO_RICHIESTA,false)+"<=?");
  558.             lstObjects_transazione.add(new JDBCObject(right, right.getClass()));
  559.            
  560.         }

  561.         if(isUpdate_transazione) {
  562.             // Update transazione
  563.             jdbcUtilities.executeUpdate(sqlQueryObjectUpdate.createSQLUpdate(), jdbcProperties.isShowSql(),
  564.                 lstObjects_transazione.toArray(new JDBCObject[]{}));
  565.         }
  566.        
  567.     }
  568.     @Override
  569.     public void update(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, long tableId, Transazione transazione, org.openspcoop2.generic_project.beans.IDMappingBehaviour idMappingResolutionBehaviour) throws NotFoundException, NotImplementedException, ServiceException, Exception {
  570.         throw new NotImplementedException("Table without long id column PK");
  571.     }
  572.    
  573.     private static boolean efficiente = true;    
  574.     public static boolean isEfficiente() {
  575.         return efficiente;
  576.     }
  577.     public static void setEfficiente(boolean efficiente) {
  578.         JDBCTransazioneServiceImpl.efficiente = efficiente;
  579.     }
  580.    
  581.     @Override
  582.     public void updateFields(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, String id, UpdateField ... updateFields) throws NotFoundException, NotImplementedException, ServiceException, Exception {
  583.        
  584.         if(efficiente) {
  585.             updateFieldsOptimized(jdbcProperties, log, connection, sqlQueryObject, id, null, updateFields);
  586.         }
  587.         else {
  588.             GenericJDBCUtilities.updateFields(jdbcProperties, log, connection, sqlQueryObject,
  589.                     this.getTransazioneFieldConverter().toTable(Transazione.model()),
  590.                     this.getMapTableToPKColumnEngine(),
  591.                     this.getRootTablePrimaryKeyValuesEngine(jdbcProperties, log, connection, sqlQueryObject, id),
  592.                     this.getTransazioneFieldConverter(), this, null, updateFields);
  593.         }
  594.     }
  595.    
  596.     @Override
  597.     public void updateFields(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, String id, IExpression condition, UpdateField ... updateFields) throws NotFoundException, NotImplementedException, ServiceException, Exception {
  598.        
  599.         if(efficiente) {
  600.             updateFieldsOptimized(jdbcProperties, log, connection, sqlQueryObject, id, condition, updateFields);
  601.         }
  602.         else {
  603.             GenericJDBCUtilities.updateFields(jdbcProperties, log, connection, sqlQueryObject,
  604.                     this.getTransazioneFieldConverter().toTable(Transazione.model()),
  605.                     this.getMapTableToPKColumnEngine(),
  606.                     this.getRootTablePrimaryKeyValuesEngine(jdbcProperties, log, connection, sqlQueryObject, id),
  607.                     this.getTransazioneFieldConverter(), this, condition, updateFields);
  608.         }
  609.     }
  610.    
  611.     private void updateFieldsOptimized(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, String id, IExpression condition, UpdateField ... updateFields) throws NotFoundException, NotImplementedException, ServiceException, SQLQueryObjectException, ExpressionException, JDBCAdapterException {
  612.    
  613.         String table =  this.getTransazioneFieldConverter().toTable(Transazione.model());
  614.        
  615.         ISQLQueryObject sqlQueryObjectUpdate = sqlQueryObject.newSQLQueryObject();
  616.         sqlQueryObjectUpdate.setANDLogicOperator(true);
  617.         sqlQueryObjectUpdate.addUpdateTable(table);
  618.        
  619.         // update fields
  620.         java.util.List<JDBCObject> lstObjectsUpdate = new java.util.ArrayList<>();
  621.         for (UpdateField updateField : updateFields) {
  622.             sqlQueryObjectUpdate.addUpdateField(this.getTransazioneFieldConverter().toColumn(updateField.getField(),false), "?");
  623.             lstObjectsUpdate.add(new JDBCObject(updateField.getValue(), updateField.getField().getFieldType()));
  624.         }
  625.        
  626.         // id
  627.         sqlQueryObjectUpdate.addWhereCondition(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_TRANSAZIONE,false)+"=?");
  628.         lstObjectsUpdate.add(new JDBCObject(id, id.getClass()));
  629.        
  630.         // condition
  631.         if(condition instanceof JDBCExpression) {
  632.             JDBCExpression jdbc = (JDBCExpression) condition;
  633.             List<Object> oggetti = new ArrayList<>();
  634.             jdbc.toSqlForPreparedStatement(sqlQueryObjectUpdate, oggetti);
  635.             if(!oggetti.isEmpty()) {
  636.                 for (Object object : oggetti) {
  637.                     lstObjectsUpdate.add(new JDBCObject(object, object.getClass()));
  638.                 }
  639.             }
  640.         }
  641.        
  642.         // execute
  643.         org.openspcoop2.generic_project.dao.jdbc.utils.JDBCPreparedStatementUtilities jdbcUtilities =
  644.                 new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCPreparedStatementUtilities(sqlQueryObject.getTipoDatabaseOpenSPCoop2(), log, connection);
  645.         int updateRow = jdbcUtilities.executeUpdate(sqlQueryObjectUpdate.createSQLUpdate(), jdbcProperties.isShowSql(),
  646.                 lstObjectsUpdate.toArray(new JDBCObject[]{}));
  647.         String msg = "UpdateField["+table+"]: "+updateRow +" rows";
  648.         log.debug(msg);
  649.     }
  650.    
  651.     @Override
  652.     public void updateFields(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, String id, UpdateModel ... updateModels) throws NotFoundException, NotImplementedException, ServiceException, Exception {
  653.        
  654.         GenericJDBCUtilities.updateFields(jdbcProperties, log, connection, sqlQueryObject,
  655.                 this.getTransazioneFieldConverter().toTable(Transazione.model()),
  656.                 this.getMapTableToPKColumnEngine(),
  657.                 this.getRootTablePrimaryKeyValuesEngine(jdbcProperties, log, connection, sqlQueryObject, id),
  658.                 this.getTransazioneFieldConverter(), this, updateModels);
  659.     }  
  660.    
  661.     @Override
  662.     public void updateFields(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, long tableId, UpdateField ... updateFields) throws NotFoundException, NotImplementedException, ServiceException, Exception {
  663.         throw new NotImplementedException("Table without long id column PK");
  664.     }
  665.    
  666.     @Override
  667.     public void updateFields(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, long tableId, IExpression condition, UpdateField ... updateFields) throws NotFoundException, NotImplementedException, ServiceException, Exception {
  668.         throw new NotImplementedException("Table without long id column PK");
  669.     }
  670.    
  671.     @Override
  672.     public void updateFields(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, long tableId, UpdateModel ... updateModels) throws NotFoundException, NotImplementedException, ServiceException, Exception {
  673.         throw new NotImplementedException("Table without long id column PK");
  674.     }
  675.    
  676.     @Override
  677.     public void updateOrCreate(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, String oldId, Transazione transazione, org.openspcoop2.generic_project.beans.IDMappingBehaviour idMappingResolutionBehaviour) throws NotImplementedException,ServiceException,Exception {
  678.    
  679.         if(this.exists(jdbcProperties, log, connection, sqlQueryObject, oldId)) {
  680.             this.update(jdbcProperties, log, connection, sqlQueryObject, oldId, transazione,idMappingResolutionBehaviour);
  681.         } else {
  682.             this.create(jdbcProperties, log, connection, sqlQueryObject, transazione,idMappingResolutionBehaviour);
  683.         }
  684.        
  685.     }
  686.    
  687.     @Override
  688.     public void updateOrCreate(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, long tableId, Transazione transazione, org.openspcoop2.generic_project.beans.IDMappingBehaviour idMappingResolutionBehaviour) throws NotImplementedException,ServiceException,Exception {
  689.         throw new NotImplementedException("Table without long id column PK");
  690.     }
  691.    
  692.     @Override
  693.     public void delete(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, Transazione transazione) throws NotImplementedException,ServiceException,Exception {
  694.        
  695.        
  696.         String idObject = transazione.getIdTransazione();
  697.         if(idObject==null){
  698.             throw new ServiceException("IdTransazione non presente nell'oggetto");
  699.         }
  700.        
  701.         this.deleteEngine(jdbcProperties, log, connection, sqlQueryObject, idObject);
  702.        
  703.     }

  704.     private void deleteEngine(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, Object id) throws NotImplementedException,ServiceException,Exception {
  705.        
  706.         org.openspcoop2.generic_project.dao.jdbc.utils.JDBCPreparedStatementUtilities jdbcUtilities =
  707.                 new org.openspcoop2.generic_project.dao.jdbc.utils.JDBCPreparedStatementUtilities(sqlQueryObject.getTipoDatabaseOpenSPCoop2(), log, connection);
  708.        
  709.         ISQLQueryObject sqlQueryObjectDelete = sqlQueryObject.newSQLQueryObject();
  710.        
  711.         // Object transazione
  712.         sqlQueryObjectDelete.setANDLogicOperator(true);
  713.         sqlQueryObjectDelete.addDeleteTable(this.getTransazioneFieldConverter().toTable(Transazione.model()));
  714.         sqlQueryObjectDelete.addWhereCondition(this.getTransazioneFieldConverter().toColumn(Transazione.model().ID_TRANSAZIONE,false)+"=?");

  715.         // Delete transazione
  716.         jdbcUtilities.execute(sqlQueryObjectDelete.createSQLDelete(), jdbcProperties.isShowSql(),
  717.             new JDBCObject(id,id.getClass()));

  718.     }

  719.     @Override
  720.     public void deleteById(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, String idTransazione) throws NotImplementedException,ServiceException,Exception {

  721.         Object id = null;
  722.         try{
  723.             id = this.findIdTransazione(jdbcProperties, log, connection, sqlQueryObject, idTransazione, true, true);
  724.         }catch(NotFoundException notFound){
  725.             return;
  726.         }          
  727.         this.deleteEngine(jdbcProperties, log, connection, sqlQueryObject, id);
  728.        
  729.     }
  730.    
  731.     @Override
  732.     public NonNegativeNumber deleteAll(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject) throws NotImplementedException,ServiceException,Exception {
  733.        
  734.         return this.deleteAll(jdbcProperties, log, connection, sqlQueryObject, new JDBCExpression(this.getTransazioneFieldConverter()));

  735.     }

  736.     @Override
  737.     public NonNegativeNumber deleteAll(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, JDBCExpression expression) throws NotImplementedException, ServiceException,Exception {

  738.         java.util.List<Object> lst = this._findAllObjectIds(jdbcProperties, log, connection, sqlQueryObject, new JDBCPaginatedExpression(expression));
  739.        
  740.         for(Object id : lst) {
  741.             this.deleteEngine(jdbcProperties, log, connection, sqlQueryObject, id);
  742.         }
  743.        
  744.         return new NonNegativeNumber(lst.size());
  745.    
  746.     }



  747.     // -- DB
  748.    
  749.     @Override
  750.     public void deleteById(JDBCServiceManagerProperties jdbcProperties, Logger log, Connection connection, ISQLQueryObject sqlQueryObject, long tableId) throws ServiceException, NotImplementedException, Exception {
  751.         throw new NotImplementedException("Table without long id column PK");
  752.     }
  753.    
  754.     @Override
  755.     public int nativeUpdate(JDBCServiceManagerProperties jdbcProperties, Logger log,Connection connection,ISQLQueryObject sqlObject, String sql,Object ... param) throws ServiceException,NotImplementedException, Exception {
  756.    
  757.         return org.openspcoop2.generic_project.dao.jdbc.utils.GenericJDBCUtilities.nativeUpdate(jdbcProperties, log, connection, sqlObject,
  758.                                                                                             sql,param);
  759.    
  760.     }
  761. }