First Commit - Source Code from Reply
This commit is contained in:
8
dbcmnpsrc/FE/mnpdev/dbcgo/dbcgom/.mymetadata
Normal file
8
dbcmnpsrc/FE/mnpdev/dbcgo/dbcgom/.mymetadata
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-module
|
||||
type="EJB"
|
||||
name="dbcgom"
|
||||
id="myeclipse.1234264065187"
|
||||
j2ee-spec="1.4"
|
||||
archive="dbcgom.jar" />
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
@@ -0,0 +1,8 @@
|
||||
#Tue Feb 10 12:08:34 CET 2009
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
fullBuildGoals=process-test-resources
|
||||
includeModules=false
|
||||
resolveWorkspaceProjects=true
|
||||
resourceFilterGoals=process-resources resources\:testResources
|
||||
version=1
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 19-giu-2012 18.05.00 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoAnagDisservizi" table="DBCGO_ANAG_DISSERVIZI">
|
||||
<composite-id name="id" class="it.valueteam.dbcgo.hb.dto.DbcgoAnagDisserviziId">
|
||||
<key-property name="tipologiaPenale" type="string">
|
||||
<column name="TIPOLOGIA_PENALE" length="3" />
|
||||
</key-property>
|
||||
<key-property name="sla" type="string">
|
||||
<column name="SLA" length="10" />
|
||||
</key-property>
|
||||
<key-property name="dataInizio" type="date">
|
||||
<column name="DATA_INIZIO" length="7" />
|
||||
</key-property>
|
||||
<key-property name="dataFine" type="date">
|
||||
<column name="DATA_FINE" length="7" />
|
||||
</key-property>
|
||||
<key-property name="operatore" type="string">
|
||||
<column name="OPERATORE" length="4" />
|
||||
</key-property>
|
||||
</composite-id>
|
||||
<property name="dataComunicazione" type="date">
|
||||
<column name="DATA_COMUNICAZIONE" length="7" />
|
||||
</property>
|
||||
<property name="causaleStorno" type="string">
|
||||
<column name="CAUSALE_STORNO" length="50" />
|
||||
</property>
|
||||
<property name="dataCausaleStorno" type="date">
|
||||
<column name="DATA_CAUSALE_STORNO" length="7" />
|
||||
</property>
|
||||
<property name="disabilitaDisservizio" type="java.lang.Character">
|
||||
<column name="DISABILITA_DISSERVIZIO" length="1" />
|
||||
</property>
|
||||
<property name="note" type="string">
|
||||
<column name="NOTE" length="1000" />
|
||||
</property>
|
||||
<property name="matricolaUser" type="string">
|
||||
<column name="MATRICOLA_USER" length="30" />
|
||||
</property>
|
||||
<property name="tipoProcesso" type="java.lang.Character">
|
||||
<column name="TIPO_PROCESSO" length="1" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 22-giu-2012 11.29.05 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoAnagFranchigie" table="DBCGO_ANAG_FRANCHIGIE">
|
||||
<id name="numeroRiga" type="java.lang.Long">
|
||||
<column name="NUMERO_RIGA" precision="10" scale="0" />
|
||||
<generator class="increment"></generator>
|
||||
</id>
|
||||
<property name="donatingOspitato" type="string">
|
||||
<column name="DONATING_OSPITATO" length="4" />
|
||||
</property>
|
||||
<property name="donatingRete" type="string">
|
||||
<column name="DONATING_RETE" length="4" />
|
||||
</property>
|
||||
<property name="recipientOspitato" type="string">
|
||||
<column name="RECIPIENT_OSPITATO" length="4" />
|
||||
</property>
|
||||
<property name="recipientRete" type="string">
|
||||
<column name="RECIPIENT_RETE" length="4" />
|
||||
</property>
|
||||
<property name="dataEvento" type="date">
|
||||
<column name="DATA_EVENTO" length="7" />
|
||||
</property>
|
||||
<property name="tipoEvento" type="string">
|
||||
<column name="TIPO_EVENTO" length="4" />
|
||||
</property>
|
||||
<property name="eventiAttesi" type="java.lang.Long">
|
||||
<column name="EVENTI_ATTESI" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="eventiSla" type="java.lang.Long">
|
||||
<column name="EVENTI_SLA" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="eventiFuoriSla" type="java.lang.Long">
|
||||
<column name="EVENTI_FUORI_SLA" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="percentualeFranchigia" type="java.lang.Long">
|
||||
<column name="PERCENTUALE_FRANCHIGIA" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="superamentoSoglia" type="string">
|
||||
<column name="SUPERAMENTO_SOGLIA" length="1" />
|
||||
</property>
|
||||
<property name="tipoProcesso" type="string">
|
||||
<column name="TIPO_PROCESSO" length="1" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 4-giu-2012 11.19.27 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoAnagraficaOperatori" table="DBCGO_ANAGRAFICA_OPERATORI">
|
||||
<composite-id name="id" class="it.valueteam.dbcgo.hb.dto.DbcgoAnagraficaOperatoriId">
|
||||
<key-property name="idOperatore" type="string">
|
||||
<column name="ID_OPERATORE" length="4" />
|
||||
</key-property>
|
||||
<key-property name="tipoOperatore" type="string">
|
||||
<column name="TIPO_OPERATORE" length="10" />
|
||||
</key-property>
|
||||
<key-property name="gestoreAom" type="string">
|
||||
<column name="GESTORE_AOM" length="4" />
|
||||
</key-property>
|
||||
<key-property name="idAmministrativo" type="string">
|
||||
<column name="ID_AMMINISTRATIVO" length="4" />
|
||||
</key-property>
|
||||
<key-property name="inizialeIdAmm" type="string">
|
||||
<column name="INIZIALE_ID_AMM" length="1" />
|
||||
</key-property>
|
||||
<key-property name="descrizione" type="string">
|
||||
<column name="DESCRIZIONE" length="50" />
|
||||
</key-property>
|
||||
</composite-id>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 13-nov-2012 14.37.40 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoDonorPp" table="DBCGO_DONOR_PP">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="timestamp">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="2" scale="0" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecEff" type="string">
|
||||
<column name="CODICE_OPERATORE_REC_EFF" length="4" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonEff" type="string">
|
||||
<column name="CODICE_OPERATORE_DON_EFF" length="4" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 6-giu-2012 12.14.47 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoFilePenali" table="DBCGO_FILE_PENALI">
|
||||
<composite-id name="id" class="it.valueteam.dbcgo.hb.dto.DbcgoFilePenaliId">
|
||||
<key-property name="versione" type="java.lang.Long">
|
||||
<column name="VERSIONE" precision="22" scale="0" />
|
||||
</key-property>
|
||||
<key-property name="tipoFile" type="string">
|
||||
<column name="TIPO_FILE" length="3" />
|
||||
</key-property>
|
||||
<key-property name="idProcesso" type="java.lang.Long">
|
||||
<column name="ID_PROCESSO" precision="22" scale="0" />
|
||||
</key-property>
|
||||
</composite-id>
|
||||
<property name="fileBlob" type="blob">
|
||||
<column name="FILE_BLOB" />
|
||||
</property>
|
||||
<property name="isConsolidato" type="string">
|
||||
<column name="IS_CONSOLIDATO" length="1" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 12-ago-2009 15.09.08 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestRicDonVirtTc" table="DBCGO_GEST_RIC_DON_VIRT_TC">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="dataNotificaCredito" type="date">
|
||||
<column name="DATA_NOTIFICA_CREDITO" length="7" />
|
||||
</property>
|
||||
<property name="oraNotificaCredito" type="string">
|
||||
<column name="ORA_NOTIFICA_CREDITO" length="5" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="2" scale="0" />
|
||||
</property>
|
||||
<property name="importo" type="float">
|
||||
<column name="IMPORTO" precision="7" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" />
|
||||
</property>
|
||||
<property name="dataOraModifica" type="timestamp">
|
||||
<column name="DATA_ORA_MODIFICA" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 31-mar-2011 10.15.27 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestRicDonVirtView" table="DBCGO_GEST_RIC_DON_VIRT_VIEW">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="5" scale="0" />
|
||||
</property>
|
||||
<property name="tipoCliente" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2" />
|
||||
</property>
|
||||
<property name="dataCutOverCalc" type="date">
|
||||
<column name="DATA_CUT_OVER_CALC" length="7" />
|
||||
</property>
|
||||
<property name="dataValidazioneMax" type="date">
|
||||
<column name="DATA_VALIDAZIONE_MAX" length="7" />
|
||||
</property>
|
||||
<property name="dataricezionerichiesta" type="date">
|
||||
<column name="DATARICEZIONERICHIESTA" length="7" />
|
||||
</property>
|
||||
<property name="dataCutOver" type="date">
|
||||
<column name="DATA_CUT_OVER" length="7" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceFiscalePartitaIva" type="string">
|
||||
<column name="CODICE_FISCALE_PARTITA_IVA" length="16" />
|
||||
</property>
|
||||
<property name="codicePrePostPagato" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO" length="3" />
|
||||
</property>
|
||||
<property name="nomeCliente" type="string">
|
||||
<column name="NOME_CLIENTE" length="30" />
|
||||
</property>
|
||||
<property name="cognomeCliente" type="string">
|
||||
<column name="COGNOME_CLIENTE" length="50" />
|
||||
</property>
|
||||
<property name="ragioneSociale" type="string">
|
||||
<column name="RAGIONE_SOCIALE" length="80" />
|
||||
</property>
|
||||
<property name="iccdSerialNumber" type="string">
|
||||
<column name="ICCD_SERIAL_NUMBER" length="30" />
|
||||
</property>
|
||||
<property name="nomeOt" type="string">
|
||||
<column name="NOME_OT" length="40" />
|
||||
</property>
|
||||
<property name="numeroDocumento" type="string">
|
||||
<column name="NUMERO_DOCUMENTO" length="30" />
|
||||
</property>
|
||||
<property name="tipoDocumento" type="string">
|
||||
<column name="TIPO_DOCUMENTO" length="3" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" />
|
||||
</property>
|
||||
<property name="sistemaMitt" type="string">
|
||||
<column name="SISTEMA_MITT" length="10" />
|
||||
</property>
|
||||
<property name="flagTc" type="string">
|
||||
<column name="FLAG_TC" length="1" />
|
||||
</property>
|
||||
<property name="flagEsp" type="string">
|
||||
<column name="FLAG_ESP" length="1" />
|
||||
</property>
|
||||
<property name="dataValidazioneEff" type="timestamp">
|
||||
<column name="DATA_VALIDAZIONE_EFF" length="7" />
|
||||
</property>
|
||||
<property name="codicerifiutovalidazione" type="string">
|
||||
<column name="CODICERIFIUTOVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="flagFurto" type="string">
|
||||
<column name="FLAG_FURTO" length="1" />
|
||||
</property>
|
||||
<property name="flaPrevalidazione" type="string">
|
||||
<column name="FLA_PREVALIDAZIONE" length="1" />
|
||||
</property>
|
||||
<property name="prevalidazione" type="string">
|
||||
<column name="PREVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="businessId" type="string">
|
||||
<column name="BUSINESS_ID" length="36" />
|
||||
</property>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="40" />
|
||||
</property>
|
||||
<property name="visDayNum" type="java.lang.Long">
|
||||
<column name="VIS_DAY_NUM" precision="4" scale="0" />
|
||||
</property>
|
||||
<property name="nomeOtDesc" type="string">
|
||||
<column name="NOME_OT_DESC" length="200" />
|
||||
</property>
|
||||
<property name="nomeOtOrderBy" type="java.lang.Long">
|
||||
<column name="NOME_OT_ORDER_BY" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="tipoClienteDesc" type="string">
|
||||
<column name="TIPO_CLIENTE_DESC" length="200" />
|
||||
</property>
|
||||
<property name="codicePrePostPagatoDesc" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO_DESC" length="200" />
|
||||
</property>
|
||||
<property name="sistemaMittenteDesc" type="string">
|
||||
<column name="SISTEMA_MITTENTE_DESC" length="200" />
|
||||
</property>
|
||||
<property name="tcStato" type="string">
|
||||
<column name="TC_STATO" length="16" />
|
||||
</property>
|
||||
<property name="importo" type="java.lang.Double">
|
||||
<column name="IMPORTO" precision="7" />
|
||||
</property>
|
||||
<property name="codProfiloTariffario" type="string">
|
||||
<column name="COD_PROFILO_TARIFFARIO" length="10" />
|
||||
</property>
|
||||
<property name="codProfiloTariffarioDesc" type="string">
|
||||
<column name="COD_PROFILO_TARIFFARIO_DESC" length="1" />
|
||||
</property>
|
||||
<property name="trasferimentoConSblocco" type="string">
|
||||
<column name="TRASFERIMENTO_CON_SBLOCCO" length="3" />
|
||||
</property>
|
||||
<property name="nomeFileSblocco" type="string">
|
||||
<column name="NOME_FILE_SBLOCCO" length="4000" />
|
||||
</property>
|
||||
<property name="flagProgettoAdhoc" type="string">
|
||||
<column name="FLAG_PROGETTO_ADHOC" length="1" />
|
||||
</property>
|
||||
<property name="dataPresaInCarico" type="date">
|
||||
<column name="DATA_PRESA_IN_CARICO" length="7" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 17-mar-2012 15.40.03 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestRicRecVirtTc" table="DBCGO_GEST_RIC_REC_VIRT_TC">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="dataNotificaCredito" type="date">
|
||||
<column name="DATA_NOTIFICA_CREDITO" length="7" />
|
||||
</property>
|
||||
<property name="oraNotificaCredito" type="string">
|
||||
<column name="ORA_NOTIFICA_CREDITO" length="5" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="2" scale="0" />
|
||||
</property>
|
||||
<property name="importo" type="float">
|
||||
<column name="IMPORTO" precision="7" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" />
|
||||
</property>
|
||||
<property name="dataOraModifica" type="timestamp">
|
||||
<column name="DATA_ORA_MODIFICA" />
|
||||
</property>
|
||||
<property name="flagVerificaCreditoAnomalo" type="java.lang.Long">
|
||||
<column name="FLAG_VERIFICA_CREDITO_ANOMALO" precision="22" scale="0" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,165 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 31-mar-2011 9.27.40 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestRicRecVirtView" table="DBCGO_GEST_RIC_REC_VIRT_VIEW">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="dataInserimento" type="date">
|
||||
<column name="DATA_INSERIMENTO" length="7" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="5" scale="0" />
|
||||
</property>
|
||||
<property name="tipoCliente" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2" />
|
||||
</property>
|
||||
<property name="dataCutOverCalc" type="date">
|
||||
<column name="DATA_CUT_OVER_CALC" length="7" />
|
||||
</property>
|
||||
<property name="dataValidazioneMax" type="date">
|
||||
<column name="DATA_VALIDAZIONE_MAX" length="7" />
|
||||
</property>
|
||||
<property name="dataricezionerichiesta" type="date">
|
||||
<column name="DATARICEZIONERICHIESTA" length="7" />
|
||||
</property>
|
||||
<property name="dataCutOver" type="date">
|
||||
<column name="DATA_CUT_OVER" length="7" />
|
||||
</property>
|
||||
<property name="codicerifiutovalidazione" type="string">
|
||||
<column name="CODICERIFIUTOVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceFiscalePartitaIva" type="string">
|
||||
<column name="CODICE_FISCALE_PARTITA_IVA" length="16" />
|
||||
</property>
|
||||
<property name="codicePrePostPagato" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO" length="3" />
|
||||
</property>
|
||||
<property name="nomeCliente" type="string">
|
||||
<column name="NOME_CLIENTE" length="30" />
|
||||
</property>
|
||||
<property name="cognomeCliente" type="string">
|
||||
<column name="COGNOME_CLIENTE" length="50" />
|
||||
</property>
|
||||
<property name="ragioneSociale" type="string">
|
||||
<column name="RAGIONE_SOCIALE" length="80" />
|
||||
</property>
|
||||
<property name="marcaggio" type="string">
|
||||
<column name="MARCAGGIO" length="40" />
|
||||
</property>
|
||||
<property name="sottomarcaggio" type="string">
|
||||
<column name="SOTTOMARCAGGIO" length="40" />
|
||||
</property>
|
||||
<property name="iccdSerialNumber" type="string">
|
||||
<column name="ICCD_SERIAL_NUMBER" length="30" />
|
||||
</property>
|
||||
<property name="numeroDocumento" type="string">
|
||||
<column name="NUMERO_DOCUMENTO" length="30" />
|
||||
</property>
|
||||
<property name="tipoDocumento" type="string">
|
||||
<column name="TIPO_DOCUMENTO" length="3" />
|
||||
</property>
|
||||
<property name="nomeOtGeo" type="string">
|
||||
<column name="NOME_OT_GEO" length="40" />
|
||||
</property>
|
||||
<property name="nomeOtLeg" type="string">
|
||||
<column name="NOME_OT_LEG" length="40" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" />
|
||||
</property>
|
||||
<property name="flagTc" type="string">
|
||||
<column name="FLAG_TC" length="1" />
|
||||
</property>
|
||||
<property name="prevalidazione" type="string">
|
||||
<column name="PREVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="dataValidazioneEff" type="timestamp">
|
||||
<column name="DATA_VALIDAZIONE_EFF" length="7" />
|
||||
</property>
|
||||
<property name="businessIdRec" type="string">
|
||||
<column name="BUSINESS_ID_REC" length="36" />
|
||||
</property>
|
||||
<property name="flagEsp" type="string">
|
||||
<column name="FLAG_ESP" length="1" />
|
||||
</property>
|
||||
<property name="tcStato" type="string">
|
||||
<column name="TC_STATO" length="16" />
|
||||
</property>
|
||||
<property name="importo" type="java.lang.Double">
|
||||
<column name="IMPORTO" precision="7" />
|
||||
</property>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="40" />
|
||||
</property>
|
||||
<property name="visDayNum" type="java.lang.Long">
|
||||
<column name="VIS_DAY_NUM" precision="4" scale="0" />
|
||||
</property>
|
||||
<property name="tipoClienteDesc" type="string">
|
||||
<column name="TIPO_CLIENTE_DESC" length="200" />
|
||||
</property>
|
||||
<property name="codicePrePostPagatoDesc" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO_DESC" length="200" />
|
||||
</property>
|
||||
<property name="marcaggioDesc" type="string">
|
||||
<column name="MARCAGGIO_DESC" length="40" />
|
||||
</property>
|
||||
<property name="sottomarcaggioDesc" type="string">
|
||||
<column name="SOTTOMARCAGGIO_DESC" length="40" />
|
||||
</property>
|
||||
<property name="nomeOtGeoDesc" type="string">
|
||||
<column name="NOME_OT_GEO_DESC" length="200" />
|
||||
</property>
|
||||
<property name="nomeOtLegDesc" type="string">
|
||||
<column name="NOME_OT_LEG_DESC" length="200" />
|
||||
</property>
|
||||
<property name="nomeOtLegOrderBy" type="java.lang.Long">
|
||||
<column name="NOME_OT_LEG_ORDER_BY" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="flagFurto" type="string">
|
||||
<column name="FLAG_FURTO" length="1" />
|
||||
</property>
|
||||
<property name="flagPrevalidazione" type="string">
|
||||
<column name="FLAG_PREVALIDAZIONE" length="1" />
|
||||
</property>
|
||||
<property name="abbonatoPrepagato" type="string">
|
||||
<column name="ABBONATO_PREPAGATO" length="50" />
|
||||
</property>
|
||||
<property name="abbonatoPrepagatoDesc" type="string">
|
||||
<column name="ABBONATO_PREPAGATO_DESC" length="1" />
|
||||
</property>
|
||||
<property name="dataPresaInCarico" type="date">
|
||||
<column name="DATA_PRESA_IN_CARICO" length="7" />
|
||||
</property>
|
||||
<property name="flagProgettoAdhoc" type="string">
|
||||
<column name="FLAG_PROGETTO_ADHOC" length="200" />
|
||||
</property>
|
||||
<property name="trasferimentoConSblocco" type="string">
|
||||
<column name="TRASFERIMENTO_CON_SBLOCCO" length="3" />
|
||||
</property>
|
||||
<property name="nomeFileSblocco" type="string">
|
||||
<column name="NOME_FILE_SBLOCCO" length="4000" />
|
||||
</property>
|
||||
<property name="esitoCas" type="string">
|
||||
<column name="ESITO_CAS" length="4" />
|
||||
</property>
|
||||
<property name="descrizioneEsitoGisp" type="string">
|
||||
<column name="DESCRIZIONE_ESITO_GISP" length="48" />
|
||||
</property>
|
||||
<property name="dataAcquisizione" type="date">
|
||||
<column name="DATA_ACQUISIZIONE" length="7" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 17-mar-2012 15.40.03 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestRicRvM2mTc" table="DBCGO_GEST_RIC_RV_M2M_TC">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="dataNotificaCredito" type="date">
|
||||
<column name="DATA_NOTIFICA_CREDITO" length="7" />
|
||||
</property>
|
||||
<property name="oraNotificaCredito" type="string">
|
||||
<column name="ORA_NOTIFICA_CREDITO" length="5" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="2" scale="0" />
|
||||
</property>
|
||||
<property name="importo" type="float">
|
||||
<column name="IMPORTO" precision="7" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" />
|
||||
</property>
|
||||
<property name="dataOraModifica" type="timestamp">
|
||||
<column name="DATA_ORA_MODIFICA" />
|
||||
</property>
|
||||
<property name="flagVerificaCreditoAnomalo" type="java.lang.Long">
|
||||
<column name="FLAG_VERIFICA_CREDITO_ANOMALO" precision="22" scale="0" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 27-ott-2010 12.14.43 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestRicRvM2mView" table="DBCGO_GEST_RIC_RV_M2M_VIEW">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="dataInserimento" type="date">
|
||||
<column name="DATA_INSERIMENTO" length="7" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="2" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoCliente" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2" />
|
||||
</property>
|
||||
<property name="dataCutOverCalc" type="date">
|
||||
<column name="DATA_CUT_OVER_CALC" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataValidazioneMax" type="date">
|
||||
<column name="DATA_VALIDAZIONE_MAX" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataricezionerichiesta" type="date">
|
||||
<column name="DATARICEZIONERICHIESTA" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataCutOver" type="date">
|
||||
<column name="DATA_CUT_OVER" length="7" />
|
||||
</property>
|
||||
<property name="codicerifiutovalidazione" type="string">
|
||||
<column name="CODICERIFIUTOVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" not-null="true" />
|
||||
</property>
|
||||
<property name="codiceFiscalePartitaIva" type="string">
|
||||
<column name="CODICE_FISCALE_PARTITA_IVA" length="16" />
|
||||
</property>
|
||||
<property name="codicePrePostPagato" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO" length="3" />
|
||||
</property>
|
||||
<property name="nomeCliente" type="string">
|
||||
<column name="NOME_CLIENTE" length="30" />
|
||||
</property>
|
||||
<property name="cognomeCliente" type="string">
|
||||
<column name="COGNOME_CLIENTE" length="50" />
|
||||
</property>
|
||||
<property name="ragioneSociale" type="string">
|
||||
<column name="RAGIONE_SOCIALE" length="80" />
|
||||
</property>
|
||||
<property name="iccdSerialNumber" type="string">
|
||||
<column name="ICCD_SERIAL_NUMBER" length="30" />
|
||||
</property>
|
||||
<property name="numeroDocumento" type="string">
|
||||
<column name="NUMERO_DOCUMENTO" length="30" />
|
||||
</property>
|
||||
<property name="tipoDocumento" type="string">
|
||||
<column name="TIPO_DOCUMENTO" length="3" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="flagTc" type="string">
|
||||
<column name="FLAG_TC" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="prevalidazione" type="string">
|
||||
<column name="PREVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="dataValidazioneEff" type="timestamp">
|
||||
<column name="DATA_VALIDAZIONE_EFF" length="7" />
|
||||
</property>
|
||||
<property name="businessIdRec" type="string">
|
||||
<column name="BUSINESS_ID_REC" length="36" not-null="true" />
|
||||
</property>
|
||||
<property name="businessIdDon" type="string">
|
||||
<column name="BUSINESS_ID_DON" length="36" not-null="true" />
|
||||
</property>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="40" not-null="true" />
|
||||
</property>
|
||||
<property name="visDayNum" type="java.lang.Long">
|
||||
<column name="VIS_DAY_NUM" precision="4" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoClienteDesc" type="string">
|
||||
<column name="TIPO_CLIENTE_DESC" length="200" />
|
||||
</property>
|
||||
<property name="codicePrePostPagatoDesc" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO_DESC" length="200" />
|
||||
</property>
|
||||
<property name="tcStato" type="string">
|
||||
<column name="TC_STATO" length="16" />
|
||||
</property>
|
||||
<property name="importo" type="java.lang.Long">
|
||||
<column name="IMPORTO" precision="7" />
|
||||
</property>
|
||||
<property name="flagFurto" type="string">
|
||||
<column name="FLAG_FURTO" length="1" />
|
||||
</property>
|
||||
<property name="flagPrevalidazione" type="string">
|
||||
<column name="FLAG_PREVALIDAZIONE" length="1" />
|
||||
</property>
|
||||
<property name="trasferimentoConSblocco" type="string">
|
||||
<column name="TRASFERIMENTO_CON_SBLOCCO" length="3" />
|
||||
</property>
|
||||
<property name="nomeFileSblocco" type="string">
|
||||
<column name="NOME_FILE_SBLOCCO" length="27" />
|
||||
</property>
|
||||
<property name="flagProgettoAdhoc" type="string">
|
||||
<column name="FLAG_PROGETTO_ADHOC" length="1" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 17-mar-2012 15.39.59 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestRichDonVirt" table="DBCGO_GEST_RICH_DON_VIRT" optimistic-lock="version">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="dataOraModifica" type="timestamp">
|
||||
<column name="DATA_ORA_MODIFICA" not-null="true" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="2" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoCliente" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2" not-null="true" />
|
||||
</property>
|
||||
<property name="dataCutOverCalc" type="date">
|
||||
<column name="DATA_CUT_OVER_CALC" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataValidazioneMax" type="date">
|
||||
<column name="DATA_VALIDAZIONE_MAX" length="7" />
|
||||
</property>
|
||||
<property name="dataricezionerichiesta" type="date">
|
||||
<column name="DATARICEZIONERICHIESTA" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataCutOver" type="date">
|
||||
<column name="DATA_CUT_OVER" length="7" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" not-null="true" />
|
||||
</property>
|
||||
<property name="codiceFiscalePartitaIva" type="string">
|
||||
<column name="CODICE_FISCALE_PARTITA_IVA" length="16" />
|
||||
</property>
|
||||
<property name="codicePrePostPagato" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO" length="3" not-null="true" />
|
||||
</property>
|
||||
<property name="nomeCliente" type="string">
|
||||
<column name="NOME_CLIENTE" length="30" />
|
||||
</property>
|
||||
<property name="cognomeCliente" type="string">
|
||||
<column name="COGNOME_CLIENTE" length="50" />
|
||||
</property>
|
||||
<property name="ragioneSociale" type="string">
|
||||
<column name="RAGIONE_SOCIALE" length="80" />
|
||||
</property>
|
||||
<property name="iccdSerialNumber" type="string">
|
||||
<column name="ICCD_SERIAL_NUMBER" length="30" />
|
||||
</property>
|
||||
<property name="nomeOt" type="string">
|
||||
<column name="NOME_OT" length="5" />
|
||||
</property>
|
||||
<property name="numeroDocumento" type="string">
|
||||
<column name="NUMERO_DOCUMENTO" length="30" />
|
||||
</property>
|
||||
<property name="tipoDocumento" type="string">
|
||||
<column name="TIPO_DOCUMENTO" length="3" />
|
||||
</property>
|
||||
<property name="flagTc" type="string">
|
||||
<column name="FLAG_TC" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="codicerifiutovalidazione" type="string">
|
||||
<column name="CODICERIFIUTOVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="businessIdDon" type="string">
|
||||
<column name="BUSINESS_ID_DON" length="36" />
|
||||
</property>
|
||||
<property name="flagFurto" type="string">
|
||||
<column name="FLAG_FURTO" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="flagPrevalidazione" type="string">
|
||||
<column name="FLAG_PREVALIDAZIONE" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="prevalidazione" type="string">
|
||||
<column name="PREVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="flagEsp" type="java.lang.Long">
|
||||
<column name="FLAG_ESP" precision="1" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="dataValidazioneEff" type="timestamp">
|
||||
<column name="DATA_VALIDAZIONE_EFF" length="7" />
|
||||
</property>
|
||||
<property name="sistemaMitt" type="string">
|
||||
<column name="SISTEMA_MITT" length="10" />
|
||||
</property>
|
||||
<property name="codiceDealer" type="string">
|
||||
<column name="CODICE_DEALER" length="10" />
|
||||
</property>
|
||||
<property name="codProfiloTariffario" type="string">
|
||||
<column name="COD_PROFILO_TARIFFARIO" length="10" />
|
||||
</property>
|
||||
<property name="descProfiloTariffario" type="string">
|
||||
<column name="DESC_PROFILO_TARIFFARIO" length="50" />
|
||||
</property>
|
||||
<property name="dataPresaInCarico" type="date">
|
||||
<column name="DATA_PRESA_IN_CARICO" length="7" />
|
||||
</property>
|
||||
<property name="dataAcquisizione" type="date">
|
||||
<column name="DATA_ACQUISIZIONE" length="7" />
|
||||
</property>
|
||||
<property name="richiestaadhoc" type="java.lang.Long">
|
||||
<column name="RICHIESTAADHOC" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="dataCutOverEff" type="timestamp">
|
||||
<column name="DATA_CUT_OVER_EFF" length="7" />
|
||||
</property>
|
||||
<property name="codiceIstat" type="string">
|
||||
<column name="CODICE_ISTAT" length="4" />
|
||||
</property>
|
||||
<property name="codicePdv" type="string">
|
||||
<column name="CODICE_PDV" length="50" />
|
||||
</property>
|
||||
<property name="canale" type="string">
|
||||
<column name="CANALE" length="50" />
|
||||
</property>
|
||||
<property name="sottoCanale" type="string">
|
||||
<column name="SOTTO_CANALE" length="50" />
|
||||
</property>
|
||||
<property name="tipoAccountCim" type="string">
|
||||
<column name="TIPO_ACCOUNT_CIM" length="50" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 17-mar-2012 15.39.59 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestRichRecVirt" table="DBCGO_GEST_RICH_REC_VIRT" optimistic-lock="version">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="dataOraModifica" type="timestamp">
|
||||
<column name="DATA_ORA_MODIFICA" not-null="true" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="2" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoCliente" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2" />
|
||||
</property>
|
||||
<property name="dataCutOverCalc" type="date">
|
||||
<column name="DATA_CUT_OVER_CALC" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataValidazioneMax" type="date">
|
||||
<column name="DATA_VALIDAZIONE_MAX" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataricezionerichiesta" type="date">
|
||||
<column name="DATARICEZIONERICHIESTA" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataCutOver" type="date">
|
||||
<column name="DATA_CUT_OVER" length="7" />
|
||||
</property>
|
||||
<property name="codicerifiutovalidazione" type="string">
|
||||
<column name="CODICERIFIUTOVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" not-null="true" />
|
||||
</property>
|
||||
<property name="codiceFiscalePartitaIva" type="string">
|
||||
<column name="CODICE_FISCALE_PARTITA_IVA" length="16" />
|
||||
</property>
|
||||
<property name="codicePrePostPagato" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO" length="3" />
|
||||
</property>
|
||||
<property name="nomeCliente" type="string">
|
||||
<column name="NOME_CLIENTE" length="30" />
|
||||
</property>
|
||||
<property name="cognomeCliente" type="string">
|
||||
<column name="COGNOME_CLIENTE" length="50" />
|
||||
</property>
|
||||
<property name="ragioneSociale" type="string">
|
||||
<column name="RAGIONE_SOCIALE" length="80" />
|
||||
</property>
|
||||
<property name="marcaggio" type="string">
|
||||
<column name="MARCAGGIO" length="2" />
|
||||
</property>
|
||||
<property name="sottomarcaggio" type="string">
|
||||
<column name="SOTTOMARCAGGIO" length="2" />
|
||||
</property>
|
||||
<property name="iccdSerialNumber" type="string">
|
||||
<column name="ICCD_SERIAL_NUMBER" length="30" />
|
||||
</property>
|
||||
<property name="numeroDocumento" type="string">
|
||||
<column name="NUMERO_DOCUMENTO" length="30" />
|
||||
</property>
|
||||
<property name="tipoDocumento" type="string">
|
||||
<column name="TIPO_DOCUMENTO" length="3" />
|
||||
</property>
|
||||
<property name="nomeOtGeo" type="string">
|
||||
<column name="NOME_OT_GEO" length="5" />
|
||||
</property>
|
||||
<property name="nomeOtLeg" type="string">
|
||||
<column name="NOME_OT_LEG" length="5" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="flagTc" type="string">
|
||||
<column name="FLAG_TC" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="prevalidazione" type="string">
|
||||
<column name="PREVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="dataValidazioneEff" type="timestamp">
|
||||
<column name="DATA_VALIDAZIONE_EFF" length="7" />
|
||||
</property>
|
||||
<property name="businessIdRec" type="string">
|
||||
<column name="BUSINESS_ID_REC" length="36" />
|
||||
</property>
|
||||
<property name="flagEsp" type="java.lang.Long">
|
||||
<column name="FLAG_ESP" precision="1" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="flagFurto" type="string">
|
||||
<column name="FLAG_FURTO" length="1" />
|
||||
</property>
|
||||
<property name="flagPrevalidazione" type="string">
|
||||
<column name="FLAG_PREVALIDAZIONE" length="1" />
|
||||
</property>
|
||||
<property name="abbonatoPrepagato" type="string">
|
||||
<column name="ABBONATO_PREPAGATO" length="50" />
|
||||
</property>
|
||||
<property name="descrizioneEsitoGisp" type="string">
|
||||
<column name="DESCRIZIONE_ESITO_GISP" length="48" />
|
||||
</property>
|
||||
<property name="esitoCas" type="string">
|
||||
<column name="ESITO_CAS" length="4" />
|
||||
</property>
|
||||
<property name="dataPresaInCarico" type="date">
|
||||
<column name="DATA_PRESA_IN_CARICO" length="7" />
|
||||
</property>
|
||||
<property name="dataAcquisizione" type="date">
|
||||
<column name="DATA_ACQUISIZIONE" length="7" />
|
||||
</property>
|
||||
<property name="richiestaadhoc" type="java.lang.Long">
|
||||
<column name="RICHIESTAADHOC" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="dataCutOverEff" type="timestamp">
|
||||
<column name="DATA_CUT_OVER_EFF" length="7" />
|
||||
</property>
|
||||
<property name="codiceIstat" type="string">
|
||||
<column name="CODICE_ISTAT" length="4" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 17-mar-2012 15.39.59 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestRichRecVirtM2m" table="DBCGO_GEST_RICH_REC_VIRT_M2M" optimistic-lock="version">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="dataOraModifica" type="timestamp">
|
||||
<column name="DATA_ORA_MODIFICA" not-null="true" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="2" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoCliente" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2" />
|
||||
</property>
|
||||
<property name="dataCutOverCalc" type="date">
|
||||
<column name="DATA_CUT_OVER_CALC" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataValidazioneMax" type="date">
|
||||
<column name="DATA_VALIDAZIONE_MAX" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataricezionerichiesta" type="date">
|
||||
<column name="DATARICEZIONERICHIESTA" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataCutOver" type="date">
|
||||
<column name="DATA_CUT_OVER" length="7" />
|
||||
</property>
|
||||
<property name="codicerifiutovalidazione" type="string">
|
||||
<column name="CODICERIFIUTOVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" not-null="true" />
|
||||
</property>
|
||||
<property name="codiceFiscalePartitaIva" type="string">
|
||||
<column name="CODICE_FISCALE_PARTITA_IVA" length="16" />
|
||||
</property>
|
||||
<property name="codicePrePostPagato" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO" length="3" />
|
||||
</property>
|
||||
<property name="nomeCliente" type="string">
|
||||
<column name="NOME_CLIENTE" length="30" />
|
||||
</property>
|
||||
<property name="cognomeCliente" type="string">
|
||||
<column name="COGNOME_CLIENTE" length="50" />
|
||||
</property>
|
||||
<property name="ragioneSociale" type="string">
|
||||
<column name="RAGIONE_SOCIALE" length="80" />
|
||||
</property>
|
||||
<property name="iccdSerialNumber" type="string">
|
||||
<column name="ICCD_SERIAL_NUMBER" length="30" />
|
||||
</property>
|
||||
<property name="numeroDocumento" type="string">
|
||||
<column name="NUMERO_DOCUMENTO" length="30" />
|
||||
</property>
|
||||
<property name="tipoDocumento" type="string">
|
||||
<column name="TIPO_DOCUMENTO" length="3" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="flagTc" type="string">
|
||||
<column name="FLAG_TC" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="prevalidazione" type="string">
|
||||
<column name="PREVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="dataValidazioneEff" type="timestamp">
|
||||
<column name="DATA_VALIDAZIONE_EFF" length="7" />
|
||||
</property>
|
||||
<property name="businessIdRec" type="string">
|
||||
<column name="BUSINESS_ID_REC" length="36" not-null="true" />
|
||||
</property>
|
||||
<property name="businessIdDon" type="string">
|
||||
<column name="BUSINESS_ID_DON" length="36" not-null="true" />
|
||||
</property>
|
||||
<property name="flagFurto" type="string">
|
||||
<column name="FLAG_FURTO" length="1" />
|
||||
</property>
|
||||
<property name="flagPrevalidazione" type="string">
|
||||
<column name="FLAG_PREVALIDAZIONE" length="1" />
|
||||
</property>
|
||||
<property name="dataPresaInCarico" type="timestamp">
|
||||
<column name="DATA_PRESA_IN_CARICO" length="7" />
|
||||
</property>
|
||||
<property name="dataAcquisizione" type="timestamp">
|
||||
<column name="DATA_ACQUISIZIONE" length="7" />
|
||||
</property>
|
||||
<property name="marcaggio" type="string">
|
||||
<column name="MARCAGGIO" length="2" />
|
||||
</property>
|
||||
<property name="sottomarcaggio" type="string">
|
||||
<column name="SOTTOMARCAGGIO" length="2" />
|
||||
</property>
|
||||
<property name="nomeOt" type="string">
|
||||
<column name="NOME_OT" length="5" />
|
||||
</property>
|
||||
<property name="flagEsp" type="java.lang.Long">
|
||||
<column name="FLAG_ESP" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="abbonatoPrepagato" type="string">
|
||||
<column name="ABBONATO_PREPAGATO" length="50" />
|
||||
</property>
|
||||
<property name="richiestaadhoc" type="java.lang.Long">
|
||||
<column name="RICHIESTAADHOC" precision="22" scale="0" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,226 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 13-mag-2013 16.38.04 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestioneRicV00" table="DBCGO_GESTIONE_RIC_V00">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<timestamp name="timestamp" column="TIMESTAMP" />
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="5" scale="0" />
|
||||
</property>
|
||||
<property name="statoRichiesta" type="java.lang.Long">
|
||||
<column name="STATO_RICHIESTA" precision="2" scale="0" />
|
||||
</property>
|
||||
<property name="tipoCliente" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2" />
|
||||
</property>
|
||||
<property name="dataCutOverCalc" type="date">
|
||||
<column name="DATA_CUT_OVER_CALC" length="7" />
|
||||
</property>
|
||||
<property name="dataValidazioneMax" type="date">
|
||||
<column name="DATA_VALIDAZIONE_MAX" length="7" />
|
||||
</property>
|
||||
<property name="dataricezionerichiesta" type="date">
|
||||
<column name="DATARICEZIONERICHIESTA" length="7" />
|
||||
</property>
|
||||
<property name="dataCutOver" type="date">
|
||||
<column name="DATA_CUT_OVER" length="7" />
|
||||
</property>
|
||||
<property name="codicerifiutovalidazione" type="string">
|
||||
<column name="CODICERIFIUTOVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceFiscalePartitaIva" type="string">
|
||||
<column name="CODICE_FISCALE_PARTITA_IVA" length="16" />
|
||||
</property>
|
||||
<property name="codicePrePostPagato" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO" length="3" />
|
||||
</property>
|
||||
<property name="nomeCliente" type="string">
|
||||
<column name="NOME_CLIENTE" length="30" />
|
||||
</property>
|
||||
<property name="cognomeCliente" type="string">
|
||||
<column name="COGNOME_CLIENTE" length="50" />
|
||||
</property>
|
||||
<property name="ragioneSociale" type="string">
|
||||
<column name="RAGIONE_SOCIALE" length="80" />
|
||||
</property>
|
||||
<property name="richiestaadhocaom" type="string">
|
||||
<column name="RICHIESTAADHOCAOM" length="1" />
|
||||
</property>
|
||||
<property name="richiestaadhoc" type="java.lang.Long">
|
||||
<column name="RICHIESTAADHOC" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="marcaggio" type="string">
|
||||
<column name="MARCAGGIO" length="2" />
|
||||
</property>
|
||||
<property name="sottomarcaggio" type="string">
|
||||
<column name="SOTTOMARCAGGIO" length="2" />
|
||||
</property>
|
||||
<property name="idPriorita" type="java.lang.Long">
|
||||
<column name="ID_PRIORITA" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="insertDate" type="date">
|
||||
<column name="INSERT_DATE" length="7" />
|
||||
</property>
|
||||
<property name="updateDate" type="timestamp">
|
||||
<column name="UPDATE_DATE" />
|
||||
</property>
|
||||
<property name="codiceGruppo" type="string">
|
||||
<column name="CODICE_GRUPPO" length="12" />
|
||||
</property>
|
||||
<property name="iccdSerialNumber" type="string">
|
||||
<column name="ICCD_SERIAL_NUMBER" length="30" />
|
||||
</property>
|
||||
<property name="imsi" type="string">
|
||||
<column name="IMSI" length="15" />
|
||||
</property>
|
||||
<property name="ipotesiRifiuto" type="java.lang.Long" generated="insert">
|
||||
<column name="IPOTESI_RIFIUTO" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="numeroDocumento" type="string">
|
||||
<column name="NUMERO_DOCUMENTO" length="30" />
|
||||
</property>
|
||||
<property name="tipoDocumento" type="string">
|
||||
<column name="TIPO_DOCUMENTO" length="3" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" />
|
||||
</property>
|
||||
<property name="nomeOtGeo" type="string">
|
||||
<column name="NOME_OT_GEO" length="40" />
|
||||
</property>
|
||||
<property name="nomeOtLeg" type="string">
|
||||
<column name="NOME_OT_LEG" length="40" />
|
||||
</property>
|
||||
<property name="idPrioritaMnp" type="java.lang.Long">
|
||||
<column name="ID_PRIORITA_MNP" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="dataTransizioneStatoGrp" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO_GRP" length="7" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" />
|
||||
</property>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="40" />
|
||||
</property>
|
||||
<property name="visDayNum" type="java.lang.Long">
|
||||
<column name="VIS_DAY_NUM" precision="4" scale="0" />
|
||||
</property>
|
||||
<property name="idStatoGrp" type="java.lang.Long">
|
||||
<column name="ID_STATO_GRP" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="priorityType" type="java.lang.Long">
|
||||
<column name="PRIORITY_TYPE" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="priorita" type="string">
|
||||
<column name="PRIORITA" length="40" />
|
||||
</property>
|
||||
<property name="prioritaMnp" type="string">
|
||||
<column name="PRIORITA_MNP" length="40" />
|
||||
</property>
|
||||
<property name="marcaggioDesc" type="string">
|
||||
<column name="MARCAGGIO_DESC" length="40" />
|
||||
</property>
|
||||
<property name="sottomarcaggioDesc" type="string">
|
||||
<column name="SOTTOMARCAGGIO_DESC" length="40" />
|
||||
</property>
|
||||
<property name="nomeOtGeoDesc" type="string">
|
||||
<column name="NOME_OT_GEO_DESC" length="200" />
|
||||
</property>
|
||||
<property name="nomeOtLegDesc" type="string">
|
||||
<column name="NOME_OT_LEG_DESC" length="200" />
|
||||
</property>
|
||||
<property name="nomeOtLegOrderBy" type="java.lang.Long">
|
||||
<column name="NOME_OT_LEG_ORDER_BY" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="tipoClienteDesc" type="string">
|
||||
<column name="TIPO_CLIENTE_DESC" length="200" />
|
||||
</property>
|
||||
<property name="codicePrePostPagatoDesc" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO_DESC" length="200" />
|
||||
</property>
|
||||
<property name="ppNum" type="java.lang.Long">
|
||||
<column name="PP_NUM" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="operatoreVirtuale" type="string">
|
||||
<column name="OPERATORE_VIRTUALE" length="4" />
|
||||
</property>
|
||||
<property name="statoLinea" type="string">
|
||||
<column name="STATO_LINEA" length="25" />
|
||||
</property>
|
||||
<property name="flagTc" type="string">
|
||||
<column name="FLAG_TC" length="1" />
|
||||
</property>
|
||||
<property name="dataPresaInCarico" type="date">
|
||||
<column name="DATA_PRESA_IN_CARICO" length="7" />
|
||||
</property>
|
||||
<property name="nomeFileAom" type="string">
|
||||
<column name="NOME_FILE_AOM" length="4000" />
|
||||
</property>
|
||||
<property name="importo" type="java.lang.Long">
|
||||
<column name="IMPORTO" precision="7" />
|
||||
</property>
|
||||
<property name="tcStato" type="string">
|
||||
<column name="TC_STATO" length="16" />
|
||||
</property>
|
||||
<property name="tcStatoId" type="java.lang.Long">
|
||||
<column name="TC_STATO_ID" precision="2" scale="0" />
|
||||
</property>
|
||||
<property name="codiceOperatoreVDonor" type="string">
|
||||
<column name="CODICE_OPERATORE_V_DONOR" length="4" />
|
||||
</property>
|
||||
<property name="codiceOperatoreVRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_V_RECIPIENT" length="4" />
|
||||
</property>
|
||||
<property name="prevalidazione" type="string">
|
||||
<column name="PREVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="flagFurto" type="string">
|
||||
<column name="FLAG_FURTO" length="1" />
|
||||
</property>
|
||||
<property name="flagPrevalidazione" type="string">
|
||||
<column name="FLAG_PREVALIDAZIONE" length="1" />
|
||||
</property>
|
||||
<property name="abbonatoPrepagato" type="string">
|
||||
<column name="ABBONATO_PREPAGATO" length="50" />
|
||||
</property>
|
||||
<property name="flagProgettoAdhoc" type="string">
|
||||
<column name="FLAG_PROGETTO_ADHOC" length="1" />
|
||||
</property>
|
||||
<property name="idBusiness" type="string">
|
||||
<column name="ID_BUSINESS" length="36" />
|
||||
</property>
|
||||
<property name="trasferimentoConSblocco" type="string">
|
||||
<column name="TRASFERIMENTO_CON_SBLOCCO" length="3" />
|
||||
</property>
|
||||
<property name="nomeFileSblocco" type="string">
|
||||
<column name="NOME_FILE_SBLOCCO" length="4000" />
|
||||
</property>
|
||||
<property name="dataCessazioneEffettiva" type="date">
|
||||
<column name="DATA_CESSAZIONE_EFFETTIVA" length="7" />
|
||||
</property>
|
||||
<property name="esitoCas" type="string">
|
||||
<column name="ESITO_CAS" length="4" />
|
||||
</property>
|
||||
<property name="descrizioneEsitoGisp" type="string">
|
||||
<column name="DESCRIZIONE_ESITO_GISP" length="48" />
|
||||
</property>
|
||||
<property name="dataValidazioneEffettiva" type="date">
|
||||
<column name="DATA_VALIDAZIONE_EFFETTIVA" length="7" />
|
||||
</property>
|
||||
<property name="dataAggiornamentoDco" type="timestamp">
|
||||
<column name="DATA_AGGIORNAMENTO_DCO" length="7" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,229 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 13-mag-2013 16.38.04 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoGestioneRicV01" table="DBCGO_GESTIONE_RIC_V01">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<timestamp name="timestamp" column="TIMESTAMP" />
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="5" scale="0" />
|
||||
</property>
|
||||
<property name="statoRichiesta" type="java.lang.Long">
|
||||
<column name="STATO_RICHIESTA" precision="2" scale="0" />
|
||||
</property>
|
||||
<property name="tipoCliente" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2" />
|
||||
</property>
|
||||
<property name="dataCutOverCalc" type="date">
|
||||
<column name="DATA_CUT_OVER_CALC" length="7" />
|
||||
</property>
|
||||
<property name="dataValidazioneMax" type="date">
|
||||
<column name="DATA_VALIDAZIONE_MAX" length="7" />
|
||||
</property>
|
||||
<property name="dataricezionerichiesta" type="date">
|
||||
<column name="DATARICEZIONERICHIESTA" length="7" />
|
||||
</property>
|
||||
<property name="dataCutOver" type="date">
|
||||
<column name="DATA_CUT_OVER" length="7" />
|
||||
</property>
|
||||
<property name="codicerifiutovalidazione" type="string">
|
||||
<column name="CODICERIFIUTOVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceFiscalePartitaIva" type="string">
|
||||
<column name="CODICE_FISCALE_PARTITA_IVA" length="16" />
|
||||
</property>
|
||||
<property name="codicePrePostPagato" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO" length="3" />
|
||||
</property>
|
||||
<property name="nomeCliente" type="string">
|
||||
<column name="NOME_CLIENTE" length="30" />
|
||||
</property>
|
||||
<property name="cognomeCliente" type="string">
|
||||
<column name="COGNOME_CLIENTE" length="50" />
|
||||
</property>
|
||||
<property name="ragioneSociale" type="string">
|
||||
<column name="RAGIONE_SOCIALE" length="80" />
|
||||
</property>
|
||||
<property name="richiestaadhocaom" type="string">
|
||||
<column name="RICHIESTAADHOCAOM" length="1" />
|
||||
</property>
|
||||
<property name="richiestaadhoc" type="java.lang.Long">
|
||||
<column name="RICHIESTAADHOC" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="marcaggio" type="string">
|
||||
<column name="MARCAGGIO" length="2" />
|
||||
</property>
|
||||
<property name="sottomarcaggio" type="string">
|
||||
<column name="SOTTOMARCAGGIO" length="2" />
|
||||
</property>
|
||||
<property name="idPriorita" type="java.lang.Long">
|
||||
<column name="ID_PRIORITA" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="insertDate" type="date">
|
||||
<column name="INSERT_DATE" length="7" />
|
||||
</property>
|
||||
<property name="updateDate" type="timestamp">
|
||||
<column name="UPDATE_DATE" />
|
||||
</property>
|
||||
<property name="codiceGruppo" type="string">
|
||||
<column name="CODICE_GRUPPO" length="12" />
|
||||
</property>
|
||||
<property name="iccdSerialNumber" type="string">
|
||||
<column name="ICCD_SERIAL_NUMBER" length="30" />
|
||||
</property>
|
||||
<property name="imsi" type="string">
|
||||
<column name="IMSI" length="15" />
|
||||
</property>
|
||||
<property name="ipotesiRifiuto" type="java.lang.Long" generated="insert">
|
||||
<column name="IPOTESI_RIFIUTO" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="numeroDocumento" type="string">
|
||||
<column name="NUMERO_DOCUMENTO" length="30" />
|
||||
</property>
|
||||
<property name="tipoDocumento" type="string">
|
||||
<column name="TIPO_DOCUMENTO" length="3" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" />
|
||||
</property>
|
||||
<property name="nomeOtGeo" type="string">
|
||||
<column name="NOME_OT_GEO" length="40" />
|
||||
</property>
|
||||
<property name="nomeOtLeg" type="string">
|
||||
<column name="NOME_OT_LEG" length="40" />
|
||||
</property>
|
||||
<property name="idPrioritaMnp" type="java.lang.Long">
|
||||
<column name="ID_PRIORITA_MNP" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="dataTransizioneStatoGrp" type="date">
|
||||
<column name="DATA_TRANSIZIONE_STATO_GRP" length="7" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" />
|
||||
</property>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="40" />
|
||||
</property>
|
||||
<property name="visDayNum" type="java.lang.Long">
|
||||
<column name="VIS_DAY_NUM" precision="4" scale="0" />
|
||||
</property>
|
||||
<property name="idStatoGrp" type="java.lang.Long">
|
||||
<column name="ID_STATO_GRP" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="priorityType" type="java.lang.Long">
|
||||
<column name="PRIORITY_TYPE" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="priorita" type="string">
|
||||
<column name="PRIORITA" length="40" />
|
||||
</property>
|
||||
<property name="prioritaMnp" type="string">
|
||||
<column name="PRIORITA_MNP" length="40" />
|
||||
</property>
|
||||
<property name="marcaggioDesc" type="string">
|
||||
<column name="MARCAGGIO_DESC" length="40" />
|
||||
</property>
|
||||
<property name="sottomarcaggioDesc" type="string">
|
||||
<column name="SOTTOMARCAGGIO_DESC" length="40" />
|
||||
</property>
|
||||
<property name="nomeOtGeoDesc" type="string">
|
||||
<column name="NOME_OT_GEO_DESC" length="200" />
|
||||
</property>
|
||||
<property name="nomeOtLegDesc" type="string">
|
||||
<column name="NOME_OT_LEG_DESC" length="200" />
|
||||
</property>
|
||||
<property name="nomeOtLegOrderBy" type="java.lang.Long">
|
||||
<column name="NOME_OT_LEG_ORDER_BY" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="tipoClienteDesc" type="string">
|
||||
<column name="TIPO_CLIENTE_DESC" length="200" />
|
||||
</property>
|
||||
<property name="codicePrePostPagatoDesc" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO_DESC" length="200" />
|
||||
</property>
|
||||
<property name="ppNum" type="java.lang.Long">
|
||||
<column name="PP_NUM" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="operatoreVirtuale" type="string">
|
||||
<column name="OPERATORE_VIRTUALE" length="4" />
|
||||
</property>
|
||||
<property name="statoLinea" type="string">
|
||||
<column name="STATO_LINEA" length="25" />
|
||||
</property>
|
||||
<property name="flagTc" type="string">
|
||||
<column name="FLAG_TC" length="1" />
|
||||
</property>
|
||||
<property name="dataPresaInCarico" type="date">
|
||||
<column name="DATA_PRESA_IN_CARICO" length="7" />
|
||||
</property>
|
||||
<property name="nomeFileAom" type="string">
|
||||
<column name="NOME_FILE_AOM" length="4000" />
|
||||
</property>
|
||||
<property name="importo" type="java.lang.Long">
|
||||
<column name="IMPORTO" precision="7" />
|
||||
</property>
|
||||
<property name="tcStato" type="string">
|
||||
<column name="TC_STATO" length="16" />
|
||||
</property>
|
||||
<property name="tcStatoId" type="java.lang.Long">
|
||||
<column name="TC_STATO_ID" precision="2" scale="0" />
|
||||
</property>
|
||||
<property name="codiceOperatoreVDonor" type="string">
|
||||
<column name="CODICE_OPERATORE_V_DONOR" length="4" />
|
||||
</property>
|
||||
<property name="codiceOperatoreVRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_V_RECIPIENT" length="4" />
|
||||
</property>
|
||||
<property name="prevalidazione" type="string">
|
||||
<column name="PREVALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="flagFurto" type="string">
|
||||
<column name="FLAG_FURTO" length="1" />
|
||||
</property>
|
||||
<property name="flagPrevalidazione" type="string">
|
||||
<column name="FLAG_PREVALIDAZIONE" length="1" />
|
||||
</property>
|
||||
<property name="abbonatoPrepagato" type="string">
|
||||
<column name="ABBONATO_PREPAGATO" length="50" />
|
||||
</property>
|
||||
<property name="flagProgettoAdhoc" type="string">
|
||||
<column name="FLAG_PROGETTO_ADHOC" length="1" />
|
||||
</property>
|
||||
<property name="idBusiness" type="string">
|
||||
<column name="ID_BUSINESS" length="36" />
|
||||
</property>
|
||||
<property name="trasferimentoConSblocco" type="string">
|
||||
<column name="TRASFERIMENTO_CON_SBLOCCO" length="3" />
|
||||
</property>
|
||||
<property name="nomeFileSblocco" type="string">
|
||||
<column name="NOME_FILE_SBLOCCO" length="4000" />
|
||||
</property>
|
||||
<property name="dataCessazioneEffettiva" type="date">
|
||||
<column name="DATA_CESSAZIONE_EFFETTIVA" length="7" />
|
||||
</property>
|
||||
<property name="esitoCas" type="string">
|
||||
<column name="ESITO_CAS" length="4" />
|
||||
</property>
|
||||
<property name="descrizioneEsitoGisp" type="string">
|
||||
<column name="DESCRIZIONE_ESITO_GISP" length="48" />
|
||||
</property>
|
||||
<property name="dataValidazioneEffettiva" type="date">
|
||||
<column name="DATA_VALIDAZIONE_EFFETTIVA" length="7" />
|
||||
</property>
|
||||
<property name="dataAggiornamentoDco" type="timestamp">
|
||||
<column name="DATA_AGGIORNAMENTO_DCO" length="7" />
|
||||
</property>
|
||||
<property name="nomeFileTcr" type="string">
|
||||
<column name="NOME_FILE_TCR" length="4000" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 13-nov-2012 14.37.40 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoPortingPp" table="DBCGO_PORTING_PP">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="timestamp">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="2" scale="0" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonEff" type="string">
|
||||
<column name="CODICE_OPERATORE_DON_EFF" length="4" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecEff" type="string">
|
||||
<column name="CODICE_OPERATORE_REC_EFF" length="4" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 16-giu-2012 9.18.48 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoProcessoPenali" table="DBCGO_PROCESSO_PENALI">
|
||||
<composite-id name="id" class="it.valueteam.dbcgo.hb.dto.DbcgoProcessoPenaliId">
|
||||
<key-property name="meseRiferimento" type="java.lang.Long">
|
||||
<column name="MESE_RIFERIMENTO" precision="22" scale="0" />
|
||||
</key-property>
|
||||
<key-property name="operatore" type="string">
|
||||
<column name="OPERATORE" length="4" />
|
||||
</key-property>
|
||||
<key-property name="processo" type="string">
|
||||
<column name="PROCESSO" length="1" />
|
||||
</key-property>
|
||||
<key-property name="anno" type="java.lang.Long">
|
||||
<column name="ANNO" precision="22" scale="0" />
|
||||
</key-property>
|
||||
<key-property name="tipoSla" type="string">
|
||||
<column name="TIPO_SLA" length="3" />
|
||||
</key-property>
|
||||
<key-property name="step" type="java.lang.Long">
|
||||
<column name="STEP" precision="22" scale="0" />
|
||||
</key-property>
|
||||
</composite-id>
|
||||
<property name="idProcesso" type="java.lang.Long">
|
||||
<column name="ID_PROCESSO" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="isLockByUser" type="string">
|
||||
<column name="IS_LOCK_BY_USER" length="1" />
|
||||
</property>
|
||||
<property name="username" type="string">
|
||||
<column name="USERNAME" length="30" />
|
||||
</property>
|
||||
<property name="isValid" type="string">
|
||||
<column name="IS_VALID" length="1" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 13-nov-2012 14.37.40 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoRecipientPp" table="DBCGO_RECIPIENT_PP">
|
||||
<id name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonating" type="string">
|
||||
<column name="CODICE_OPERATORE_DONATING" length="4" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecipient" type="string">
|
||||
<column name="CODICE_OPERATORE_RECIPIENT" length="4" />
|
||||
</property>
|
||||
<property name="dataTransizioneStato" type="timestamp">
|
||||
<column name="DATA_TRANSIZIONE_STATO" length="7" />
|
||||
</property>
|
||||
<property name="stato" type="java.lang.Long">
|
||||
<column name="STATO" precision="2" scale="0" />
|
||||
</property>
|
||||
<property name="codiceOperatoreRecEff" type="string">
|
||||
<column name="CODICE_OPERATORE_REC_EFF" length="4" />
|
||||
</property>
|
||||
<property name="codiceOperatoreDonEff" type="string">
|
||||
<column name="CODICE_OPERATORE_DON_EFF" length="4" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<!-- File generato manualmente da Devis Giustiniani -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoReportIndennizziCliente" table="DBCGO_RICHIESTE_PROCESSATE">
|
||||
<id name="idCorrelazione" type="java.lang.Long">
|
||||
<column name="ID_CORRELAZIONE" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" not-null="true">
|
||||
<comment>MSISDN</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="marcaggio" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2">
|
||||
<comment>TIPO_CLIENTE</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="numeroGiorniRitardo" type="string">
|
||||
<column name="GIORNI_RITARDO" length="16">
|
||||
<comment>GIORNI_RITARDO</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="totaleIndennizzo" type="string">
|
||||
<column name="TOTALE" length="16" />
|
||||
</property>
|
||||
<property name="msisdnParliSubito" type="string">
|
||||
<column name="MSISDN_PARLI_SUBITO" length="15" not-null="true">
|
||||
<comment>MSISDN_PARLI_SUBITO</comment>
|
||||
</column>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
|
||||
<!-- File generato manualmente da Cristiano Fontana -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoReportIndennizziClienteDownload" table="DBCGO_RICHIESTE_PROCESSATE">
|
||||
<id name="idCorrelazione" type="java.lang.Long">
|
||||
<column name="ID_CORRELAZIONE" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" not-null="true">
|
||||
<comment>MSISDN</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="marcaggio" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2">
|
||||
<comment>TIPO_CLIENTE</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="numeroGiorniRitardo" type="string">
|
||||
<column name="GIORNI_RITARDO" length="16">
|
||||
<comment>GIORNI_RITARDO</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="totaleIndennizzo" type="string">
|
||||
<column name="TOTALE" length="16" />
|
||||
</property>
|
||||
<property name="numeroGiorniPorting" type="string">
|
||||
<column name="GIORNI_PORTING" length="16">
|
||||
<comment>GIORNI_PORTING</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="dataRichEvasa" type="timestamp">
|
||||
<column name="DATA_RICH_EVASA"/>
|
||||
</property>
|
||||
<property name="dataDCOFirst" type="timestamp">
|
||||
<column name="DATA_DCO_FIRST"/>
|
||||
</property>
|
||||
<property name="dataInsFirst" type="timestamp">
|
||||
<column name="DATA_INS_FIRST"/>
|
||||
</property>
|
||||
<property name="dataRichAtt" type="timestamp" insert="false" update="false">
|
||||
<column name="DATA_INS_FIRST"/>
|
||||
</property>
|
||||
<property name="codiceFiscale" type="string">
|
||||
<column name="CODICE_FISCALE" length="16" not-null="true">
|
||||
<comment>CODICE_FISCALE</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="idRichiestaEvasa" type="string">
|
||||
<column name="ID_RICH_EVASA" length="23" not-null="true">
|
||||
<comment>ID_RICH_EVASA</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="idRichiestaFirst" type="string">
|
||||
<column name="ID_RICH_FIRST" length="23" not-null="true">
|
||||
<comment>ID_RICH_FIRST</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="msisdnParliSubito" type="string">
|
||||
<column name="MSISDN_PARLI_SUBITO" length="15" not-null="true">
|
||||
<comment>MSISDN_PARLI_SUBITO</comment>
|
||||
</column>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 29-ott-2012 18.03.06 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoRicaricheBmc" table="DBCGO_RICARICHE_BMC">
|
||||
<composite-id name="id" class="it.valueteam.dbcgo.hb.dto.DbcgoRicaricheBmcId">
|
||||
<key-property name="dataRif" type="date">
|
||||
<column name="DATA_RIF" length="7" />
|
||||
</key-property>
|
||||
<key-property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="20" />
|
||||
</key-property>
|
||||
</composite-id>
|
||||
<property name="numRicariche" type="java.lang.Long">
|
||||
<column name="NUM_RICARICHE" precision="22" scale="0" not-null="true">
|
||||
<comment>Numero delle ricariche effettuate dal msisdn nei 6 mesi precedenti l'uscita</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="impTotRicariche" type="java.lang.Long">
|
||||
<column name="IMP_TOT_RICARICHE" precision="22" scale="0" not-null="true">
|
||||
<comment>Importo totale delle ricariche effettuate nei 6 mesi precedenti l'uscita</comment>
|
||||
</column>
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,93 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 20-set-2012 15.55.34 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoRichiesteProcessate" table="DBCGO_RICHIESTE_PROCESSATE">
|
||||
<composite-id name="id" class="it.valueteam.dbcgo.hb.dto.DbcgoRichiesteProcessateId">
|
||||
<key-property name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
</key-property>
|
||||
<key-property name="processo" type="string">
|
||||
<column name="PROCESSO" length="2" />
|
||||
</key-property>
|
||||
</composite-id>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" not-null="true">
|
||||
<comment>MSISDN</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="statoFinale" type="java.lang.Long">
|
||||
<column name="STATO_FINALE" precision="22" scale="0" not-null="true">
|
||||
<comment>STATO</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="dataricezionerichiesta" type="timestamp">
|
||||
<column name="DATARICEZIONERICHIESTA" length="7" />
|
||||
</property>
|
||||
<property name="dataPic" type="timestamp">
|
||||
<column name="DATA_PIC" length="7">
|
||||
<comment>DATA_PRESA_IN_CARICO</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="dataVal" type="timestamp">
|
||||
<column name="DATA_VAL" length="7">
|
||||
<comment>DATA_VALIDAZIONE_EFFETTIVA</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="dco" type="timestamp">
|
||||
<column name="DCO" length="7">
|
||||
<comment>DATA_CUT_OVER</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="dataChiusuraProcesso" type="timestamp">
|
||||
<column name="DATA_CHIUSURA_PROCESSO" length="7">
|
||||
<comment>DATA_TRANSIZIONE_STATO</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="dataAttivitaRete" type="timestamp">
|
||||
<column name="DATA_ATTIVITA_RETE" length="7">
|
||||
<comment>DATA_CUT_OVER_EFF</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="idCorrelazione" type="java.lang.Long">
|
||||
<column name="ID_CORRELAZIONE" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="operatoreDon" type="string">
|
||||
<column name="OPERATORE_DON" length="4">
|
||||
<comment>CODICE_OPERATORE_DONATING</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="operatoreRec" type="string">
|
||||
<column name="OPERATORE_REC" length="4">
|
||||
<comment>CODICE_OPERATORE_REC</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="operatoreDonEff" type="string">
|
||||
<column name="OPERATORE_DON_EFF" length="4">
|
||||
<comment>CODICE_OPERATORE_V_DONOR</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="operatoreRecEff" type="string">
|
||||
<column name="OPERATORE_REC_EFF" length="4">
|
||||
<comment>CODICE_OPERATORE_V_RECIPIENT</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="tipoCliente" type="string">
|
||||
<column name="TIPO_CLIENTE" length="2">
|
||||
<comment>TIPO_CLIENTE</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="codiceFiscale" type="string">
|
||||
<column name="CODICE_FISCALE" length="16">
|
||||
<comment>CODICI_RIFIUTO_VALIDAZIONE</comment>
|
||||
</column>
|
||||
</property>
|
||||
<property name="codiciRifiutoValidazione" type="string">
|
||||
<column name="CODICI_RIFIUTO_VALIDAZIONE" length="100" />
|
||||
</property>
|
||||
<property name="msisdnParliSubito" type="string">
|
||||
<column name="MSISDN_PARLI_SUBITO" length="15" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 28-ago-2012 13.21.02 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoStato" table="DBCGO_STATO">
|
||||
<id name="idStato" type="java.lang.Long">
|
||||
<column name="ID_STATO" precision="5" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="20" not-null="true" />
|
||||
</property>
|
||||
<property name="finale" type="java.lang.Long">
|
||||
<column name="FINALE" precision="1" scale="0" />
|
||||
</property>
|
||||
<property name="priorityType" type="java.lang.Long">
|
||||
<column name="PRIORITY_TYPE" precision="1" scale="0" />
|
||||
</property>
|
||||
<property name="idStatoGrp" type="java.lang.Long">
|
||||
<column name="ID_STATO_GRP" precision="5" scale="0" />
|
||||
</property>
|
||||
<property name="descr" type="string">
|
||||
<column name="DESCR" length="40" />
|
||||
</property>
|
||||
<property name="visDayNum" type="java.lang.Long">
|
||||
<column name="VIS_DAY_NUM" precision="4" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="statoType" type="java.lang.Long">
|
||||
<column name="STATO_TYPE" precision="1" scale="0" not-null="true" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 28-ago-2012 13.21.02 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoStatoDonVirt" table="DBCGO_STATO_DON_VIRT">
|
||||
<id name="idStato" type="java.lang.Long">
|
||||
<column name="ID_STATO" precision="5" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="40" not-null="true" />
|
||||
</property>
|
||||
<property name="finale" type="java.lang.Long">
|
||||
<column name="FINALE" precision="1" scale="0" />
|
||||
</property>
|
||||
<property name="visDayNum" type="java.lang.Long">
|
||||
<column name="VIS_DAY_NUM" precision="4" scale="0" not-null="true" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 28-ago-2012 13.21.02 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoStatoPor" table="DBCGO_STATO_POR">
|
||||
<id name="idStato" type="java.lang.Long">
|
||||
<column name="ID_STATO" precision="5" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="40" not-null="true" />
|
||||
</property>
|
||||
<property name="idStatoGrp" type="java.lang.Long">
|
||||
<column name="ID_STATO_GRP" precision="5" scale="0" />
|
||||
</property>
|
||||
<property name="descr" type="string">
|
||||
<column name="DESCR" length="40" />
|
||||
</property>
|
||||
<property name="statoType" type="java.lang.Long">
|
||||
<column name="STATO_TYPE" precision="1" scale="0" not-null="true" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 28-ago-2012 13.21.02 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoStatoRec" table="DBCGO_STATO_REC">
|
||||
<id name="idStato" type="java.lang.Long">
|
||||
<column name="ID_STATO" precision="5" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="40" not-null="true" />
|
||||
</property>
|
||||
<property name="finale" type="java.lang.Long">
|
||||
<column name="FINALE" precision="1" scale="0" />
|
||||
</property>
|
||||
<property name="priorityType" type="java.lang.Long">
|
||||
<column name="PRIORITY_TYPE" precision="1" scale="0" />
|
||||
</property>
|
||||
<property name="idStatoGrp" type="java.lang.Long">
|
||||
<column name="ID_STATO_GRP" precision="5" scale="0" />
|
||||
</property>
|
||||
<property name="descr" type="string">
|
||||
<column name="DESCR" length="40" />
|
||||
</property>
|
||||
<property name="visDayNum" type="java.lang.Long">
|
||||
<column name="VIS_DAY_NUM" precision="4" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="statoType" type="java.lang.Long">
|
||||
<column name="STATO_TYPE" precision="1" scale="0" not-null="true" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 28-ago-2012 13.21.02 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoStatoRecVirt" table="DBCGO_STATO_REC_VIRT">
|
||||
<id name="idStato" type="java.lang.Long">
|
||||
<column name="ID_STATO" precision="5" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="40" not-null="true" />
|
||||
</property>
|
||||
<property name="finale" type="java.lang.Long">
|
||||
<column name="FINALE" precision="1" scale="0" />
|
||||
</property>
|
||||
<property name="visDayNum" type="java.lang.Long">
|
||||
<column name="VIS_DAY_NUM" precision="4" scale="0" not-null="true" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 28-ago-2012 13.21.02 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoStatoRecVirtM2m" table="DBCGO_STATO_REC_VIRT_M2M">
|
||||
<id name="idStato" type="java.lang.Long">
|
||||
<column name="ID_STATO" precision="5" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="descrStato" type="string">
|
||||
<column name="DESCR_STATO" length="40" not-null="true" />
|
||||
</property>
|
||||
<property name="finale" type="java.lang.Long">
|
||||
<column name="FINALE" precision="1" scale="0" />
|
||||
</property>
|
||||
<property name="visDayNum" type="java.lang.Long">
|
||||
<column name="VIS_DAY_NUM" precision="4" scale="0" not-null="true" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 30-mag-2012 14.47.14 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoStoricoFile" table="DBCGO_STORICO_FILE">
|
||||
<composite-id name="id" class="it.valueteam.dbcgo.hb.dto.DbcgoStoricoFileId">
|
||||
<key-property name="nomeFile" type="string">
|
||||
<column name="NOME_FILE" length="100" />
|
||||
</key-property>
|
||||
<key-property name="dataCreazione" type="date">
|
||||
<column name="DATA_CREAZIONE" length="7" />
|
||||
</key-property>
|
||||
<key-property name="username" type="string">
|
||||
<column name="USERNAME" length="30" />
|
||||
</key-property>
|
||||
</composite-id>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 5-giu-2012 14.58.48 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoVoListaStatiProcesso" table="DBCGO_VO_LISTA_STATI_PROCESSO">
|
||||
<id name="id" type="java.lang.Long">
|
||||
<column name="ID" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="descr" type="string">
|
||||
<column name="DESCR" length="30" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 5-giu-2012 14.58.48 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoVoMesiRiferimento" table="DBCGO_VO_MESI_RIFERIMENTO">
|
||||
<id name="id" type="java.lang.Long">
|
||||
<column name="ID" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="label" type="string">
|
||||
<column name="LABEL" length="30" />
|
||||
</property>
|
||||
<property name="value" type="string">
|
||||
<column name="VALUE" length="30" />
|
||||
</property>
|
||||
<property name="trimestreRif" type="string">
|
||||
<column name="TRIMESTRE_RIF" length="2" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 17-ago-2009 9.55.40 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.DbcgoVoPrevalidazioneDbc" table="DBCGO_VO_PREVALIDAZIONE_DBC">
|
||||
<id name="id" type="java.lang.Long">
|
||||
<column name="ID" precision="2" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="label" type="string">
|
||||
<column name="LABEL" length="60" />
|
||||
</property>
|
||||
<property name="value" type="string">
|
||||
<column name="VALUE" length="100" />
|
||||
</property>
|
||||
<property name="ordine" type="java.lang.Long">
|
||||
<column name="ORDINE" precision="2" scale="0" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 27-nov-2012 11.47.51 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpDwReportTcr" table="MNP_DW_REPORT_TCR">
|
||||
<composite-id name="id" class="it.valueteam.dbcgo.hb.dto.MnpDwReportTcrId">
|
||||
<key-property name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
</key-property>
|
||||
<key-property name="codiceOperatoreRecEff" type="string">
|
||||
<column name="CODICE_OPERATORE_REC_EFF" length="4" />
|
||||
</key-property>
|
||||
<key-property name="codiceOperatoreDonEff" type="string">
|
||||
<column name="CODICE_OPERATORE_DON_EFF" length="4" />
|
||||
</key-property>
|
||||
</composite-id>
|
||||
<property name="blocco" type="java.lang.Long">
|
||||
<column name="BLOCCO" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="dataDiRiferimento" type="timestamp">
|
||||
<column name="DATA_DI_RIFERIMENTO" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataDcoEff" type="date">
|
||||
<column name="DATA_DCO_EFF" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="tcr1" type="java.lang.Float">
|
||||
<column name="TCR1" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="tcr2" type="java.lang.Float">
|
||||
<column name="TCR2" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" not-null="true" />
|
||||
</property>
|
||||
<property name="codicePrePostPagato" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO" length="3" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 27-nov-2012 11.47.51 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpDwReportTcrDonor" table="MNP_DW_REPORT_TCR_DONOR">
|
||||
<composite-id name="id" class="it.valueteam.dbcgo.hb.dto.MnpDwReportTcrDonorId">
|
||||
<key-property name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
</key-property>
|
||||
<key-property name="codiceOperatoreRecEff" type="string">
|
||||
<column name="CODICE_OPERATORE_REC_EFF" length="4" />
|
||||
</key-property>
|
||||
<key-property name="codiceOperatoreDonEff" type="string">
|
||||
<column name="CODICE_OPERATORE_DON_EFF" length="4" />
|
||||
</key-property>
|
||||
</composite-id>
|
||||
<property name="blocco" type="java.lang.Long">
|
||||
<column name="BLOCCO" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="dataDiRiferimento" type="timestamp">
|
||||
<column name="DATA_DI_RIFERIMENTO" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataDcoEff" type="date">
|
||||
<column name="DATA_DCO_EFF" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="tcr1" type="java.lang.Float">
|
||||
<column name="TCR1" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="tcr2" type="java.lang.Float">
|
||||
<column name="TCR2" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" not-null="true" />
|
||||
</property>
|
||||
<property name="codicePrePostPagato" type="string">
|
||||
<column name="CODICE_PRE_POST_PAGATO" length="3" />
|
||||
</property>
|
||||
<property name="dataRifBmc" type="date">
|
||||
<column name="DATA_RIF_BMC" length="7" />
|
||||
</property>
|
||||
<property name="numRicariche" type="java.lang.Long">
|
||||
<column name="NUM_RICARICHE" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="impTotRicariche" type="java.lang.Float">
|
||||
<column name="IMP_TOT_RICARICHE" precision="22" scale="0" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,90 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 28-ago-2012 13.21.02 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpDwSla3ggOutView" table="MNP_DW_SLA_3GG_OUT_VIEW">
|
||||
<id name="numeroRiga" type="java.lang.Long">
|
||||
<column name="NUMERO_RIGA" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoMessaggio" type="string">
|
||||
<column name="TIPO_MESSAGGIO" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="dataMessaggio" type="string">
|
||||
<column name="DATA_MESSAGGIO" length="7" />
|
||||
</property>
|
||||
<property name="dataMessaggioShow" type="timestamp">
|
||||
<column name="DATA_MESSAGGIO_SHOW" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataAttesaEventoFin" type="timestamp">
|
||||
<column name="DATA_ATTESA_EVENTO_FIN" length="7" />
|
||||
</property>
|
||||
<property name="meseCompFinale" type="string">
|
||||
<column name="MESE_COMP_FINALE" length="7" />
|
||||
</property>
|
||||
<property name="donorRete" type="string">
|
||||
<column name="DONOR_RETE" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="recipientRete" type="string">
|
||||
<column name="RECIPIENT_RETE" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="donorEffettivo" type="string">
|
||||
<column name="DONOR_EFFETTIVO" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="recipientEffettivo" type="string">
|
||||
<column name="RECIPIENT_EFFETTIVO" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="terzaParte" type="string">
|
||||
<column name="TERZA_PARTE" length="4" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceRichiestaRecipient" type="string">
|
||||
<column name="CODICE_RICHIESTA_RECIPIENT" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="nomeFile" type="string">
|
||||
<column name="NOME_FILE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileIniziale" type="string">
|
||||
<column name="NOME_FILE_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileFinale" type="string">
|
||||
<column name="NOME_FILE_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="ackIniziale" type="string">
|
||||
<column name="ACK_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="ackFinale" type="string">
|
||||
<column name="ACK_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="numeroGiorniRitardo" type="java.lang.Long">
|
||||
<column name="NUMERO_GIORNI_RITARDO" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="penale" type="java.lang.Long">
|
||||
<column name="PENALE" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="dataIniziale" type="timestamp">
|
||||
<column name="DATA_INIZIALE" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataFinale" type="timestamp">
|
||||
<column name="DATA_FINALE" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoProcesso" type="string">
|
||||
<column name="TIPO_PROCESSO" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeIn" type="timestamp">
|
||||
<column name="DATA_FRONTIERA_SE_IN" length="7" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeOut" type="timestamp">
|
||||
<column name="DATA_FRONTIERA_SE_OUT" length="7" />
|
||||
</property>
|
||||
<property name="isPenaleAltroAom" type="string">
|
||||
<column name="IS_PENALE_ALTRO_AOM" length="1" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 4-mar-2011 14.55.07 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpDwSlaFranchigiaOutView" table="MNP_DW_SLA_FRANCHIGIA_OUT_VIEW">
|
||||
<id name="numeroRiga" type="java.lang.Long">
|
||||
<column name="NUMERO_RIGA" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="tipoEvento" type="string">
|
||||
<column name="TIPO_EVENTO" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="dataEvento" type="date">
|
||||
<column name="DATA_EVENTO" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="meseCompFinale" type="string">
|
||||
<column name="MESE_COMP_FINALE" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="donorRete" type="string">
|
||||
<column name="DONOR_RETE" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="recipientRete" type="string">
|
||||
<column name="RECIPIENT_RETE" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="donorEffettivo" type="string">
|
||||
<column name="DONOR_EFFETTIVO" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="recipientEffettivo" type="string">
|
||||
<column name="RECIPIENT_EFFETTIVO" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="eventiAttesi" type="java.lang.Long">
|
||||
<column name="EVENTI_ATTESI" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="eventiInSla" type="java.lang.Long">
|
||||
<column name="EVENTI_IN_SLA" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="eventiFuoriSla" type="java.lang.Long">
|
||||
<column name="EVENTI_FUORI_SLA" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="percentualeFuoriSla" type="java.lang.Long">
|
||||
<column name="PERCENTUALE_FUORI_SLA" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="processo" type="string">
|
||||
<column name="PROCESSO" length="1" not-null="true" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 30-mag-2012 9.45.48 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpDwSlaInMatGioTcVw" table="MNP_DW_SLA_IN_MAT_GIO_TC_VW">
|
||||
<id name="numeroRiga" type="java.lang.Long">
|
||||
<column name="NUMERO_RIGA" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoMessaggio" type="string">
|
||||
<column name="TIPO_MESSAGGIO" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="dataMessaggio" type="string">
|
||||
<column name="DATA_MESSAGGIO" length="7" />
|
||||
</property>
|
||||
<property name="dataMessaggioShow" type="date">
|
||||
<column name="DATA_MESSAGGIO_SHOW" length="7" />
|
||||
</property>
|
||||
<property name="dataAttesaEventoFin" type="date">
|
||||
<column name="DATA_ATTESA_EVENTO_FIN" length="7" />
|
||||
</property>
|
||||
<property name="meseCompFinale" type="string">
|
||||
<column name="MESE_COMP_FINALE" length="7" />
|
||||
</property>
|
||||
<property name="donorRete" type="string">
|
||||
<column name="DONOR_RETE" length="4" />
|
||||
</property>
|
||||
<property name="recipientRete" type="string">
|
||||
<column name="RECIPIENT_RETE" length="4" />
|
||||
</property>
|
||||
<property name="donorEffettivo" type="string">
|
||||
<column name="DONOR_EFFETTIVO" length="4" />
|
||||
</property>
|
||||
<property name="recipientEffettivo" type="string">
|
||||
<column name="RECIPIENT_EFFETTIVO" length="4" />
|
||||
</property>
|
||||
<property name="terzaParte" type="string">
|
||||
<column name="TERZA_PARTE" length="0" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceRichiestaRecipient" type="string">
|
||||
<column name="CODICE_RICHIESTA_RECIPIENT" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="nomeFile" type="string">
|
||||
<column name="NOME_FILE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileIniziale" type="string">
|
||||
<column name="NOME_FILE_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileFinale" type="string">
|
||||
<column name="NOME_FILE_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="ackIniziale" type="string">
|
||||
<column name="ACK_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="ackFinale" type="string">
|
||||
<column name="ACK_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="numeroGiorniRitardo" type="java.lang.Long">
|
||||
<column name="NUMERO_GIORNI_RITARDO" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="penale" type="java.lang.Long">
|
||||
<column name="PENALE" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="dataIniziale" type="date">
|
||||
<column name="DATA_INIZIALE" length="7" />
|
||||
</property>
|
||||
<property name="dataFinale" type="date">
|
||||
<column name="DATA_FINALE" length="7" />
|
||||
</property>
|
||||
<property name="tipoProcesso" type="string">
|
||||
<column name="TIPO_PROCESSO" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeIn" type="date">
|
||||
<column name="DATA_FRONTIERA_SE_IN" length="7" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeOut" type="date">
|
||||
<column name="DATA_FRONTIERA_SE_OUT" length="7" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 13-giu-2012 14.06.17 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpDwSlaInMatGiorView" table="MNP_DW_SLA_IN_MAT_GIOR_VIEW">
|
||||
<id name="numeroRiga" type="java.lang.Long">
|
||||
<column name="NUMERO_RIGA" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoMessaggio" type="string">
|
||||
<column name="TIPO_MESSAGGIO" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="dataMessaggio" type="string">
|
||||
<column name="DATA_MESSAGGIO" length="7" />
|
||||
</property>
|
||||
<property name="dataMessaggioShow" type="date">
|
||||
<column name="DATA_MESSAGGIO_SHOW" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataAttesaEventoFin" type="date">
|
||||
<column name="DATA_ATTESA_EVENTO_FIN" length="7" />
|
||||
</property>
|
||||
<property name="meseCompFinale" type="string">
|
||||
<column name="MESE_COMP_FINALE" length="7" />
|
||||
</property>
|
||||
<property name="donorRete" type="string">
|
||||
<column name="DONOR_RETE" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="recipientRete" type="string">
|
||||
<column name="RECIPIENT_RETE" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="donorEffettivo" type="string">
|
||||
<column name="DONOR_EFFETTIVO" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="recipientEffettivo" type="string">
|
||||
<column name="RECIPIENT_EFFETTIVO" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="terzaParte" type="string">
|
||||
<column name="TERZA_PARTE" length="4" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceRichiestaRecipient" type="string">
|
||||
<column name="CODICE_RICHIESTA_RECIPIENT" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="nomeFile" type="string">
|
||||
<column name="NOME_FILE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileIniziale" type="string">
|
||||
<column name="NOME_FILE_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileFinale" type="string">
|
||||
<column name="NOME_FILE_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="ackIniziale" type="string">
|
||||
<column name="ACK_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="ackFinale" type="string">
|
||||
<column name="ACK_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="numeroGiorniRitardo" type="java.lang.Long">
|
||||
<column name="NUMERO_GIORNI_RITARDO" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="penale" type="java.lang.Long">
|
||||
<column name="PENALE" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="dataIniziale" type="date">
|
||||
<column name="DATA_INIZIALE" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataFinale" type="date">
|
||||
<column name="DATA_FINALE" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoProcesso" type="string">
|
||||
<column name="TIPO_PROCESSO" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeIn" type="date">
|
||||
<column name="DATA_FRONTIERA_SE_IN" length="7" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeOut" type="date">
|
||||
<column name="DATA_FRONTIERA_SE_OUT" length="7" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 30-mag-2012 9.45.48 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpDwSlaMatGioTcVw" table="MNP_DW_SLA_MAT_GIO_TC_VW">
|
||||
<id name="numeroRiga" type="java.lang.Long">
|
||||
<column name="NUMERO_RIGA" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoMessaggio" type="string">
|
||||
<column name="TIPO_MESSAGGIO" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="dataMessaggio" type="string">
|
||||
<column name="DATA_MESSAGGIO" length="7" />
|
||||
</property>
|
||||
<property name="dataMessaggioShow" type="date">
|
||||
<column name="DATA_MESSAGGIO_SHOW" length="7" />
|
||||
</property>
|
||||
<property name="dataAttesaEventoFin" type="date">
|
||||
<column name="DATA_ATTESA_EVENTO_FIN" length="7" />
|
||||
</property>
|
||||
<property name="meseCompFinale" type="string">
|
||||
<column name="MESE_COMP_FINALE" length="7" />
|
||||
</property>
|
||||
<property name="donorRete" type="string">
|
||||
<column name="DONOR_RETE" length="4" />
|
||||
</property>
|
||||
<property name="recipientRete" type="string">
|
||||
<column name="RECIPIENT_RETE" length="4" />
|
||||
</property>
|
||||
<property name="donorEffettivo" type="string">
|
||||
<column name="DONOR_EFFETTIVO" length="4" />
|
||||
</property>
|
||||
<property name="recipientEffettivo" type="string">
|
||||
<column name="RECIPIENT_EFFETTIVO" length="4" />
|
||||
</property>
|
||||
<property name="terzaParte" type="string">
|
||||
<column name="TERZA_PARTE" length="0" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceRichiestaRecipient" type="string">
|
||||
<column name="CODICE_RICHIESTA_RECIPIENT" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="nomeFile" type="string">
|
||||
<column name="NOME_FILE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileIniziale" type="string">
|
||||
<column name="NOME_FILE_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileFinale" type="string">
|
||||
<column name="NOME_FILE_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="ackIniziale" type="string">
|
||||
<column name="ACK_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="ackFinale" type="string">
|
||||
<column name="ACK_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="numeroGiorniRitardo" type="java.lang.Long">
|
||||
<column name="NUMERO_GIORNI_RITARDO" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="penale" type="java.lang.Long">
|
||||
<column name="PENALE" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="dataIniziale" type="date">
|
||||
<column name="DATA_INIZIALE" length="7" />
|
||||
</property>
|
||||
<property name="dataFinale" type="date">
|
||||
<column name="DATA_FINALE" length="7" />
|
||||
</property>
|
||||
<property name="tipoProcesso" type="string">
|
||||
<column name="TIPO_PROCESSO" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeIn" type="date">
|
||||
<column name="DATA_FRONTIERA_SE_IN" length="7" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeOut" type="date">
|
||||
<column name="DATA_FRONTIERA_SE_OUT" length="7" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 13-giu-2012 14.07.08 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpDwSlaMatGiorView" table="MNP_DW_SLA_MAT_GIOR_VIEW">
|
||||
<id name="numeroRiga" type="java.lang.Long">
|
||||
<column name="NUMERO_RIGA" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoMessaggio" type="string">
|
||||
<column name="TIPO_MESSAGGIO" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="dataMessaggio" type="string">
|
||||
<column name="DATA_MESSAGGIO" length="7" />
|
||||
</property>
|
||||
<property name="dataMessaggioShow" type="date">
|
||||
<column name="DATA_MESSAGGIO_SHOW" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataAttesaEventoFin" type="date">
|
||||
<column name="DATA_ATTESA_EVENTO_FIN" length="7" />
|
||||
</property>
|
||||
<property name="meseCompFinale" type="string">
|
||||
<column name="MESE_COMP_FINALE" length="7" />
|
||||
</property>
|
||||
<property name="donorRete" type="string">
|
||||
<column name="DONOR_RETE" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="recipientRete" type="string">
|
||||
<column name="RECIPIENT_RETE" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="donorEffettivo" type="string">
|
||||
<column name="DONOR_EFFETTIVO" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="recipientEffettivo" type="string">
|
||||
<column name="RECIPIENT_EFFETTIVO" length="4" not-null="true" />
|
||||
</property>
|
||||
<property name="terzaParte" type="string">
|
||||
<column name="TERZA_PARTE" length="4" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceRichiestaRecipient" type="string">
|
||||
<column name="CODICE_RICHIESTA_RECIPIENT" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="nomeFile" type="string">
|
||||
<column name="NOME_FILE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileIniziale" type="string">
|
||||
<column name="NOME_FILE_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileFinale" type="string">
|
||||
<column name="NOME_FILE_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="ackIniziale" type="string">
|
||||
<column name="ACK_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="ackFinale" type="string">
|
||||
<column name="ACK_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="numeroGiorniRitardo" type="java.lang.Long">
|
||||
<column name="NUMERO_GIORNI_RITARDO" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="penale" type="java.lang.Long">
|
||||
<column name="PENALE" precision="22" scale="0" not-null="true" />
|
||||
</property>
|
||||
<property name="dataIniziale" type="date">
|
||||
<column name="DATA_INIZIALE" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataFinale" type="date">
|
||||
<column name="DATA_FINALE" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoProcesso" type="string">
|
||||
<column name="TIPO_PROCESSO" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeIn" type="date">
|
||||
<column name="DATA_FRONTIERA_SE_IN" length="7" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeOut" type="date">
|
||||
<column name="DATA_FRONTIERA_SE_OUT" length="7" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 28-ago-2012 13.21.02 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpDwSlaTcOutView" table="MNP_DW_SLA_TC_OUT_VIEW">
|
||||
<id name="numeroRiga" type="java.lang.Long">
|
||||
<column name="NUMERO_RIGA" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoMessaggio" type="string">
|
||||
<column name="TIPO_MESSAGGIO" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="dataMessaggio" type="string">
|
||||
<column name="DATA_MESSAGGIO" length="7" />
|
||||
</property>
|
||||
<property name="dataMessaggioShow" type="timestamp">
|
||||
<column name="DATA_MESSAGGIO_SHOW" length="7" />
|
||||
</property>
|
||||
<property name="dataAttesaEventoFin" type="timestamp">
|
||||
<column name="DATA_ATTESA_EVENTO_FIN" length="7" />
|
||||
</property>
|
||||
<property name="meseCompFinale" type="string">
|
||||
<column name="MESE_COMP_FINALE" length="7" />
|
||||
</property>
|
||||
<property name="donorRete" type="string">
|
||||
<column name="DONOR_RETE" length="4" />
|
||||
</property>
|
||||
<property name="recipientRete" type="string">
|
||||
<column name="RECIPIENT_RETE" length="4" />
|
||||
</property>
|
||||
<property name="donorEffettivo" type="string">
|
||||
<column name="DONOR_EFFETTIVO" length="4" />
|
||||
</property>
|
||||
<property name="recipientEffettivo" type="string">
|
||||
<column name="RECIPIENT_EFFETTIVO" length="4" />
|
||||
</property>
|
||||
<property name="terzaParte" type="string">
|
||||
<column name="TERZA_PARTE" length="0" />
|
||||
</property>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" />
|
||||
</property>
|
||||
<property name="codiceRichiestaRecipient" type="string">
|
||||
<column name="CODICE_RICHIESTA_RECIPIENT" length="23" not-null="true" />
|
||||
</property>
|
||||
<property name="nomeFile" type="string">
|
||||
<column name="NOME_FILE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileIniziale" type="string">
|
||||
<column name="NOME_FILE_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="nomeFileFinale" type="string">
|
||||
<column name="NOME_FILE_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="ackIniziale" type="string">
|
||||
<column name="ACK_INIZIALE" length="27" />
|
||||
</property>
|
||||
<property name="ackFinale" type="string">
|
||||
<column name="ACK_FINALE" length="27" />
|
||||
</property>
|
||||
<property name="numeroGiorniRitardo" type="java.lang.Long">
|
||||
<column name="NUMERO_GIORNI_RITARDO" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="penale" type="java.lang.Long">
|
||||
<column name="PENALE" precision="22" scale="0" />
|
||||
</property>
|
||||
<property name="dataNotificaCredito" type="timestamp">
|
||||
<column name="DATA_NOTIFICA_CREDITO" length="7" />
|
||||
</property>
|
||||
<property name="dataSblImporto" type="timestamp">
|
||||
<column name="DATA_SBL_IMPORTO" length="7" />
|
||||
</property>
|
||||
<property name="dataSblCreditoAnomalo" type="timestamp">
|
||||
<column name="DATA_SBL_CREDITO_ANOMALO" length="7" />
|
||||
</property>
|
||||
<property name="dataIniziale" type="timestamp">
|
||||
<column name="DATA_INIZIALE" length="7" />
|
||||
</property>
|
||||
<property name="dataFinale" type="timestamp">
|
||||
<column name="DATA_FINALE" length="7" />
|
||||
</property>
|
||||
<property name="dcoEffettiva" type="timestamp">
|
||||
<column name="DCO_EFFETTIVA" length="7" />
|
||||
</property>
|
||||
<property name="tipoProcesso" type="string">
|
||||
<column name="TIPO_PROCESSO" length="1" not-null="true" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeIn" type="timestamp">
|
||||
<column name="DATA_FRONTIERA_SE_IN" length="7" />
|
||||
</property>
|
||||
<property name="dataFrontieraSeOut" type="timestamp">
|
||||
<column name="DATA_FRONTIERA_SE_OUT" length="7" />
|
||||
</property>
|
||||
<property name="isPenaleAltroAom" type="string">
|
||||
<column name="IS_PENALE_ALTRO_AOM" length="1" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 13-nov-2012 10.35.13 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpDwXmlInOutView" table="MNP_DW_XML_IN_OUT_VIEW">
|
||||
<composite-id name="id" class="it.valueteam.dbcgo.hb.dto.MnpDwXmlInOutViewId">
|
||||
<key-property name="nomeFile" type="string">
|
||||
<column name="NOME_FILE" length="27" />
|
||||
</key-property>
|
||||
<key-property name="idRichiesta" type="string">
|
||||
<column name="ID_RICHIESTA" length="23" />
|
||||
</key-property>
|
||||
<key-property name="tipoFile" type="string">
|
||||
<column name="TIPO_FILE" length="3" />
|
||||
</key-property>
|
||||
<key-property name="direzione" type="string">
|
||||
<column name="DIREZIONE" length="10" />
|
||||
</key-property>
|
||||
<key-property name="nomeFileAck" type="string">
|
||||
<column name="NOME_FILE_ACK" length="27" />
|
||||
</key-property>
|
||||
<key-property name="nomeFileXml" type="string">
|
||||
<column name="NOME_FILE_XML" length="27" />
|
||||
</key-property>
|
||||
</composite-id>
|
||||
<property name="msisdn" type="string">
|
||||
<column name="MSISDN" length="15" not-null="true" />
|
||||
</property>
|
||||
<property name="tipoNotifica" type="string">
|
||||
<column name="TIPO_NOTIFICA" length="40" not-null="true" />
|
||||
</property>
|
||||
<property name="data" type="date">
|
||||
<column name="DATA" length="7" not-null="true" />
|
||||
</property>
|
||||
<property name="dataShow" type="string">
|
||||
<column name="DATA_SHOW" length="20" not-null="true" />
|
||||
</property>
|
||||
<property name="mittente" type="string">
|
||||
<column name="MITTENTE" length="4" />
|
||||
</property>
|
||||
<property name="destinatario" type="string">
|
||||
<column name="DESTINATARIO" length="4" />
|
||||
</property>
|
||||
<property name="canaleAlternativo" type="string">
|
||||
<column name="CANALE_ALTERNATIVO" length="1" />
|
||||
</property>
|
||||
<property name="tipoProcesso" type="string">
|
||||
<column name="TIPO_PROCESSO" length="1" />
|
||||
</property>
|
||||
<property name="ord2" type="java.lang.Long">
|
||||
<column name="ORD2" precision="1" scale="0" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
||||
<!-- Generated 11-dic-2009 15.25.26 by Hibernate Tools 3.2.0.CR1 -->
|
||||
<!-- MNP_SM_2350 201712 Anomalia su report AGCOM -->
|
||||
<!-- Add field CSV4 to cover further 4k segment of CLOB field MNP.MNP_REPORT_AGCOM.CSV -->
|
||||
<hibernate-mapping>
|
||||
<class name="it.valueteam.dbcgo.hb.dto.MnpReportAgcomView" table="MNP_REPORT_AGCOM_VIEW">
|
||||
<id name="idrow" type="java.lang.Long">
|
||||
<column name="IDROW" precision="22" scale="0" />
|
||||
<generator class="assigned"></generator>
|
||||
</id>
|
||||
<property name="meseanno" type="string">
|
||||
<column name="MESEANNO" length="7" />
|
||||
</property>
|
||||
<property name="tipoReport" type="string">
|
||||
<column name="TIPO_REPORT" length="10" not-null="true" />
|
||||
</property>
|
||||
<property name="csv1" type="string">
|
||||
<column name="CSV1" length="4000" />
|
||||
</property>
|
||||
<property name="csv2" type="string">
|
||||
<column name="CSV2" length="4000" />
|
||||
</property>
|
||||
<property name="csv3" type="string">
|
||||
<column name="CSV3" length="4000" />
|
||||
</property>
|
||||
<property name="csv4" type="string">
|
||||
<column name="CSV4" length="4000" />
|
||||
</property>
|
||||
<property name="csv5" type="string">
|
||||
<column name="CSV5" length="4000" />
|
||||
</property>
|
||||
<property name="csv6" type="string">
|
||||
<column name="CSV6" length="4000" />
|
||||
</property>
|
||||
<property name="csv7" type="string">
|
||||
<column name="CSV7" length="4000" />
|
||||
</property>
|
||||
<property name="csv8" type="string">
|
||||
<column name="CSV8" length="4000" />
|
||||
</property>
|
||||
<property name="csv9" type="string">
|
||||
<column name="CSV9" length="4000" />
|
||||
</property>
|
||||
<property name="csv10" type="string">
|
||||
<column name="CSV10" length="4000" />
|
||||
</property>
|
||||
<property name="dataCreazione" type="date">
|
||||
<column name="DATA_CREAZIONE" length="7" not-null="true" />
|
||||
</property>
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
268
dbcmnpsrc/FE/mnpdev/dbcgo/dbcgom/pom.xml
Normal file
268
dbcmnpsrc/FE/mnpdev/dbcgo/dbcgom/pom.xml
Normal file
@@ -0,0 +1,268 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>dbcgom</groupId>
|
||||
<artifactId>dbcgom</artifactId>
|
||||
<packaging>ejb</packaging>
|
||||
<name>dbcgom</name>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<description />
|
||||
|
||||
<build>
|
||||
<sourceDirectory>${basedir}/src</sourceDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${basedir}/src</directory>
|
||||
<excludes>
|
||||
<exclude>**/*.java</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${basedir}/res</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>servlet-api</artifactId>
|
||||
<version>2.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.servlet.jsp</groupId>
|
||||
<artifactId>jsp-api</artifactId>
|
||||
<version>2.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jboss</groupId>
|
||||
<artifactId>jboss-j2ee</artifactId>
|
||||
<version>4.0.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>jboss</groupId>
|
||||
<artifactId>jboss-jsr77</artifactId>
|
||||
<version>3.2.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.xml</groupId>
|
||||
<artifactId>jaxrpc-api</artifactId>
|
||||
<version>1.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>axis</groupId>
|
||||
<artifactId>axis-saaj</artifactId>
|
||||
<version>1.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>javax.xml</groupId>
|
||||
<artifactId>namespace</artifactId>
|
||||
<version>1.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xmlParserAPIs</artifactId>
|
||||
<version>2.6.2</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>1.2.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- importate in Archiva -->
|
||||
<dependency>
|
||||
<groupId>sshtools</groupId>
|
||||
<artifactId>j2ssh-core</artifactId>
|
||||
<version>0.2.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>sshtools</groupId>
|
||||
<artifactId>j2ssh-common</artifactId>
|
||||
<version>0.2.6</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>sshtools</groupId>
|
||||
<artifactId>openssh-pk</artifactId>
|
||||
<version>1.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>biz</groupId>
|
||||
<artifactId>datedFileAppender</artifactId>
|
||||
<version>1.0.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- custom: da progetto -->
|
||||
<dependency>
|
||||
<groupId>logging</groupId>
|
||||
<artifactId>logging</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- custom: da progetto ma il jar si trova in Archiva -->
|
||||
<dependency>
|
||||
<groupId>security-utility</groupId>
|
||||
<artifactId>security-utility</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- custom: da progetto ma il jar si trova in Archiva -->
|
||||
<!-- in attesa di generazione parziale dei jar -->
|
||||
<dependency>
|
||||
<groupId>mnp-ejbclient</groupId>
|
||||
<artifactId>mnp-ejbclient</artifactId>
|
||||
<version>5.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- custom: da progetto ma il jar si trova in Archiva -->
|
||||
<!-- in attesa di generazione parziale dei jar -->
|
||||
<dependency>
|
||||
<groupId>crontab</groupId>
|
||||
<artifactId>process-executor</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-net</groupId>
|
||||
<artifactId>commons-net</artifactId>
|
||||
<version>1.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>antlr</groupId>
|
||||
<artifactId>antlr</artifactId>
|
||||
<version>2.7.6rc1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>asm</groupId>
|
||||
<artifactId>asm-attrs</artifactId>
|
||||
<version>1.5.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
<version>1.5.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>c3p0</groupId>
|
||||
<artifactId>c3p0</artifactId>
|
||||
<version>0.9.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib</artifactId>
|
||||
<version>2.1_3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>2.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dom4j</groupId>
|
||||
<artifactId>dom4j</artifactId>
|
||||
<version>1.5.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ehcache</groupId>
|
||||
<artifactId>ehcache</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jaxen</groupId>
|
||||
<artifactId>jaxen</artifactId>
|
||||
<version>1.1-beta-4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>jgroups</groupId>
|
||||
<artifactId>jgroups</artifactId>
|
||||
<version>2.2.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.transaction</groupId>
|
||||
<artifactId>jta</artifactId>
|
||||
<version>1.0.1B</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<version>2.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate</artifactId>
|
||||
<version>3.2.0.cr4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.jexcelapi</groupId>
|
||||
<artifactId>jxl</artifactId>
|
||||
<version>2.6.10</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi</artifactId>
|
||||
<version>3.16</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>3.16</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>3.16</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>4.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Class-Path:
|
||||
|
||||
56
dbcmnpsrc/FE/mnpdev/dbcgo/dbcgom/res/META-INF/ejb-jar.xml
Normal file
56
dbcmnpsrc/FE/mnpdev/dbcgo/dbcgom/res/META-INF/ejb-jar.xml
Normal file
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
|
||||
<ejb-jar>
|
||||
<enterprise-beans>
|
||||
<session>
|
||||
<display-name>SyncService</display-name>
|
||||
<ejb-name>SyncService</ejb-name>
|
||||
<home>it.valueteam.dbcgo.sync.SyncServiceHome</home>
|
||||
<remote>it.valueteam.dbcgo.sync.SyncService</remote>
|
||||
<ejb-class>it.valueteam.dbcgo.sync.SyncServiceBean</ejb-class>
|
||||
<session-type>Stateless</session-type>
|
||||
<transaction-type>Container</transaction-type>
|
||||
</session>
|
||||
<session>
|
||||
<display-name>PriorityService</display-name>
|
||||
<ejb-name>PriorityService</ejb-name>
|
||||
<home>it.valueteam.dbcgo.priority.local.PriorityServiceHome</home>
|
||||
<remote>it.valueteam.dbcgo.priority.local.PriorityService</remote>
|
||||
<ejb-class>it.valueteam.dbcgo.priority.local.PriorityServiceBean</ejb-class>
|
||||
<session-type>Stateless</session-type>
|
||||
<transaction-type>Container</transaction-type>
|
||||
</session>
|
||||
<message-driven>
|
||||
<display-name>RequestDispatcher</display-name>
|
||||
<ejb-name>RequestDispatcher</ejb-name>
|
||||
<ejb-class>it.valueteam.dbcgo.mnp.RequestDispatcher</ejb-class>
|
||||
<transaction-type>Container</transaction-type>
|
||||
<message-driven-destination>
|
||||
<destination-type>javax.jms.Queue</destination-type>
|
||||
</message-driven-destination>
|
||||
</message-driven>
|
||||
</enterprise-beans>
|
||||
<assembly-descriptor>
|
||||
<container-transaction>
|
||||
<method>
|
||||
<ejb-name>SyncService</ejb-name>
|
||||
<method-name>*</method-name>
|
||||
</method>
|
||||
<trans-attribute>RequiresNew</trans-attribute>
|
||||
</container-transaction>
|
||||
<container-transaction>
|
||||
<method>
|
||||
<ejb-name>PriorityService</ejb-name>
|
||||
<method-name>*</method-name>
|
||||
</method>
|
||||
<trans-attribute>Required</trans-attribute>
|
||||
</container-transaction>
|
||||
<container-transaction>
|
||||
<method>
|
||||
<ejb-name>RequestDispatcher</ejb-name>
|
||||
<method-name>*</method-name>
|
||||
</method>
|
||||
<trans-attribute>Required</trans-attribute>
|
||||
</container-transaction>
|
||||
</assembly-descriptor>
|
||||
</ejb-jar>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
|
||||
<weblogic-ejb-jar>
|
||||
<weblogic-enterprise-bean>
|
||||
<ejb-name>SyncService</ejb-name>
|
||||
<stateless-session-descriptor>
|
||||
<pool>
|
||||
<max-beans-in-free-pool>10</max-beans-in-free-pool>
|
||||
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
|
||||
</pool>
|
||||
</stateless-session-descriptor>
|
||||
<enable-call-by-reference>true</enable-call-by-reference>
|
||||
<jndi-name>ejb/dbcgoSyncService</jndi-name>
|
||||
</weblogic-enterprise-bean>
|
||||
<weblogic-enterprise-bean>
|
||||
<ejb-name>PriorityService</ejb-name>
|
||||
<stateless-session-descriptor>
|
||||
<pool>
|
||||
<max-beans-in-free-pool>10</max-beans-in-free-pool>
|
||||
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
|
||||
</pool>
|
||||
</stateless-session-descriptor>
|
||||
<enable-call-by-reference>true</enable-call-by-reference>
|
||||
<jndi-name>ejb/dbcgoPriorityService</jndi-name>
|
||||
</weblogic-enterprise-bean>
|
||||
<weblogic-enterprise-bean>
|
||||
<ejb-name>RequestDispatcher</ejb-name>
|
||||
<message-driven-descriptor>
|
||||
<pool>
|
||||
<max-beans-in-free-pool>10</max-beans-in-free-pool>
|
||||
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
|
||||
</pool>
|
||||
<destination-jndi-name>jms/dbcgoRequestToMnp</destination-jndi-name>
|
||||
<connection-factory-jndi-name>jms/dbcgoCFactory</connection-factory-jndi-name>
|
||||
</message-driven-descriptor>
|
||||
</weblogic-enterprise-bean>
|
||||
<disable-warning>BEA-010054</disable-warning>
|
||||
</weblogic-ejb-jar>
|
||||
@@ -0,0 +1,100 @@
|
||||
package it.valueteam.dbcgo.common;
|
||||
|
||||
/**
|
||||
* <p>Title: </p>
|
||||
* <p>Description: Mapping tra le azioni di logging e la loro descrizione</p>
|
||||
* <p>Copyright: Copyright (c) 2006</p>
|
||||
* <p>Company: ValueTeam</p>
|
||||
* @author Mario Giurlanda
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class ActionLogMapping {
|
||||
|
||||
public static int RicercaRichiesteDonor = 1;
|
||||
public static int DownloadRichiesteDonor = 2;
|
||||
public static int RicercaRichiesteRecipient = 4;
|
||||
public static int DownloadRichiesteRecipient = 5;
|
||||
public static int AggiornamentoPrioritaRecipient = 6;
|
||||
public static int AggiornamentoRipartizioneDonor = 7;
|
||||
public static int AggiornamentoRipartizioneRecipient = 8;
|
||||
public static int RicercaPingPong = 9;
|
||||
public static int CambioPassword = 10;
|
||||
public static int Login = 11;
|
||||
public static int Logout = 12;
|
||||
public static int VisualizzazioneReport = 13;
|
||||
public static int DownloadReport = 14;
|
||||
public static int DownloadQuadraturaDonorReport = 15;
|
||||
public static int DownloadQuadraturaRecipientReport = 16;
|
||||
public static int RicercaQuadraturaDonor = 17;
|
||||
public static int RicercaQuadraturaRecipient = 18;
|
||||
public static int RicercaMvno2Mvno = 19;
|
||||
public static int RicercaDonorVirtualeMvno = 20;
|
||||
public static int RicercaRecipientVirtualeMvno = 21;
|
||||
public static int DownloadMvno2Mvno = 22;
|
||||
public static int DownloadDonorVirtualeMvno = 23;
|
||||
public static int DownloadRecipientVirtualeMvno = 24;
|
||||
public static int UpdateDcoUpdate = 25;
|
||||
public static int UpdateDcoSearch = 26;
|
||||
public static int ReportAgcomDownload = 27;
|
||||
public static int ReportPenaliDonatingSearch = 28;
|
||||
public static int ReportPenaliDonatingDownload = 29;
|
||||
public static int ReportPenaliRecipientSearch = 30;
|
||||
public static int ReportPenaliProcessiVirtualiSearch = 31;
|
||||
public static int ReportPenaliRecipientDownload = 32;
|
||||
public static int ReportPenaliProcessiVirtualiDownload = 33;
|
||||
|
||||
public static int ReportFranchigiaRecipientDownload = 34;
|
||||
public static int ReportFranchigiaRecipientSearch = 35;
|
||||
public static int ReportFranchigiaDonatingDownload = 36;
|
||||
public static int ReportFranchigiaDonatingSearch = 37;
|
||||
public static int MonitorPenaliSearch = 38;
|
||||
public static int MonitorPenaliDownload = 39;
|
||||
public static int ReportSintesiDownload = 40;
|
||||
|
||||
/* public static int DisserviziAOMSearch = 41;
|
||||
public static int DisserviziAOMDownload = 42;
|
||||
public static int DisserviziAOMInserimento = 43;
|
||||
public static int DisserviziTIMSearch = 44;
|
||||
public static int DisserviziTIMDownload = 45;
|
||||
public static int DisserviziTIMInserimento = 46;
|
||||
|
||||
public static int UploadFranchigie = 47;
|
||||
|
||||
public static int CalcoloPenaliDonorAvviaProcesso = 48;
|
||||
public static int CalcoloPenaliDonorBloccaProcesso = 49;
|
||||
public static int CalcoloPenaliDonorSbloccaProcesso = 50;
|
||||
|
||||
public static int CalcoloPenaliRecipientAvviaProcesso = 51;
|
||||
public static int CalcoloPenaliRecipientBloccaProcesso = 52;
|
||||
public static int CalcoloPenaliRecipientSbloccaProcesso = 53;
|
||||
|
||||
public static int ReportIndennizziCliente = 54;
|
||||
public static int ReportMonitoraggioRifiutiBU = 55;
|
||||
public static int ReportMonitoraggioRifiutiCO = 56;
|
||||
public static int ReportRicorrenzaLineeMNP = 57;*/
|
||||
|
||||
// log Machine2Machine
|
||||
public static final int NotificaRichiestaDonor = 1001;
|
||||
public static final int NotificaRichiestaRecipient = 1002;
|
||||
public static final int NotificaRichiestaPorting = 1003;
|
||||
public static final int InvioFileSFTP = 1004;
|
||||
public static final int PrelievoFileSFTP = 1005;
|
||||
public static final int NotificaRichiestaTCDonor = 1006;
|
||||
public static final int NotificaRichiestaTCRecipient = 1007;
|
||||
public static final int NotificaRichiestaRecipientVirt = 1008;
|
||||
public static final int NotificaRichiestaDonorVirt = 1009;
|
||||
public static final int NotificaRichiestaRecVirtM2M = 1010;
|
||||
public static final int NotificaRichiestaTCDonorVirt = 1011;
|
||||
public static final int NotificaRichiestaTCRecipientVirt = 1012;
|
||||
public static final int NotificaRichiestaTCRecipientVirtM2M = 1013;
|
||||
|
||||
//log security
|
||||
public static final String LOG_CLIENT_APP_NAME = "DBCGO-WEB";
|
||||
public static final String LOG_RESULT_CODE_OK = "OK";
|
||||
public static final String LOG_RESULT_CODE_KO = "KO";
|
||||
public static final int LOG_RESULT_CODE_DETAIL_OK = 0;
|
||||
public static final int LOG_RESULT_CODE_DETAIL_KO = -1;
|
||||
|
||||
private ActionLogMapping() {};
|
||||
}
|
||||
@@ -0,0 +1,701 @@
|
||||
package it.valueteam.dbcgo.common;
|
||||
|
||||
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.charset.*;
|
||||
|
||||
public class CSVPrinter {
|
||||
|
||||
/**
|
||||
* If auto flushing is enabled.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
protected boolean autoFlush = true;
|
||||
|
||||
/**
|
||||
* If auto flushing is enabled.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
protected boolean alwaysQuote = false;
|
||||
|
||||
/**
|
||||
* true iff an error has occurred.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
protected boolean error = false;
|
||||
|
||||
/**
|
||||
* Delimiter character written.
|
||||
*
|
||||
* @since ostermillerutils 1.02.18
|
||||
*/
|
||||
protected char delimiterChar = ';';
|
||||
|
||||
/**
|
||||
* Quoting character written.
|
||||
*
|
||||
* @since ostermillerutils 1.02.18
|
||||
*/
|
||||
protected char quoteChar = '"';
|
||||
|
||||
/**
|
||||
* The place that the values get written.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
protected Writer out;
|
||||
|
||||
/**
|
||||
* True iff we just began a new line.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
protected boolean newLine = true;
|
||||
|
||||
/**
|
||||
* Character used to start comments. (Default is '#')
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
protected char commentStart = '#';
|
||||
|
||||
/**
|
||||
* Change this printer so that it uses a new delimiter.
|
||||
*
|
||||
* @param newDelimiter The new delimiter character to use.
|
||||
* @throws Exception if the character cannot be used as a delimiter.
|
||||
*
|
||||
* @author Pierre Dittgen <pierre dot dittgen at pass-tech dot fr>
|
||||
* @since ostermillerutils 1.02.18
|
||||
*/
|
||||
public void changeDelimiter(char newDelimiter) throws Exception {
|
||||
if (delimiterChar == newDelimiter) return; // no need to do anything.
|
||||
if (newDelimiter == '\n' || newDelimiter == '\r' ||
|
||||
newDelimiter == delimiterChar || newDelimiter == quoteChar){
|
||||
throw new Exception("Illegal delimiter");
|
||||
}
|
||||
delimiterChar = newDelimiter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Change this printer so that it uses a new character for quoting.
|
||||
*
|
||||
* @param newQuote The new character to use for quoting.
|
||||
* @throws Exception if the character cannot be used as a quote.
|
||||
*
|
||||
* @author Pierre Dittgen <pierre dot dittgen at pass-tech dot fr>
|
||||
* @since ostermillerutils 1.02.18
|
||||
*/
|
||||
public void changeQuote(char newQuote) throws Exception {
|
||||
if (newQuote == '\n' || newQuote == '\r' ||
|
||||
newQuote == delimiterChar || newQuote == quoteChar){
|
||||
throw new Exception("Illegal quote");
|
||||
}
|
||||
quoteChar = newQuote;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a printer that will print values to the given
|
||||
* stream. Character to byte conversion is done using
|
||||
* the default character encoding. Comments will be
|
||||
* written using the default comment character '#', the delimiter will
|
||||
* be the comma, the quote character will be double quotes,
|
||||
* quotes will be used when needed, and auto flushing
|
||||
* will be enabled.
|
||||
*
|
||||
* @param out stream to which to print.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public CSVPrinter(OutputStream out) {
|
||||
try {
|
||||
this.out = new OutputStreamWriter(out, "ISO-8859-1");
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
ex.printStackTrace();
|
||||
this.out = new OutputStreamWriter(out);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a printer that will print values to the given
|
||||
* stream. Comments will be
|
||||
* written using the default comment character '#', the delimiter will
|
||||
* be the comma, the quote character will be double quotes,
|
||||
* quotes will be used when needed, and auto flushing
|
||||
* will be enabled.
|
||||
*
|
||||
* @param out stream to which to print.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public CSVPrinter(Writer out){
|
||||
this.out = out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a printer that will print values to the given
|
||||
* stream. Character to byte conversion is done using
|
||||
* the default character encoding. The delimiter will
|
||||
* be the comma, the quote character will be double quotes,
|
||||
* quotes will be used when needed, and auto flushing
|
||||
* will be enabled.
|
||||
*
|
||||
* @param out stream to which to print.
|
||||
* @param commentStart Character used to start comments.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public CSVPrinter(OutputStream out, char commentStart){
|
||||
this(out);
|
||||
this.commentStart = commentStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a printer that will print values to the given
|
||||
* stream. The delimiter will
|
||||
* be the comma, the quote character will be double quotes,
|
||||
* quotes will be used when needed, and auto flushing
|
||||
* will be enabled.
|
||||
*
|
||||
* @param out stream to which to print.
|
||||
* @param commentStart Character used to start comments.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public CSVPrinter(Writer out, char commentStart){
|
||||
this(out);
|
||||
this.commentStart = commentStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a printer that will print values to the given
|
||||
* stream. The comment character will be the number sign, the delimiter will
|
||||
* be the comma, and the quote character will be double quotes.
|
||||
*
|
||||
* @param out stream to which to print.
|
||||
* @param alwaysQuote true if quotes should be used even when not strictly needed.
|
||||
* @param autoFlush should auto flushing be enabled.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public CSVPrinter(Writer out, boolean alwaysQuote, boolean autoFlush){
|
||||
this.out = out;
|
||||
setAlwaysQuote(alwaysQuote);
|
||||
setAutoFlush(autoFlush);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a printer that will print values to the given
|
||||
* stream. Quotes will be used when needed, and auto flushing
|
||||
* will be enabled.
|
||||
*
|
||||
* @param out stream to which to print.
|
||||
* @param commentStart Character used to start comments.
|
||||
* @param delimiter The new delimiter character to use.
|
||||
* @param quote The new character to use for quoting.
|
||||
* @throws Exception if the character cannot be used as a quote.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public CSVPrinter(Writer out, char commentStart, char quote, char delimiter) throws Exception {
|
||||
this.out = out;
|
||||
this.commentStart = commentStart;
|
||||
changeQuote(quote);
|
||||
changeDelimiter(delimiter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a printer that will print values to the given
|
||||
* stream.
|
||||
*
|
||||
* @param out stream to which to print.
|
||||
* @param commentStart Character used to start comments.
|
||||
* @param delimiter The new delimiter character to use.
|
||||
* @param quote The new character to use for quoting.
|
||||
* @param alwaysQuote true if quotes should be used even when not strictly needed.
|
||||
* @param autoFlush should auto flushing be enabled.
|
||||
* @throws Exception if the character cannot be used as a quote.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public CSVPrinter(Writer out, char commentStart, char quote, char delimiter, boolean alwaysQuote, boolean autoFlush) throws Exception {
|
||||
this.out = out;
|
||||
this.commentStart = commentStart;
|
||||
changeQuote(quote);
|
||||
changeDelimiter(delimiter);
|
||||
setAlwaysQuote(alwaysQuote);
|
||||
setAutoFlush(autoFlush);
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the string as the last value on the line. The value
|
||||
* will be quoted if needed.
|
||||
* <p>
|
||||
* This method never throws an I/O exception. The client may inquire as to whether
|
||||
* any errors have occurred by invoking checkError(). If an I/O Exception is
|
||||
* desired, the client should use the corresponding writeln method.
|
||||
*
|
||||
* @param value value to be outputted.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public void println(String value){
|
||||
try {
|
||||
writeln(value);
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the string as the last value on the line. The value
|
||||
* will be quoted if needed.
|
||||
*
|
||||
* @param value value to be outputted.
|
||||
* @throws IOException if an error occurs while writing.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void writeln(String value) throws IOException {
|
||||
try {
|
||||
write(value);
|
||||
writeln();
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
throw iox;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a blank line.
|
||||
* <p>
|
||||
* This method never throws an I/O exception. The client may inquire as to whether
|
||||
* any errors have occurred by invoking checkError(). If an I/O Exception is
|
||||
* desired, the client should use the corresponding writeln method.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public void println(){
|
||||
try {
|
||||
writeln();
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Output a blank line.
|
||||
*
|
||||
* @throws IOException if an error occurs while writing.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void writeln() throws IOException {
|
||||
try {
|
||||
out.write("\n");
|
||||
if (autoFlush) flush();
|
||||
newLine = true;
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
throw iox;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a single line of comma separated values.
|
||||
* The values will be quoted if needed. Quotes and
|
||||
* and other characters that need it will be escaped.
|
||||
* <p>
|
||||
* This method never throws an I/O exception. The client may inquire as to whether
|
||||
* any errors have occurred by invoking checkError(). If an I/O Exception is
|
||||
* desired, the client should use the corresponding writeln method.
|
||||
*
|
||||
* @param values values to be outputted.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public void println(String[] values){
|
||||
try {
|
||||
writeln(values);
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a single line of comma separated values.
|
||||
* The values will be quoted if needed. Quotes and
|
||||
* and other characters that need it will be escaped.
|
||||
*
|
||||
* @param values values to be outputted.
|
||||
* @throws IOException if an error occurs while writing.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void writeln(String[] values) throws IOException {
|
||||
try {
|
||||
print(values);
|
||||
writeln();
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
throw iox;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a single line of comma separated values.
|
||||
* The values will be quoted if needed. Quotes and
|
||||
* and other characters that need it will be escaped.
|
||||
* <p>
|
||||
* This method never throws an I/O exception. The client may inquire as to whether
|
||||
* any errors have occurred by invoking checkError(). If an I/O Exception is
|
||||
* desired, the client should use the corresponding writeln method.
|
||||
*
|
||||
* @param values values to be outputted.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public void print(String[] values){
|
||||
try {
|
||||
write(values);
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a single line of comma separated values.
|
||||
* The values will be quoted if needed. Quotes and
|
||||
* and other characters that need it will be escaped.
|
||||
*
|
||||
* @param values values to be outputted.
|
||||
* @throws IOException if an error occurs while writing.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void write(String[] values) throws IOException {
|
||||
try {
|
||||
for (int i=0; i<values.length; i++){
|
||||
write(values[i]);
|
||||
}
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
throw iox;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print several lines of comma separated values.
|
||||
* The values will be quoted if needed. Quotes and
|
||||
* newLine characters will be escaped.
|
||||
* <p>
|
||||
* This method never throws an I/O exception. The client may inquire as to whether
|
||||
* any errors have occurred by invoking checkError(). If an I/O Exception is
|
||||
* desired, the client should use the corresponding writeln method.
|
||||
*
|
||||
* @param values values to be outputted.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public void println(String[][] values){
|
||||
try {
|
||||
writeln(values);
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print several lines of comma separated values.
|
||||
* The values will be quoted if needed. Quotes and
|
||||
* newLine characters will be escaped.
|
||||
*
|
||||
* @param values values to be outputted.
|
||||
* @throws IOException if an error occurs while writing.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void writeln(String[][] values) throws IOException {
|
||||
try {
|
||||
for (int i=0; i<values.length; i++){
|
||||
writeln(values[i]);
|
||||
}
|
||||
if (values.length == 0){
|
||||
writeln();
|
||||
}
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
throw iox;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Put a comment among the comma separated values.
|
||||
* Comments will always begin on a new line and occupy a
|
||||
* least one full line. The character specified to star
|
||||
* comments and a space will be inserted at the beginning of
|
||||
* each new line in the comment. If the comment is null,
|
||||
* an empty comment is outputted.
|
||||
* <p>
|
||||
* This method never throws an I/O exception. The client may inquire as to whether
|
||||
* any errors have occurred by invoking checkError(). If an I/O Exception is
|
||||
* desired, the client should use the corresponding writelnComment method.
|
||||
*
|
||||
* @param comment the comment to output.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public void printlnComment(String comment){
|
||||
try {
|
||||
writelnComment(comment);
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Put a comment among the comma separated values.
|
||||
* Comments will always begin on a new line and occupy a
|
||||
* least one full line. The character specified to star
|
||||
* comments and a space will be inserted at the beginning of
|
||||
* each new line in the comment. If the comment is null,
|
||||
* an empty comment is outputted.
|
||||
*
|
||||
* @param comment the comment to output.
|
||||
* @throws IOException if an error occurs while writing.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void writelnComment(String comment) throws IOException {
|
||||
try {
|
||||
if (comment==null) comment = "";
|
||||
if (!newLine){
|
||||
writeln();
|
||||
}
|
||||
out.write(commentStart);
|
||||
out.write(' ');
|
||||
for (int i=0; i<comment.length(); i++){
|
||||
char c = comment.charAt(i);
|
||||
switch (c){
|
||||
case '\r': {
|
||||
if (i+1 < comment.length() && comment.charAt(i+1) == '\n'){
|
||||
i++;
|
||||
}
|
||||
} //break intentionally excluded.
|
||||
case '\n': {
|
||||
writeln();
|
||||
out.write(commentStart);
|
||||
out.write(' ');
|
||||
} break;
|
||||
default: {
|
||||
out.write(c);
|
||||
} break;
|
||||
}
|
||||
}
|
||||
writeln();
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
throw iox;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the string as the next value on the line. The value
|
||||
* will be quoted if needed. If value is null, an empty value is printed.
|
||||
* <p>
|
||||
* This method never throws an I/O exception. The client may inquire as to whether
|
||||
* any errors have occurred by invoking checkError(). If an I/O Exception is
|
||||
* desired, the client should use the corresponding println method.
|
||||
*
|
||||
* @param value value to be outputted.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
public void print(String value){
|
||||
try {
|
||||
write(value);
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the string as the next value on the line. The value
|
||||
* will be quoted if needed. If value is null, an empty value is printed.
|
||||
*
|
||||
* @param value value to be outputted.
|
||||
* @throws IOException if an error occurs while writing.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void write(String value) throws IOException {
|
||||
try {
|
||||
if (value == null || value.equalsIgnoreCase("NULL")) value = "";
|
||||
boolean quote = false;
|
||||
if (alwaysQuote){
|
||||
quote = true;
|
||||
} else if (value.length() > 0){
|
||||
char c = value.charAt(0);
|
||||
if (newLine && (c<'0' || (c>'9' && c<'A') || (c>'Z' && c<'a') || (c>'z'))){
|
||||
quote = true;
|
||||
}
|
||||
if (c==' ' || c=='\f' || c=='\t'){
|
||||
quote = true;
|
||||
}
|
||||
for (int i=0; i<value.length(); i++){
|
||||
c = value.charAt(i);
|
||||
if (c==quoteChar || c==delimiterChar || c=='\n' || c=='\r'){
|
||||
quote = true;
|
||||
}
|
||||
}
|
||||
if (c==' ' || c=='\f' || c=='\t'){
|
||||
quote = true;
|
||||
}
|
||||
} else if (newLine) {
|
||||
// always quote an empty token that is the first
|
||||
// on the line, as it may be the only thing on the
|
||||
// line. If it were not quoted in that case,
|
||||
// an empty line has no tokens.
|
||||
quote = true;
|
||||
}
|
||||
if (newLine){
|
||||
newLine = false;
|
||||
} else {
|
||||
out.write(delimiterChar);
|
||||
}
|
||||
if (quote){
|
||||
out.write(escapeAndQuote(value));
|
||||
} else {
|
||||
out.write(value);
|
||||
}
|
||||
if (autoFlush) flush();
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
throw iox;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enclose the value in quotes and escape the quote
|
||||
* and comma characters that are inside.
|
||||
*
|
||||
* @param value needs to be escaped and quoted
|
||||
* @return the value, escaped and quoted.
|
||||
*
|
||||
* @since ostermillerutils 1.00.00
|
||||
*/
|
||||
private String escapeAndQuote(String value){
|
||||
int count = 2;
|
||||
for (int i=0; i<value.length(); i++){
|
||||
char c = value.charAt(i);
|
||||
switch(c){
|
||||
case '\n': case '\r': case '\\': {
|
||||
count ++;
|
||||
} break;
|
||||
default: {
|
||||
if (c == quoteChar){
|
||||
count++;
|
||||
}
|
||||
} break;
|
||||
}
|
||||
}
|
||||
StringBuffer sb = new StringBuffer(value.length() + count);
|
||||
sb.append(quoteChar);
|
||||
for (int i=0; i<value.length(); i++){
|
||||
char c = value.charAt(i);
|
||||
switch(c){
|
||||
case '\n': {
|
||||
sb.append("\\n");
|
||||
} break;
|
||||
case '\r': {
|
||||
sb.append("\\r");
|
||||
} break;
|
||||
case '\\': {
|
||||
sb.append("\\\\");
|
||||
} break;
|
||||
default: {
|
||||
if (c == quoteChar){
|
||||
sb.append("\\" + quoteChar);
|
||||
} else {
|
||||
sb.append(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
sb.append(quoteChar);
|
||||
return (sb.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush any data written out to underlying streams.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void flush() throws IOException {
|
||||
out.flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* Close any underlying streams.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void close() throws IOException {
|
||||
out.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush the stream if it's not closed and check its error state.
|
||||
* Errors are cumulative; once the stream encounters an error,
|
||||
* this routine will return true on all successive calls.
|
||||
*
|
||||
* @return True if the print stream has encountered an error,
|
||||
* either on the underlying output stream or during a format conversion.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public boolean checkError(){
|
||||
try {
|
||||
if (error) return true;
|
||||
flush();
|
||||
if (error) return true;
|
||||
if (out instanceof PrintWriter){
|
||||
error = ((PrintWriter)out).checkError();
|
||||
}
|
||||
} catch (IOException iox){
|
||||
error = true;
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set flushing behavior. Iff set, a flush command
|
||||
* will be issued to any underlying stream after each
|
||||
* print or write command.
|
||||
*
|
||||
* @param autoFlush should auto flushing be enabled.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void setAutoFlush(boolean autoFlush){
|
||||
this.autoFlush = autoFlush;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether values printers should always be quoted, or
|
||||
* whether the printer may, at its discretion, omit quotes
|
||||
* around the value.
|
||||
*
|
||||
* @param alwaysQuote true if quotes should be used even when not strictly needed.
|
||||
*
|
||||
* @since ostermillerutils 1.02.26
|
||||
*/
|
||||
public void setAlwaysQuote(boolean alwaysQuote){
|
||||
this.alwaysQuote = alwaysQuote;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package it.valueteam.dbcgo.common;
|
||||
|
||||
public interface Key {
|
||||
|
||||
//data file parsing
|
||||
public static final String SRC_FILE_TYPE = "src.file.type";
|
||||
public static final String SRC_FILE_TYPE_FIXEDLENGTH = "fixedlength";
|
||||
public static final String SRC_FILE_LINE = "src.file.line";
|
||||
public static final String SRC_FILE_LINE_LENGTH = SRC_FILE_LINE + ".length";
|
||||
|
||||
//date format
|
||||
public static final String DATE_FORMAT = "dd/MM/yyyy";
|
||||
public static final String DATE_FORMAT_CSV = "ddMMyyyyHHmmss";
|
||||
public static final String DATE_FORMAT_XLS = "yyyyMM";
|
||||
public static final String DOWNLOAD_FILE_EXT = "csv";
|
||||
public static final String DOWNLOAD_FILE_EXT_XLS = "xls";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package it.valueteam.dbcgo.common;
|
||||
|
||||
/**
|
||||
* Interfaccia che deve essere implementata da tutti gli oggetti che intendono essere paginati
|
||||
* @author Giurlandama
|
||||
*
|
||||
*/
|
||||
public interface PagingObjectIF {
|
||||
|
||||
//paging type
|
||||
public static int FORWARD = 1;
|
||||
public static int BACKWARD = 2;
|
||||
|
||||
/**
|
||||
* Ritorna l'elemnto chiave per la paginazione
|
||||
* @return
|
||||
*/
|
||||
public String getPagingKey();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package it.valueteam.dbcgo.common;
|
||||
|
||||
public class ReportMap {
|
||||
|
||||
private ReportMap() {}
|
||||
|
||||
//ID REPORT
|
||||
public static String MNP_TIM_DONOR_DATI = "TDD";
|
||||
public static String MNP_TIM_DONOR_DATI_VIRT = "TDDV";
|
||||
public static String MNP_TIM_DONOR_DATI_RIFIUTI = "TDDR";
|
||||
public static String MNP_TIM_DONOR_DATI_RIFIUTI_VIRT = "TDDRV";
|
||||
public static final String CANALI_RECIPIENT = "CR";
|
||||
public static final String CANALI_RECIPIENT_VIRT = "CRV";
|
||||
public static final String DELIBERA_DONATING = "DD";
|
||||
public static final String DELIBERA_DONATING_VIRT = "DDV";
|
||||
public static final String MOBILITA_INTEROPERATORE = "MI";
|
||||
public static final String MOBILITA_INTEROPERATORE_VIRT = "MIV";
|
||||
public static final String MNP_TIM_CESSAZIONE_IN_OUT_DATI_IN = "TCDI";
|
||||
public static final String MNP_TIM_CESSAZIONE_IN_OUT_DATI_OUT = "TCDO" ;
|
||||
public static final String MNP_TIM_RECIPIENT_DATI = "TRD";
|
||||
public static final String MNP_TIM_RECIPIENT_DATI_VIRT = "TRDV";
|
||||
public static final String MNP_TIM_RECIPIENT_DATI_RIFIUTI = "TRDR";
|
||||
public static final String MNP_TIM_RECIPIENT_DATI_RIFIUTI_VIRT = "TRDRV";
|
||||
public static final String MNP_TIM_TERZA_PARTE_DATI = "TTPD";
|
||||
public static final String REPORT_MONITORAGGIO_RECIPIENT = "RMR";
|
||||
public static final String ATTIVAZIONE_MNP = "ATT";
|
||||
public static final String CESSAZIONE_MNP = "CES";
|
||||
|
||||
public static final String REPORT_BUSINESS_AREA = "BU";
|
||||
public static final char DELIMITER = ';';
|
||||
|
||||
//identificativi processi
|
||||
public static final String proc_DONOR = "D";
|
||||
public static final String proc_RECIPIENT = "R";
|
||||
public static final String proc_PORTING_IN = "P";
|
||||
public static final String proc_CESS = "C";
|
||||
public static final String proc_CESS_PORTING = "K";
|
||||
public static final String proc_PRJHOC_DONOR = "H";
|
||||
public static final String proc_PRJHOC_RECIPIENT = "O";
|
||||
public static final String proc_SCIVOLO_TACS = "S";
|
||||
public static final String proc_ANNULL_GR = "A";
|
||||
public static final String proc_VERIFICA_CESS = "Y";
|
||||
public static final String proc_MVNO2MVNO = "M";
|
||||
//MVNO
|
||||
public static final String proc_DONOR_VIRT = "V";
|
||||
public static final String proc_RECIPIENT_VIRT = "W";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
/*
|
||||
* Created on 2-dic-2003
|
||||
*
|
||||
*/
|
||||
package it.valueteam.dbcgo.common;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Date;
|
||||
import java.util.TimeZone;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.util.zip.*;
|
||||
|
||||
public class Utils {
|
||||
|
||||
static Logger logger = Logger.getLogger(Utils.class);
|
||||
|
||||
public static String getString(Date d, String format) {
|
||||
if (d == null)
|
||||
return null;
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||
return sdf.format(d);
|
||||
}
|
||||
|
||||
public static String getString(Date d) {
|
||||
return getString(d, Key.DATE_FORMAT);
|
||||
}
|
||||
|
||||
public static void copyFile(File src, File dst) throws FileNotFoundException, IOException {
|
||||
FileInputStream in = null;
|
||||
FileOutputStream out = null;
|
||||
try {
|
||||
in = new FileInputStream(src);
|
||||
out = new FileOutputStream(dst);
|
||||
byte[] buf = new byte[1024];
|
||||
int i = 0;
|
||||
while ((i = in.read(buf)) != -1) {
|
||||
out.write(buf, 0, i);
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
in.close();
|
||||
} catch (Exception e) {
|
||||
in = null;
|
||||
}
|
||||
try {
|
||||
out.close();
|
||||
} catch (Exception e) {
|
||||
out = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static String getFilenameWithoutExtension(String filename) {
|
||||
int i = filename.lastIndexOf(".");
|
||||
if (i >= 0)
|
||||
return filename.substring(0, i);
|
||||
else
|
||||
return filename;
|
||||
}
|
||||
|
||||
public static String getFilenameExtension(String filename) {
|
||||
int i = filename.lastIndexOf(".");
|
||||
if (i >= 0)
|
||||
return filename.substring(filename.lastIndexOf(".") + 1);
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void gunzip(File file) throws ZipException, IOException {
|
||||
int BUFFER = 2048;
|
||||
BufferedOutputStream dest = null;
|
||||
BufferedInputStream is = null;
|
||||
try {
|
||||
is = new BufferedInputStream(new GZIPInputStream(new FileInputStream(file)));
|
||||
int count;
|
||||
byte data[] = new byte[BUFFER];
|
||||
File out = new File(Utils.getFilenameWithoutExtension(file.getPath()));
|
||||
FileOutputStream fos = new FileOutputStream(out);
|
||||
dest = new BufferedOutputStream(fos, BUFFER);
|
||||
while ((count = is.read(data, 0, BUFFER)) != -1) {
|
||||
dest.write(data, 0, count);
|
||||
}
|
||||
dest.flush();
|
||||
} finally {
|
||||
try {
|
||||
dest.close();
|
||||
} catch (Exception e) {
|
||||
dest = null;
|
||||
}
|
||||
try {
|
||||
is.close();
|
||||
} catch (Exception e) {
|
||||
is = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void unzip(File file) throws ZipException, IOException {
|
||||
int BUFFER = 2048;
|
||||
BufferedOutputStream dest = null;
|
||||
BufferedInputStream is = null;
|
||||
try {
|
||||
ZipEntry entry;
|
||||
ZipFile zipfile = new ZipFile(file);
|
||||
Enumeration e = zipfile.entries();
|
||||
while (e.hasMoreElements()) {
|
||||
entry = (ZipEntry) e.nextElement();
|
||||
System.out.println("Extracting: " + entry);
|
||||
is = new BufferedInputStream(zipfile.getInputStream(entry));
|
||||
int count;
|
||||
byte data[] = new byte[BUFFER];
|
||||
FileOutputStream fos = new FileOutputStream(entry.getName());
|
||||
dest = new BufferedOutputStream(fos, BUFFER);
|
||||
while ((count = is.read(data, 0, BUFFER)) != -1) {
|
||||
dest.write(data, 0, count);
|
||||
}
|
||||
dest.flush();
|
||||
dest.close();
|
||||
is.close();
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
dest.close();
|
||||
} catch (Exception e) {
|
||||
dest = null;
|
||||
}
|
||||
try {
|
||||
is.close();
|
||||
} catch (Exception e) {
|
||||
is = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Trasforma una stringa secondo il formato passato in data. In caso di
|
||||
* errore di conversione viene lanciata un'eccezione.
|
||||
*/
|
||||
public static Date toDate(String d, String format) throws Exception {
|
||||
|
||||
if (d == null || d.trim().length() == 0)
|
||||
return null;
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||
sdf.setTimeZone(TimeZone.getTimeZone("ECT"));
|
||||
|
||||
Date data = null;
|
||||
|
||||
try {
|
||||
// Questo va bene lato client
|
||||
sdf.setLenient(false);
|
||||
data = sdf.parse(d);
|
||||
} catch (ParseException pEx) {
|
||||
// Questo lato server
|
||||
|
||||
/*************************************************************/
|
||||
/* Il problema <20> che, a quanto sembra, la JVM lato server */
|
||||
/* non converte correttamente le date pari al 29 febbraio di */
|
||||
/* un qualsiasi anno bisestile. (MS 14/11/2000) */
|
||||
/*************************************************************/
|
||||
sdf.setLenient(true);
|
||||
data = sdf.parse(d);
|
||||
|
||||
String tempStr = sdf.format(data);
|
||||
if (!d.equals(tempStr))
|
||||
throw pEx;
|
||||
}
|
||||
|
||||
if (data == null)
|
||||
throw new Exception("Formato della data non valido");
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
public static byte[] readFileToByteArray(File inputFile) {
|
||||
byte readBuf[] = new byte[512 * 1024];
|
||||
FileInputStream fin = null;
|
||||
ByteArrayOutputStream bout = null;
|
||||
try {
|
||||
fin = new FileInputStream(inputFile);
|
||||
bout = new ByteArrayOutputStream();
|
||||
int readCnt = fin.read(readBuf);
|
||||
while (0 < readCnt) {
|
||||
bout.write(readBuf, 0, readCnt);
|
||||
readCnt = fin.read(readBuf);
|
||||
}
|
||||
fin.close();
|
||||
|
||||
return bout.toByteArray();
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
} finally {
|
||||
if (fin != null) {
|
||||
try { fin.close(); } catch (IOException ioe) {}
|
||||
}
|
||||
if (bout != null) {
|
||||
try { bout.close(); } catch (IOException ioe) {}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* <p>Title: </p>
|
||||
* <p>Description: </p>
|
||||
* <p>Copyright: Copyright (c) 2006</p>
|
||||
* <p>Company: ValueTeam </p>
|
||||
* @author Mario Giurlanda
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class AccordoDAO extends ProfiloTariffarioDAO {
|
||||
public AccordoDAO(DataSource ds) {
|
||||
super(ds);
|
||||
this.tableName = "DBCGO_ACCORDO";
|
||||
|
||||
this.viewName = "DBCGO_ACCORDO_V";
|
||||
|
||||
this.fieldsName = new String[] {
|
||||
"SISTEMA_MITTENTE",
|
||||
"COD_ACCORDO",
|
||||
"DESC_ACCORDO",
|
||||
"TIPO_CLIENTE"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
/*
|
||||
* Created on 27-set-05
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.service.ServiceLocator;
|
||||
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.Types;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class BaseDAO {
|
||||
|
||||
private static final String ALL_MVIEW_REFRESH_TIMES_QUERY = "SELECT * FROM ALL_MVIEW_REFRESH_TIMES WHERE NAME = ?";
|
||||
protected DataSource ds = null;
|
||||
static Logger logger = Logger.getLogger(BaseDAO.class);
|
||||
|
||||
|
||||
public BaseDAO(DataSource ds) {
|
||||
this.ds = ds;
|
||||
}
|
||||
|
||||
public BaseDAO() throws Exception {
|
||||
this.ds = ServiceLocator.getInstance().getDataSource();
|
||||
}
|
||||
|
||||
protected Connection getConnection() throws SQLException {
|
||||
|
||||
Connection conn = ds.getConnection();
|
||||
return conn;
|
||||
}
|
||||
|
||||
/**
|
||||
* Metodo per la chiusura del ResultSet,dello Statement e della Connection
|
||||
* tale metodo non lancia eccezzioni (con una z sola gnurant)
|
||||
* @param rs
|
||||
* @param stmt
|
||||
* @param c
|
||||
*/
|
||||
protected void closeAll(
|
||||
ResultSet rs,
|
||||
Statement stmt,
|
||||
Connection c) {
|
||||
|
||||
try {
|
||||
if (rs != null)
|
||||
rs.close();
|
||||
} catch (Throwable ex) {
|
||||
;
|
||||
}
|
||||
try {
|
||||
if (stmt != null)
|
||||
stmt.close();
|
||||
} catch (Throwable ex) {
|
||||
;
|
||||
}
|
||||
try {
|
||||
if (c != null)
|
||||
c.close();
|
||||
} catch (Throwable ex) {
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
protected java.sql.Date utilToSql(java.util.Date utilDate) {
|
||||
java.sql.Date sqlDate = null;
|
||||
if (utilDate != null) {
|
||||
sqlDate = new java.sql.Date(utilDate.getTime());
|
||||
}
|
||||
return sqlDate;
|
||||
}
|
||||
|
||||
public int update(String s, Statement st) throws SQLException {
|
||||
logger.info(s);
|
||||
int r = 0;
|
||||
r = st.executeUpdate(s);
|
||||
return r;
|
||||
}
|
||||
|
||||
//esegue una stored procedure con un parametro di ritorno di tipo number
|
||||
//la stringa s deve contenere il ? al posto del param di ritorno
|
||||
//ad es: s="DWHT.LOAD_DWHT_VOLUMI_AOM('filename',?)"
|
||||
public int callStoredProcedureWithReturnParam(String s) throws SQLException {
|
||||
logger.info(s);
|
||||
Connection conn = null;
|
||||
CallableStatement st = null;
|
||||
int ret=0;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.prepareCall ("{call " + s + "}");
|
||||
st.registerOutParameter (1, Types.INTEGER);
|
||||
st.execute ();
|
||||
ret = st.getInt (1);
|
||||
}
|
||||
finally {
|
||||
closeAll(null,st,conn);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
protected String getSelectFields(String[] field, String table) {
|
||||
|
||||
String s = "select " + table + "." + field[0];
|
||||
for (int i = 1; i < field.length; i++)
|
||||
s = s + "," + table + "." + field[i];
|
||||
return s;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Ritorna la data di ultimo aggiornamento di una MV il cui nome è passato in input
|
||||
* @param mvName
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Date getLastUpdate(String mvName) throws Exception {
|
||||
Connection conn = null;
|
||||
PreparedStatement st = null;
|
||||
ResultSet rs = null;
|
||||
Date lastUpdate = null;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.prepareStatement(ALL_MVIEW_REFRESH_TIMES_QUERY);
|
||||
st.setString(1, mvName);
|
||||
rs = st.executeQuery();
|
||||
if (rs.next()) {
|
||||
lastUpdate = rs.getDate("LAST_REFRESH");
|
||||
}
|
||||
} finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return lastUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Count delle righe della tabella.
|
||||
* @param String nomeTabella
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public int rowCount(String nomeTabella) {
|
||||
Connection conn = null;
|
||||
PreparedStatement st = null;
|
||||
ResultSet rs = null;
|
||||
String query = "SELECT count(*) as count FROM " + nomeTabella;
|
||||
int rowcount = 0;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.prepareStatement(query);
|
||||
rs = st.executeQuery();
|
||||
if (rs.next()) {
|
||||
rowcount = rs.getInt("count");
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
logger.error("ERRORE IN BASEDAO rowCount(): Query = >" + query
|
||||
+ "< ERRORE" + ex.getMessage());
|
||||
} finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return rowcount;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Created on 13-set-05
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
|
||||
public class BaseReqDAO extends BaseDAO {
|
||||
|
||||
protected BaseReqDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
public int countByRequestID(String sql, String id_richiesta) throws SQLException {
|
||||
|
||||
int count = 0;
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sql);
|
||||
pstmt.setString(1, id_richiesta);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
count = rs.getInt(1);
|
||||
}
|
||||
}
|
||||
/*catch(SQLException sqle)
|
||||
{
|
||||
sqle.printStackTrace();
|
||||
throw sqle;
|
||||
}*/
|
||||
finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
public Timestamp getTimestampByRequestID(String sql, String id_richiesta) throws
|
||||
SQLException {
|
||||
|
||||
Timestamp ts = null;
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sql);
|
||||
pstmt.setString(1, id_richiesta);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
ts = rs.getTimestamp(1);
|
||||
}
|
||||
}
|
||||
/* catch(SQLException sqle)
|
||||
{
|
||||
sqle.printStackTrace();
|
||||
throw sqle;
|
||||
}*/
|
||||
finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
|
||||
return ts;
|
||||
}
|
||||
|
||||
public int getStateByRequestID(String sql, String id_richiesta) throws
|
||||
SQLException {
|
||||
|
||||
int state = -1;
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sql);
|
||||
pstmt.setString(1, id_richiesta);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
state = rs.getInt(1);
|
||||
}
|
||||
} finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
/**
|
||||
* C.P.
|
||||
* Ritorna il state type(attivo,finale positivo,finale negativo)
|
||||
* per la richiesta in questione
|
||||
* @param id_richiesta String
|
||||
* @throws SQLException
|
||||
* @return int
|
||||
*/
|
||||
public int getStateType(String sql, int stato) throws SQLException {
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
int stateType = -1;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sql);
|
||||
pstmt.setInt(1, stato);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
stateType = rs.getInt(1);
|
||||
} else
|
||||
throw new RuntimeException("Unable to check state type.");
|
||||
} finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
return stateType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
public class CanaleAcqVendita extends Entity{
|
||||
|
||||
public CanaleAcqVendita() {
|
||||
|
||||
fieldsValue= new String[CanaleAcqVenditaDAO.FIELDCOUNT];
|
||||
}
|
||||
|
||||
public String getCOD_CANALE_VENDITA() {
|
||||
return getFieldValue(CanaleAcqVenditaDAO.COD_CANALE_VENDITA);
|
||||
}
|
||||
public void setCOD_CANALE_VENDITA(String value) {
|
||||
setFieldValue(CanaleAcqVenditaDAO.COD_CANALE_VENDITA, value);
|
||||
}
|
||||
public String getDESC_CAN() {
|
||||
return getFieldValue(CanaleAcqVenditaDAO.DESC_CAN);
|
||||
}
|
||||
public void setDESC_CAN(String value) {
|
||||
setFieldValue(CanaleAcqVenditaDAO.DESC_CAN, value);
|
||||
}
|
||||
public String getTIPO_CLIENTE() {
|
||||
return getFieldValue(CanaleAcqVenditaDAO.TIPO_CLIENTE);
|
||||
}
|
||||
public void setTIPO_CLIENTE(String value) {
|
||||
setFieldValue(CanaleAcqVenditaDAO.TIPO_CLIENTE, value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.common.Utils;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class CanaleAcqVenditaDAO extends BaseDAO{
|
||||
static Logger logger = Logger.getLogger(CanaleAcqVenditaDAO.class);
|
||||
|
||||
public static final int COD_CANALE_VENDITA = 0;
|
||||
public static final int DESC_CAN = 1;
|
||||
public static final int TIPO_CLIENTE = 2;
|
||||
|
||||
|
||||
public static final int FIELDCOUNT = 3;
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"COD_CANALE_VENDITA",
|
||||
"DESC_CAN",
|
||||
"TIPO_CLIENTE"
|
||||
|
||||
};
|
||||
|
||||
public static final String tableName = "DBCGO_ANAG_CANALE_VENDITA";
|
||||
|
||||
public CanaleAcqVenditaDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
public static int getFieldIndex(String fieldName) {
|
||||
|
||||
for (int i = 0; i < FIELDCOUNT; i++) {
|
||||
if (fieldsName[i].equals(fieldName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public List selectAll() throws SQLException{
|
||||
|
||||
String s = "select " +
|
||||
fieldsName[COD_CANALE_VENDITA] + "," +
|
||||
fieldsName[DESC_CAN] + "," +
|
||||
fieldsName[TIPO_CLIENTE] +
|
||||
" from " + tableName;
|
||||
|
||||
|
||||
return select(s);
|
||||
|
||||
}
|
||||
|
||||
private List select(String s) throws SQLException {
|
||||
|
||||
logger.debug(s);
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
List l = new Vector();
|
||||
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(s);
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
while (rs.next()) {
|
||||
CanaleAcqVendita item = new CanaleAcqVendita();
|
||||
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
|
||||
int j = getFieldIndex(rsmd.getColumnName(i));
|
||||
if (j != -1) {
|
||||
String columType = rsmd.getColumnTypeName(i);
|
||||
if (columType.equalsIgnoreCase("DATE"))
|
||||
item.setFieldValue(j, Utils.getString((java.util.Date) rs.getDate(i)));
|
||||
else
|
||||
item.setFieldValue(j, rs.getString(i));
|
||||
}
|
||||
}
|
||||
l.add(item);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
closeAll(rs,st,conn);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.common.CSVPrinter;
|
||||
import it.valueteam.dbcgo.common.Utils;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
public class DaoUtils {
|
||||
|
||||
/**
|
||||
* Scrive l'OutputStream in input con il contenuto del ResultSet separando
|
||||
* i campi di ogni record con il delimiter
|
||||
* @param st - Result Set
|
||||
* @param os - Output Strem
|
||||
* @param delimiter - delimitatore da utilizzare es: ',' o ';'
|
||||
* @param columnsAsLables - true se deve essere aggiunto l'elenco dei nomi delle colonne come intestazione
|
||||
* @throws Exception
|
||||
*/
|
||||
public static int writeCSV(ResultSet rs, OutputStream os, char delimiter, boolean columnsAsLables, List notColumn) throws Exception {
|
||||
|
||||
int bufferDim = 512*1024;
|
||||
double bufferThreshold = 0.9 ; //%
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream(bufferDim);
|
||||
CSVPrinter printer = new CSVPrinter(baos);
|
||||
printer.changeDelimiter(delimiter);
|
||||
int k = 0;
|
||||
|
||||
try {
|
||||
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
|
||||
//intestazioni colonne
|
||||
String[] labelList = getColumnNames(rsmd, notColumn);
|
||||
printer.writeln(labelList);
|
||||
|
||||
while (rs.next()) {
|
||||
//array con lo stesso ordine delle label
|
||||
String[] rowStr = getArrayFromResultSet(rs,rsmd, notColumn);
|
||||
//DonorRequest dr = getDonorRequestFromResultSet(rs, rsmd);
|
||||
printer.writeln(rowStr);
|
||||
k++;
|
||||
|
||||
//flush del buffer prima che sia pieno
|
||||
//il motivo è che l'accesso allo stream è lento quindi bisogna ottimizzare la scrittura
|
||||
if (baos.size() > bufferDim * bufferThreshold){
|
||||
os.write(baos.toByteArray());
|
||||
//logger.debug("writed out " + k + " donor request (" + baos.size() + " byte)");
|
||||
baos.reset();
|
||||
}
|
||||
|
||||
}
|
||||
baos.flush();
|
||||
os.write(baos.toByteArray());
|
||||
//logger.debug("writed out " + k + " donor request (" + baos.size() + " byte)");
|
||||
}
|
||||
catch (SQLException e) {
|
||||
throw e;
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
if (baos!=null) {
|
||||
try {
|
||||
baos.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
baos=null;
|
||||
}
|
||||
}
|
||||
|
||||
return k;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Ritrona la row attuale del rs come array di stringhe
|
||||
* @param rs
|
||||
* @param rsmd
|
||||
* @param columnToExclude - elenco delle eventuali colonne da escludere
|
||||
* @return
|
||||
* @throws SQLException
|
||||
*/
|
||||
public static String[] getArrayFromResultSet(ResultSet rs, ResultSetMetaData rsmd, List columnToExclude) throws SQLException {
|
||||
String[] s = new String[rsmd.getColumnCount()- columnToExclude.size()];
|
||||
int j = 0;
|
||||
for (int i = 0; i < rsmd.getColumnCount(); i++) {
|
||||
if (columnToExclude != null && columnToExclude.contains(rsmd.getColumnName(i+1))){
|
||||
continue;
|
||||
}else{
|
||||
String columType = rsmd.getColumnTypeName(i+1);
|
||||
if (columType.equalsIgnoreCase("DATE")){
|
||||
s[j] = Utils.getString((java.util.Date) rs.getDate(i+1));
|
||||
j++;
|
||||
}
|
||||
else{
|
||||
s[j] = rs.getString(i+1);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ritorna un vettore contenente l'elenco dei nomi delle colonne
|
||||
* @param rsmd
|
||||
* @param columnToExclude - elenco delle eventuali colonne da escludere
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String[] getColumnNames(ResultSetMetaData rsmd, List columnToExclude) throws Exception {
|
||||
String[] labelList = new String[rsmd.getColumnCount() - columnToExclude.size()];
|
||||
int j=0;
|
||||
for (int i = 0; i < rsmd.getColumnCount(); i++) {
|
||||
if (columnToExclude != null && columnToExclude.contains(rsmd.getColumnName(i+1))){
|
||||
continue;
|
||||
}else{
|
||||
labelList[j] = rsmd.getColumnName(i+1);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
return labelList;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.hb.dao.BaseHibernateDAO;
|
||||
import org.hibernate.Query;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: SeiditaNi
|
||||
* Date: 06/06/12
|
||||
* Time: 14.48
|
||||
*/
|
||||
public class DbcgoSequenceDAO extends BaseHibernateDAO {
|
||||
|
||||
/**
|
||||
* Restituisce il valore corrente della sequence indicata
|
||||
* @param sequence
|
||||
* @return
|
||||
*/
|
||||
public Long getCurrValue(String sequence) {
|
||||
Query query = getSession().createSQLQuery("select "+sequence+".currval from dual");
|
||||
Long key = new Long(((BigDecimal) query.uniqueResult()).longValue());
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Restituisce il valore corrente+1 della sequence.
|
||||
* @param sequence
|
||||
* @return
|
||||
*/
|
||||
public Long getNextValue(String sequence) {
|
||||
Query query = getSession().createSQLQuery("select "+sequence+".nextval from dual");
|
||||
Long key = new Long(((BigDecimal) query.uniqueResult()).longValue());
|
||||
return key;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,182 @@
|
||||
/*
|
||||
* Created on 27-set-05
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import it.valueteam.dbcgo.dao.BaseDAO;
|
||||
import it.valueteam.dbcgo.sync.dto.DonorReqDTO;
|
||||
import it.valueteam.dbcgo.sync.dto.RecipientVirtReqDTO;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author Giovanni
|
||||
*
|
||||
* To change the template for this generated type comment go to
|
||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
public class DbmAnagDAO
|
||||
extends BaseDAO {
|
||||
|
||||
static Logger logger = Logger.getLogger(DbmAnagDAO.class);
|
||||
|
||||
public DbmAnagDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
|
||||
String sqlSelectMarcaggioByMsisdn =
|
||||
"SELECT " +
|
||||
"COD_MAR, " +
|
||||
"COD_CLU, " +
|
||||
"OT_LEGALE, " +
|
||||
"OT_GEO " +
|
||||
"FROM " +
|
||||
"DBM_LT_INF " +
|
||||
"WHERE " +
|
||||
"NUMTEL = ? ";
|
||||
|
||||
String sqlCountMarcaggioByMsisdn =
|
||||
" SELECT COUNT(*) " +
|
||||
" FROM DBM_LT_INF " +
|
||||
" WHERE NUMTEL = ? ";
|
||||
|
||||
|
||||
|
||||
public int countByMsisdn(DonorReqDTO dto)
|
||||
throws SQLException {
|
||||
|
||||
int count=0;
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
String msisdn = dto.msisdn;
|
||||
if (msisdn.startsWith("39"))
|
||||
msisdn = msisdn.substring(2);
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlCountMarcaggioByMsisdn);
|
||||
pstmt.setString(1,msisdn);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
count=rs.getInt(1);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public void getMarcaggioByMsisdn(DonorReqDTO dto)
|
||||
throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
String msisdn = dto.msisdn;
|
||||
if (msisdn.startsWith("39"))
|
||||
msisdn = msisdn.substring(2);
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
//pstmt = c.prepareStatement(sqlSelectMarcaggioByRequestId);
|
||||
pstmt = new LoggableStatement(c, sqlSelectMarcaggioByMsisdn);
|
||||
|
||||
pstmt.setString(1,msisdn);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing query: "+
|
||||
((LoggableStatement)pstmt).getQueryString());
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
//COD_MAR, COD_CLU, OT_LEGALE, OT_GEO
|
||||
dto.marcaggio = rs.getString("COD_MAR");
|
||||
dto.sottoMarcaggio = rs.getString("COD_CLU");
|
||||
dto.nomeOtLeg = rs.getString("OT_LEGALE");
|
||||
dto.nomeOtGeo = rs.getString("OT_GEO");
|
||||
}
|
||||
}
|
||||
finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
* @throws SQLException
|
||||
*/
|
||||
public int countByMsisdn(RecipientVirtReqDTO dto) throws SQLException {
|
||||
|
||||
int count = 0;
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
String msisdn = dto.getMsisdn();
|
||||
if (msisdn.startsWith("39"))
|
||||
msisdn = msisdn.substring(2);
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlCountMarcaggioByMsisdn);
|
||||
pstmt.setString(1, msisdn);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
count = rs.getInt(1);
|
||||
}
|
||||
} finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public void getMarcaggioByMsisdn(RecipientVirtReqDTO dto)
|
||||
throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
String msisdn = dto.getMsisdn();
|
||||
if (msisdn.startsWith("39"))
|
||||
msisdn = msisdn.substring(2);
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
//pstmt = c.prepareStatement(sqlSelectMarcaggioByRequestId);
|
||||
pstmt = new LoggableStatement(c, sqlSelectMarcaggioByMsisdn);
|
||||
|
||||
pstmt.setString(1,msisdn);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing query: "+
|
||||
((LoggableStatement)pstmt).getQueryString());
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
//COD_MAR, COD_CLU, OT_LEGALE, OT_GEO
|
||||
dto.setMarcaggio(rs.getString("COD_MAR"));
|
||||
dto.setSottomarcaggio(rs.getString("COD_CLU"));
|
||||
dto.setNomeOtLeg(rs.getString("OT_LEGALE"));
|
||||
dto.setNomeOtGeo(rs.getString("OT_GEO"));
|
||||
}
|
||||
}
|
||||
finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,719 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.sync.dto.DonorReqDTO;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
import javax.sql.DataSource;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class DonorReqDAO extends BaseReqDAO {
|
||||
|
||||
static Logger logger = Logger.getLogger(DonorReqDAO.class);
|
||||
|
||||
public DonorReqDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
String sqlInsertReq =
|
||||
"INSERT INTO DBCGO_GESTIONE_RICHIESTA( " +
|
||||
"TIMESTAMP, " + //1
|
||||
"ID_RICHIESTA, " +
|
||||
"STATO, " +
|
||||
"TIPO_CLIENTE, " +
|
||||
"DATA_CUT_OVER_CALC, " +//5
|
||||
"DATA_VALIDAZIONE_MAX, " +
|
||||
"DATARICEZIONERICHIESTA, " +
|
||||
"DATA_CUT_OVER, " +
|
||||
"DATA_TRANSIZIONE_STATO, " +
|
||||
"CODICE_RIFIUTO_VALIDAZIONE, " +//10
|
||||
"CODICE_OPERATORE_DONATING, " +
|
||||
"CODICE_OPERATORE_RECIPIENT, " +
|
||||
"MSISDN, " +
|
||||
"CODICE_FISCALE_PARTITA_IVA, " +
|
||||
"CODICE_PRE_POST_PAGATO, " +
|
||||
"NOME_CLIENTE, " +
|
||||
"COGNOME_CLIENTE, " +
|
||||
"RAGIONE_SOCIALE, " +
|
||||
"RICHIESTAADHOCAOM, " +
|
||||
"RICHIESTAADHOC, " +//20
|
||||
"MARCAGGIO, " +
|
||||
"SOTTOMARCAGGIO, " +
|
||||
"CODICE_GRUPPO, " +
|
||||
"ICCD_SERIAL_NUMBER, " +
|
||||
"IMSI, " +
|
||||
"IPOTESI_RIFIUTO," +
|
||||
"NOME_OT_GEO," +
|
||||
"NOME_OT_LEG," +
|
||||
"NUMERO_DOCUMENTO, " +
|
||||
"TIPO_DOCUMENTO, " +//30
|
||||
"INSERT_DATE, " +
|
||||
"UPDATE_DATE, " +
|
||||
"DATA_TRANSIZIONE_STATO_GRP, " +
|
||||
" STATO_LINEA, " +
|
||||
" FLAG_TC, " +
|
||||
"DATA_PRESA_IN_CARICO, " +
|
||||
"CODICE_OPERATORE_V_DONOR, " +
|
||||
"CODICE_OPERATORE_V_RECIPIENT," +
|
||||
"PREVALIDAZIONE, " +
|
||||
"FLAG_PREVALIDAZIONE, " +//40
|
||||
"FLAG_FURTO, " + //41
|
||||
"ABBONATO_PREPAGATO, " + //44
|
||||
"ESITO_CAS, " +
|
||||
"DESCRIZIONE_ESITO_GISP, "+
|
||||
"DATA_VALIDAZIONE_EFFETTIVA, " +
|
||||
"DATA_CUT_OVER_EFF, "+
|
||||
"FLAG_ESP, " +
|
||||
"BUSINESS_ID, "+
|
||||
"CODICE_ISTAT "+
|
||||
" ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
|
||||
String sqlUpdateReqByRequestId =
|
||||
"UPDATE DBCGO_GESTIONE_RICHIESTA SET " +
|
||||
"TIMESTAMP = ?, " +
|
||||
"STATO = ?, " +
|
||||
"TIPO_CLIENTE = ?, " +
|
||||
"DATA_CUT_OVER_CALC = ?, " +
|
||||
"DATA_VALIDAZIONE_MAX = ?, " +
|
||||
"DATARICEZIONERICHIESTA = ?, " +
|
||||
"DATA_CUT_OVER = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO = ?, " +
|
||||
"CODICE_RIFIUTO_VALIDAZIONE = ?, " +
|
||||
"CODICE_OPERATORE_DONATING= ?, " +
|
||||
"CODICE_OPERATORE_RECIPIENT = ?, " +
|
||||
"MSISDN = ?, " +
|
||||
"CODICE_FISCALE_PARTITA_IVA = ?, " +
|
||||
"CODICE_PRE_POST_PAGATO = ?, " +
|
||||
"NOME_CLIENTE = ?, " +
|
||||
"COGNOME_CLIENTE = ?, " +
|
||||
"RAGIONE_SOCIALE = ?, " +
|
||||
"RICHIESTAADHOCAOM = ?, " +
|
||||
"RICHIESTAADHOC = ?, " +
|
||||
"MARCAGGIO = ?, " +
|
||||
"SOTTOMARCAGGIO = ?, " +
|
||||
"CODICE_GRUPPO = ?, " +
|
||||
"ICCD_SERIAL_NUMBER = ?, " +
|
||||
"IMSI = ?, " +
|
||||
"IPOTESI_RIFIUTO = ?, " +
|
||||
"NOME_OT_GEO = ?, " +
|
||||
"NOME_OT_LEG = ?, " +
|
||||
"NUMERO_DOCUMENTO = ?, " +
|
||||
"TIPO_DOCUMENTO = ?, " +
|
||||
"UPDATE_DATE = ?, " +
|
||||
"STATO_LINEA = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO_GRP = ?, " +
|
||||
"FLAG_TC = ?, " +
|
||||
"DATA_PRESA_IN_CARICO = ?, " +
|
||||
"CODICE_OPERATORE_V_DONOR = ?, " +
|
||||
"CODICE_OPERATORE_V_RECIPIENT = ? ," +
|
||||
"PREVALIDAZIONE = ? ," +
|
||||
"FLAG_PREVALIDAZIONE = ? ," +
|
||||
"FLAG_FURTO = ? ," +
|
||||
"ABBONATO_PREPAGATO = ? , " +
|
||||
"ESITO_CAS = ? ," +
|
||||
"DESCRIZIONE_ESITO_GISP = ?, " +
|
||||
"DATA_VALIDAZIONE_EFFETTIVA = ?, " +
|
||||
"DATA_CUT_OVER_EFF = ?, "+
|
||||
"FLAG_ESP = ?, " +
|
||||
"BUSINESS_ID=?, "+
|
||||
"CODICE_ISTAT=? "+
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlUpdateReqButNotStateGrpByRequestId =
|
||||
"UPDATE DBCGO_GESTIONE_RICHIESTA SET " +
|
||||
"TIMESTAMP = ?, " +
|
||||
"STATO = ?, " +
|
||||
"TIPO_CLIENTE = ?, " +
|
||||
"DATA_CUT_OVER_CALC = ?, " +
|
||||
"DATA_VALIDAZIONE_MAX = ?, " +
|
||||
"DATARICEZIONERICHIESTA = ?, " +
|
||||
"DATA_CUT_OVER = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO = ?, " +
|
||||
"CODICE_RIFIUTO_VALIDAZIONE = ?, " +
|
||||
"CODICE_OPERATORE_DONATING= ?, " +
|
||||
"CODICE_OPERATORE_RECIPIENT = ?, " +
|
||||
"MSISDN = ?, " +
|
||||
"CODICE_FISCALE_PARTITA_IVA = ?, " +
|
||||
"CODICE_PRE_POST_PAGATO = ?, " +
|
||||
"NOME_CLIENTE = ?, " +
|
||||
"COGNOME_CLIENTE = ?, " +
|
||||
"RAGIONE_SOCIALE = ?, " +
|
||||
"RICHIESTAADHOCAOM = ?, " +
|
||||
"RICHIESTAADHOC = ?, " +
|
||||
"MARCAGGIO = ?, " +
|
||||
"SOTTOMARCAGGIO = ?, " +
|
||||
"CODICE_GRUPPO = ?, " +
|
||||
"ICCD_SERIAL_NUMBER = ?, " +
|
||||
"IMSI = ?, " +
|
||||
"IPOTESI_RIFIUTO = ?, " +
|
||||
"NOME_OT_GEO = ?, " +
|
||||
"NOME_OT_LEG = ?, " +
|
||||
"NUMERO_DOCUMENTO = ?, " +
|
||||
"TIPO_DOCUMENTO = ?, " +
|
||||
"UPDATE_DATE = ?, " +
|
||||
"STATO_LINEA = ?, "+
|
||||
"FLAG_TC = ?, " +
|
||||
"DATA_PRESA_IN_CARICO = ?, " +
|
||||
"CODICE_OPERATORE_V_DONOR = ?, " +
|
||||
"CODICE_OPERATORE_V_RECIPIENT = ? ," +
|
||||
"PREVALIDAZIONE = ?, " +
|
||||
"FLAG_PREVALIDAZIONE = ?, " +
|
||||
"FLAG_FURTO = ?, " +
|
||||
"ABBONATO_PREPAGATO = ? , " +
|
||||
"ESITO_CAS = ? ," +
|
||||
"DESCRIZIONE_ESITO_GISP = ?, " +
|
||||
"DATA_VALIDAZIONE_EFFETTIVA = ?, " +
|
||||
"DATA_CUT_OVER_EFF = ?, "+
|
||||
"FLAG_ESP = ?, " +
|
||||
"BUSINESS_ID=?, "+
|
||||
"CODICE_ISTAT=? "+
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlUpdateReqCOByRequestId =
|
||||
"UPDATE DBCGO_GESTIONE_RICHIESTA SET " +
|
||||
"TIMESTAMP = ?, " +
|
||||
"STATO = ?, " +
|
||||
"TIPO_CLIENTE = ?, " +
|
||||
"DATA_CUT_OVER_CALC = ?, " +
|
||||
"DATA_VALIDAZIONE_MAX = ?, " +
|
||||
"DATARICEZIONERICHIESTA = ?, " +
|
||||
"DATA_CUT_OVER = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO = ?, " +
|
||||
"CODICE_RIFIUTO_VALIDAZIONE = ?, " +
|
||||
"CODICE_OPERATORE_DONATING = ?, " +
|
||||
"CODICE_OPERATORE_RECIPIENT = ?, " +
|
||||
"MSISDN = ?, " +
|
||||
"CODICE_FISCALE_PARTITA_IVA = ?, " +
|
||||
"CODICE_PRE_POST_PAGATO = ?, " +
|
||||
"NOME_CLIENTE = ?, " +
|
||||
"COGNOME_CLIENTE = ?, " +
|
||||
"RAGIONE_SOCIALE = ?, " +
|
||||
"RICHIESTAADHOCAOM = ?, " +
|
||||
"RICHIESTAADHOC = ?, " +
|
||||
"CODICE_GRUPPO = ?, " +
|
||||
"ICCD_SERIAL_NUMBER = ?, " +
|
||||
"IMSI = ?, " +
|
||||
"IPOTESI_RIFIUTO = ?, " +
|
||||
"NUMERO_DOCUMENTO = ?, " +
|
||||
"TIPO_DOCUMENTO = ?, " +
|
||||
"UPDATE_DATE = ?, " +
|
||||
"STATO_LINEA = ?, "+
|
||||
"DATA_TRANSIZIONE_STATO_GRP = ?, " +
|
||||
"FLAG_TC = ?, " +
|
||||
"DATA_PRESA_IN_CARICO = ?, " +
|
||||
"CODICE_OPERATORE_V_DONOR = ?, " +
|
||||
"CODICE_OPERATORE_V_RECIPIENT = ? ," +
|
||||
"PREVALIDAZIONE = ?, " +
|
||||
"FLAG_PREVALIDAZIONE = ?, " +
|
||||
"FLAG_FURTO = ?, " +
|
||||
"ABBONATO_PREPAGATO = ? , " +
|
||||
"ESITO_CAS = ? ," +
|
||||
"DESCRIZIONE_ESITO_GISP = ?, " +
|
||||
"DATA_VALIDAZIONE_EFFETTIVA = ?, " +
|
||||
"DATA_CUT_OVER_EFF = ?, "+
|
||||
"FLAG_ESP = ?, " +
|
||||
"BUSINESS_ID=?, "+
|
||||
"CODICE_ISTAT=? "+
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlUpdateReqCOButNotStateGrpByRequestId =
|
||||
"UPDATE DBCGO_GESTIONE_RICHIESTA SET " +
|
||||
"TIMESTAMP = ?, " +
|
||||
"STATO = ?, " +
|
||||
"TIPO_CLIENTE = ?, " +
|
||||
"DATA_CUT_OVER_CALC = ?, " +
|
||||
"DATA_VALIDAZIONE_MAX = ?, " +
|
||||
"DATARICEZIONERICHIESTA = ?, " +
|
||||
"DATA_CUT_OVER = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO = ?, " +
|
||||
"CODICE_RIFIUTO_VALIDAZIONE = ?, " +
|
||||
"CODICE_OPERATORE_DONATING = ?, " +
|
||||
"CODICE_OPERATORE_RECIPIENT = ?, " +
|
||||
"MSISDN = ?, " +
|
||||
"CODICE_FISCALE_PARTITA_IVA = ?, " +
|
||||
"CODICE_PRE_POST_PAGATO = ?, " +
|
||||
"NOME_CLIENTE = ?, " +
|
||||
"COGNOME_CLIENTE = ?, " +
|
||||
"RAGIONE_SOCIALE = ?, " +
|
||||
"RICHIESTAADHOCAOM = ?, " +
|
||||
"RICHIESTAADHOC = ?, " +
|
||||
"CODICE_GRUPPO = ?, " +
|
||||
"ICCD_SERIAL_NUMBER = ?, " +
|
||||
"IMSI = ?, " +
|
||||
"IPOTESI_RIFIUTO = ?, " +
|
||||
"NUMERO_DOCUMENTO = ?, " +
|
||||
"TIPO_DOCUMENTO = ?, " +
|
||||
"UPDATE_DATE = ?, " +
|
||||
"STATO_LINEA = ?, " +
|
||||
"FLAG_TC = ?, " +
|
||||
"DATA_PRESA_IN_CARICO = ?, " +
|
||||
"CODICE_OPERATORE_V_DONOR = ?, " +
|
||||
"CODICE_OPERATORE_V_RECIPIENT = ? ," +
|
||||
"PREVALIDAZIONE = ? ," +
|
||||
"FLAG_PREVALIDAZIONE = ? ," +
|
||||
"FLAG_FURTO = ?, " +
|
||||
"ABBONATO_PREPAGATO = ? , " +
|
||||
"ESITO_CAS = ? ," +
|
||||
"DESCRIZIONE_ESITO_GISP = ?, " +
|
||||
"DATA_VALIDAZIONE_EFFETTIVA = ?, " +
|
||||
"DATA_CUT_OVER_EFF = ?, "+
|
||||
"FLAG_ESP = ?, " +
|
||||
"BUSINESS_ID=?, "+
|
||||
"CODICE_ISTAT=? "+
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlUpdateMarcaggioByRequestId =
|
||||
"UPDATE DBCGO_GESTIONE_RICHIESTA SET " +
|
||||
"MARCAGGIO = ?, " +
|
||||
"SOTTOMARCAGGIO = ?, " +
|
||||
"NOME_OT_GEO = ?, " +
|
||||
"NOME_OT_LEG = ?, " +
|
||||
"UPDATE_DATE = ? " +
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
|
||||
String sqlCountReqByRequestId =
|
||||
" SELECT COUNT(ID_RICHIESTA) " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlLoadTimestampReqByRequestId =
|
||||
" SELECT TIMESTAMP " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlLoadStateReqByRequestId =
|
||||
" SELECT STATO " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlLoadByRequestId =
|
||||
" SELECT TIMESTAMP,STATO " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlIsStateGrpChanged =
|
||||
"select a.id_stato_grp - b.id_stato_grp ischanged " +
|
||||
"from dbcgo_stato a, dbcgo_stato b " +
|
||||
"where a.id_stato=? " +
|
||||
"and b.id_stato=? ";
|
||||
|
||||
String sqlGetStateType =
|
||||
"SELECT stato_type "+
|
||||
"FROM dbcgo_stato "+
|
||||
"where id_stato= ?";
|
||||
|
||||
|
||||
public int countByRequestID(String id_richiesta) throws SQLException {
|
||||
return super.countByRequestID(sqlCountReqByRequestId, id_richiesta);
|
||||
}
|
||||
|
||||
public Timestamp getTimestampByRequestID(String id_richiesta) throws SQLException {
|
||||
return super.getTimestampByRequestID(sqlLoadTimestampReqByRequestId, id_richiesta);
|
||||
}
|
||||
|
||||
public int getStateByRequestID(String id_richiesta) throws SQLException {
|
||||
return super.getStateByRequestID(sqlLoadStateReqByRequestId, id_richiesta);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Inserts donor request based on passed dto
|
||||
* @param dto
|
||||
* @throws SQLException
|
||||
*/
|
||||
public void insertRequest(DonorReqDTO dto) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
LoggableStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = new LoggableStatement(c, sqlInsertReq);
|
||||
|
||||
//SET start
|
||||
Date now = new Date();
|
||||
|
||||
pstmt.setTimestamp(1,dto.timestamp);
|
||||
pstmt.setString(2,dto.idRichiesta);
|
||||
pstmt.setInt(3,dto.stato);
|
||||
pstmt.setString(4,dto.tipoCliente);
|
||||
pstmt.setDate(5,utilToSql(dto.dataCutOverCalc));
|
||||
pstmt.setDate(6,utilToSql(dto.dataValidazioneMax));
|
||||
pstmt.setDate(7,utilToSql(dto.dataRicezioneRichiesta));
|
||||
pstmt.setDate(8,utilToSql(dto.dataCutOver));
|
||||
pstmt.setDate(9,utilToSql(dto.dataTransizioneStato));
|
||||
pstmt.setString(10,dto.codiceRifiutoValidazione);
|
||||
pstmt.setString(11,dto.codiceOperatoreDonating);
|
||||
pstmt.setString(12,dto.codiceOperatoreRecipient);
|
||||
pstmt.setString(13,dto.msisdn);
|
||||
pstmt.setString(14,dto.codiceFiscalePartitaIva);
|
||||
pstmt.setString(15,dto.codicePrePostPagato);
|
||||
pstmt.setString(16,dto.nomeCliente);
|
||||
pstmt.setString(17,dto.cognomeCliente);
|
||||
pstmt.setString(18,dto.ragioneSociale);
|
||||
pstmt.setString(19,dto.richiestaAdHocAom);
|
||||
pstmt.setString(20,dto.richiestaAdHoc);
|
||||
pstmt.setString(21,dto.marcaggio);
|
||||
pstmt.setString(22,dto.sottoMarcaggio);
|
||||
pstmt.setString(23,dto.codiceGruppo);
|
||||
pstmt.setString(24,dto.iccdSerialNumber);
|
||||
pstmt.setString(25,dto.imsi);
|
||||
pstmt.setInt(26,dto.ipotesiRifiuto);
|
||||
pstmt.setString(27,dto.nomeOtGeo);
|
||||
pstmt.setString(28,dto.nomeOtLeg);
|
||||
pstmt.setString(29,dto.numeroDocumento);
|
||||
pstmt.setString(30,dto.tipoDocumento);
|
||||
pstmt.setDate(31,new java.sql.Date(now.getTime()));
|
||||
pstmt.setDate(32,new java.sql.Date(now.getTime()));
|
||||
pstmt.setDate(33,utilToSql(dto.dataTransizioneStato));
|
||||
pstmt.setString(34,dto.statoLineaGisp);
|
||||
pstmt.setString(35,dto.flagTrasferimentoCredito);
|
||||
pstmt.setDate(36,utilToSql(dto.dataPresaInCarico));
|
||||
pstmt.setString(37,isOperatoreVirtuale(dto.codiceOperatoreDonating, dto.codiceOperatoreDonEffettivo));
|
||||
pstmt.setString(38,isOperatoreVirtuale(dto.codiceOperatoreRecipient, dto.codiceOperatoreRecEffettivo));
|
||||
pstmt.setString(39,dto.prevalidazione);
|
||||
pstmt.setString(40,dto.flagPrevalidazione);
|
||||
pstmt.setString(41,dto.flagFurto);
|
||||
pstmt.setString(42,dto.abbonatoPrepagato);
|
||||
pstmt.setString(43, dto.esitoCas);
|
||||
pstmt.setString(44, dto.descrizioneEsitoGisp);
|
||||
//kit aprile 2012
|
||||
pstmt.setDate(45,utilToSql(dto.data_validazione_eff));
|
||||
pstmt.setDate(46,utilToSql(dto.data_cut_over_eff));
|
||||
pstmt.setInt(47, dto.flagEsp);
|
||||
pstmt.setString(48, dto.businessId);
|
||||
pstmt.setString(49, dto.codiceIstat);
|
||||
|
||||
//
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing query: "+ ((LoggableStatement)pstmt).getQueryString());
|
||||
|
||||
pstmt.execute();
|
||||
}
|
||||
finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Updates Marcaggio fileds only based on passed DonorReqDTO dto
|
||||
* @param dto
|
||||
* @throws SQLException
|
||||
*/
|
||||
public void updateMarcaggio(DonorReqDTO dto) throws SQLException {
|
||||
|
||||
//sqlUpdateMarcaggioByRequestId
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
//pstmt = c.prepareStatement(sqlUpdateMarcaggioByRequestId);
|
||||
pstmt = new LoggableStatement(c, sqlUpdateMarcaggioByRequestId);
|
||||
|
||||
//SET start
|
||||
Date now = new Date();
|
||||
|
||||
pstmt.setString(1,dto.marcaggio);
|
||||
pstmt.setString(2,dto.sottoMarcaggio);
|
||||
pstmt.setString(3,dto.nomeOtGeo);
|
||||
pstmt.setString(4,dto.nomeOtLeg);
|
||||
pstmt.setDate(5,new java.sql.Date(now.getTime()));
|
||||
|
||||
pstmt.setString(6,dto.idRichiesta);
|
||||
//SET end
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing update: "+ ((LoggableStatement)pstmt).getQueryString());
|
||||
|
||||
pstmt.execute();
|
||||
} finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates DonroRequest based on passed DonorReqDTO dto
|
||||
* @param dto
|
||||
* @throws SQLException
|
||||
*/
|
||||
public void updateRequest(DonorReqDTO dto) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
if (dto.dataTransizioneStatoGrp == null)
|
||||
pstmt = new LoggableStatement(c, sqlUpdateReqButNotStateGrpByRequestId);
|
||||
else
|
||||
pstmt = new LoggableStatement(c, sqlUpdateReqByRequestId);
|
||||
|
||||
//SET start
|
||||
Date now = new Date();
|
||||
pstmt.setTimestamp(1,dto.timestamp);
|
||||
pstmt.setInt(2,dto.stato);
|
||||
pstmt.setString(3,dto.tipoCliente);
|
||||
pstmt.setDate(4,utilToSql(dto.dataCutOverCalc));
|
||||
pstmt.setDate(5,utilToSql(dto.dataValidazioneMax));
|
||||
pstmt.setDate(6,utilToSql(dto.dataRicezioneRichiesta));
|
||||
pstmt.setDate(7,utilToSql(dto.dataCutOver));
|
||||
pstmt.setDate(8,utilToSql(dto.dataTransizioneStato));
|
||||
pstmt.setString(9,dto.codiceRifiutoValidazione);
|
||||
pstmt.setString(10,dto.codiceOperatoreDonating);
|
||||
pstmt.setString(11,dto.codiceOperatoreRecipient);
|
||||
pstmt.setString(12,dto.msisdn);
|
||||
pstmt.setString(13,dto.codiceFiscalePartitaIva);
|
||||
pstmt.setString(14,dto.codicePrePostPagato);
|
||||
pstmt.setString(15,dto.nomeCliente);
|
||||
pstmt.setString(16,dto.cognomeCliente);
|
||||
pstmt.setString(17,dto.ragioneSociale);
|
||||
pstmt.setString(18,dto.richiestaAdHocAom);
|
||||
pstmt.setString(19,dto.richiestaAdHoc);
|
||||
pstmt.setString(20,dto.marcaggio);
|
||||
pstmt.setString(21,dto.sottoMarcaggio);
|
||||
pstmt.setString(22,dto.codiceGruppo);
|
||||
pstmt.setString(23,dto.iccdSerialNumber);
|
||||
pstmt.setString(24,dto.imsi);
|
||||
pstmt.setInt(25,dto.ipotesiRifiuto);
|
||||
pstmt.setString(26,dto.nomeOtGeo);
|
||||
pstmt.setString(27,dto.nomeOtLeg);
|
||||
pstmt.setString(28,dto.numeroDocumento);
|
||||
pstmt.setString(29,dto.tipoDocumento);
|
||||
pstmt.setDate(30,new java.sql.Date(now.getTime()));
|
||||
pstmt.setString(31,dto.statoLineaGisp);
|
||||
if (dto.dataTransizioneStatoGrp == null){
|
||||
pstmt.setString(32,dto.flagTrasferimentoCredito);
|
||||
pstmt.setDate(33,utilToSql(dto.dataPresaInCarico));
|
||||
pstmt.setString(34,isOperatoreVirtuale(dto.codiceOperatoreDonating, dto.codiceOperatoreDonEffettivo));
|
||||
pstmt.setString(35,isOperatoreVirtuale(dto.codiceOperatoreRecipient, dto.codiceOperatoreRecEffettivo));
|
||||
pstmt.setString(36, dto.prevalidazione);
|
||||
pstmt.setString(37,dto.flagPrevalidazione);
|
||||
pstmt.setString(38,dto.flagFurto);
|
||||
pstmt.setString(39,dto.abbonatoPrepagato);
|
||||
pstmt.setString(40,dto.esitoCas);
|
||||
pstmt.setString(41,dto.descrizioneEsitoGisp);
|
||||
//kit aprile 2012
|
||||
pstmt.setDate(42,utilToSql(dto.data_validazione_eff));
|
||||
pstmt.setDate(43,utilToSql(dto.data_cut_over_eff));
|
||||
pstmt.setInt(44, dto.flagEsp);
|
||||
pstmt.setString(45, dto.businessId);
|
||||
//
|
||||
pstmt.setString(46, dto.codiceIstat);
|
||||
|
||||
pstmt.setString(47, dto.idRichiesta);
|
||||
|
||||
} else {
|
||||
pstmt.setDate(32, utilToSql(dto.dataTransizioneStatoGrp));
|
||||
pstmt.setString(33,dto.flagTrasferimentoCredito);
|
||||
pstmt.setDate(34,utilToSql(dto.dataPresaInCarico));
|
||||
pstmt.setString(35,isOperatoreVirtuale(dto.codiceOperatoreDonating, dto.codiceOperatoreDonEffettivo));
|
||||
pstmt.setString(36,isOperatoreVirtuale(dto.codiceOperatoreRecipient, dto.codiceOperatoreRecEffettivo));
|
||||
pstmt.setString(37, dto.prevalidazione);
|
||||
pstmt.setString(38,dto.flagPrevalidazione);
|
||||
pstmt.setString(39,dto.flagFurto);
|
||||
pstmt.setString(40,dto.abbonatoPrepagato);
|
||||
pstmt.setString(41,dto.esitoCas);
|
||||
pstmt.setString(42,dto.descrizioneEsitoGisp);
|
||||
//kit aprile 2012
|
||||
pstmt.setDate(43,utilToSql(dto.data_validazione_eff));
|
||||
pstmt.setDate(44,utilToSql(dto.data_cut_over_eff));
|
||||
pstmt.setInt(45, dto.flagEsp);
|
||||
pstmt.setString(46, dto.businessId);
|
||||
//
|
||||
pstmt.setString(47, dto.codiceIstat);
|
||||
|
||||
pstmt.setString(48, dto.idRichiesta);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing update: "+ ((LoggableStatement)pstmt).getQueryString());
|
||||
|
||||
pstmt.execute();
|
||||
|
||||
} finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates DonroRequest except the "marcaggio" fields (marc, sottomarc, ot_leg, ot_geo)
|
||||
* @param dto
|
||||
* @throws SQLException
|
||||
*/
|
||||
public void updateRequestCO(DonorReqDTO dto) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
|
||||
if (dto.dataTransizioneStatoGrp == null) {
|
||||
pstmt = new LoggableStatement(c, sqlUpdateReqCOButNotStateGrpByRequestId);
|
||||
} else {
|
||||
pstmt = new LoggableStatement(c, sqlUpdateReqCOByRequestId);
|
||||
}
|
||||
|
||||
//SET start
|
||||
Date now = new Date();
|
||||
pstmt.setTimestamp(1,dto.timestamp);
|
||||
pstmt.setInt(2,dto.stato);
|
||||
pstmt.setString(3,dto.tipoCliente);
|
||||
pstmt.setDate(4,utilToSql(dto.dataCutOverCalc));
|
||||
pstmt.setDate(5,utilToSql(dto.dataValidazioneMax));
|
||||
pstmt.setDate(6,utilToSql(dto.dataRicezioneRichiesta));
|
||||
pstmt.setDate(7,utilToSql(dto.dataCutOver));
|
||||
pstmt.setDate(8,utilToSql(dto.dataTransizioneStato));
|
||||
pstmt.setString(9,dto.codiceRifiutoValidazione);
|
||||
pstmt.setString(10,dto.codiceOperatoreDonating);
|
||||
pstmt.setString(11,dto.codiceOperatoreRecipient);
|
||||
pstmt.setString(12,dto.msisdn);
|
||||
pstmt.setString(13,dto.codiceFiscalePartitaIva);
|
||||
pstmt.setString(14,dto.codicePrePostPagato);
|
||||
pstmt.setString(15,dto.nomeCliente);
|
||||
pstmt.setString(16,dto.cognomeCliente);
|
||||
pstmt.setString(17,dto.ragioneSociale);
|
||||
pstmt.setString(18,dto.richiestaAdHocAom);
|
||||
pstmt.setString(19,dto.richiestaAdHoc);
|
||||
pstmt.setString(20,dto.codiceGruppo);
|
||||
pstmt.setString(21,dto.iccdSerialNumber);
|
||||
pstmt.setString(22,dto.imsi);
|
||||
pstmt.setInt(23,dto.ipotesiRifiuto);
|
||||
pstmt.setString(24,dto.numeroDocumento);
|
||||
pstmt.setString(25,dto.tipoDocumento);
|
||||
pstmt.setDate(26,new java.sql.Date(now.getTime()));
|
||||
pstmt.setString(27,dto.statoLineaGisp);
|
||||
if (dto.dataTransizioneStatoGrp == null) {
|
||||
pstmt.setString(28,dto.flagTrasferimentoCredito);
|
||||
pstmt.setDate(29,utilToSql(dto.dataPresaInCarico));
|
||||
pstmt.setString(30,isOperatoreVirtuale(dto.codiceOperatoreDonating, dto.codiceOperatoreDonEffettivo));
|
||||
pstmt.setString(31,isOperatoreVirtuale(dto.codiceOperatoreRecipient, dto.codiceOperatoreRecEffettivo));
|
||||
pstmt.setString(32,dto.prevalidazione);
|
||||
pstmt.setString(33,dto.flagPrevalidazione);
|
||||
pstmt.setString(34,dto.flagFurto);
|
||||
pstmt.setString(35,dto.abbonatoPrepagato);
|
||||
pstmt.setString(36,dto.esitoCas);
|
||||
pstmt.setString(37,dto.descrizioneEsitoGisp);
|
||||
//kit aprile 2012
|
||||
pstmt.setDate(38,utilToSql(dto.data_validazione_eff));
|
||||
pstmt.setDate(39,utilToSql(dto.data_cut_over_eff));
|
||||
pstmt.setInt(40, dto.flagEsp);
|
||||
pstmt.setString(41, dto.businessId);
|
||||
//
|
||||
pstmt.setString(42,dto.codiceIstat);
|
||||
|
||||
pstmt.setString(43,dto.idRichiesta);
|
||||
} else{
|
||||
pstmt.setDate(28, utilToSql(dto.dataTransizioneStatoGrp));
|
||||
pstmt.setString(29,dto.flagTrasferimentoCredito);
|
||||
pstmt.setDate(30,utilToSql(dto.dataPresaInCarico));
|
||||
pstmt.setString(31,isOperatoreVirtuale(dto.codiceOperatoreDonating, dto.codiceOperatoreDonEffettivo));
|
||||
pstmt.setString(32,isOperatoreVirtuale(dto.codiceOperatoreRecipient, dto.codiceOperatoreRecEffettivo));
|
||||
pstmt.setString(33,dto.prevalidazione);
|
||||
pstmt.setString(34,dto.flagPrevalidazione);
|
||||
pstmt.setString(35,dto.flagFurto);
|
||||
pstmt.setString(36,dto.abbonatoPrepagato);
|
||||
pstmt.setString(37,dto.esitoCas);
|
||||
pstmt.setString(38,dto.descrizioneEsitoGisp);
|
||||
//kit aprile 2012
|
||||
pstmt.setDate(39,utilToSql(dto.data_validazione_eff));
|
||||
pstmt.setDate(40,utilToSql(dto.data_cut_over_eff));
|
||||
pstmt.setInt(41, dto.flagEsp);
|
||||
pstmt.setString(42, dto.businessId);
|
||||
//
|
||||
pstmt.setString(43,dto.codiceIstat);
|
||||
|
||||
pstmt.setString(44,dto.idRichiesta);
|
||||
}
|
||||
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing update: " + ((LoggableStatement)pstmt).getQueryString());
|
||||
|
||||
pstmt.execute();
|
||||
|
||||
} finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isStateGrpChanged(int stateOld, int stateNew) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
boolean isChanged = true;
|
||||
int res = 0;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlIsStateGrpChanged);
|
||||
pstmt.setInt(1, stateOld);
|
||||
pstmt.setInt(2, stateNew);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
res = rs.getInt(1);
|
||||
} else
|
||||
throw new RuntimeException("Unable to check state group.");
|
||||
|
||||
if (res == 0) isChanged = false;
|
||||
} finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
return isChanged;
|
||||
}
|
||||
|
||||
public DonorReqDTO getByRequestId(String requestId) throws SQLException {
|
||||
//estrae solo i dati che servono
|
||||
|
||||
DonorReqDTO dr = new DonorReqDTO();
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlLoadByRequestId);
|
||||
pstmt.setString(1, requestId);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
dr.timestamp = rs.getTimestamp(1);
|
||||
dr.stato = rs.getInt(2);
|
||||
} else
|
||||
throw new RuntimeException("Unable to retrieve donor request with id " + requestId);
|
||||
} finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
return dr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ritorna il state type(attivo,finale positivo,finale negativo)
|
||||
* per la richiesta in questione
|
||||
* @param id_richiesta String
|
||||
* @throws SQLException
|
||||
* @return int
|
||||
*/
|
||||
public int getStateType(int stato) throws SQLException {
|
||||
return super.getStateType(sqlGetStateType,stato);
|
||||
}
|
||||
|
||||
private String isOperatoreVirtuale(String codOperatore, String codOperatoreEffettivo){
|
||||
if(codOperatore.equalsIgnoreCase(codOperatoreEffettivo)){
|
||||
return null;
|
||||
} else {
|
||||
return codOperatoreEffettivo;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,194 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.sync.dto.DonorTCReqDTO;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class DonorTCReqDAO extends BaseReqDAO {
|
||||
|
||||
static Logger logger = Logger.getLogger(RecipientTCReqDAO.class);
|
||||
|
||||
public DonorTCReqDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
String sqlInsertTCReq =
|
||||
"INSERT INTO DBCGO_GESTIONE_RICHIESTA_TC(" +
|
||||
"ID_RICHIESTA, " +
|
||||
"DATA_NOTIFICA_CREDITO, " +
|
||||
"ORA_NOTIFICA_CREDITO, " +
|
||||
"STATO, " +
|
||||
"IMPORTO, " +
|
||||
"NOME_FILE_AOM, " +
|
||||
"DATA_TRANSIZIONE_STATO, " +
|
||||
"DATA_ORA_MODIFICA, "+
|
||||
"FLAG_VERIFICA_CREDITO_ANOMALO "+
|
||||
") VALUES (" +
|
||||
"?,?,?,?,?,?,?,?,?)";
|
||||
|
||||
String sqlUpdateTCReqByIdRichiesta =
|
||||
"UPDATE DBCGO_GESTIONE_RICHIESTA_TC SET " +
|
||||
"DATA_NOTIFICA_CREDITO = ?, " +
|
||||
"ORA_NOTIFICA_CREDITO = ?, " +
|
||||
"STATO = ?, " +
|
||||
"IMPORTO = ?, " +
|
||||
"NOME_FILE_AOM = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO = ?, " +
|
||||
"DATA_ORA_MODIFICA = ?, " +
|
||||
"FLAG_VERIFICA_CREDITO_ANOMALO=? "+
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlCountTCReqByIdRichiesta =
|
||||
"SELECT COUNT(ID_RICHIESTA) " +
|
||||
"FROM DBCGO_GESTIONE_RICHIESTA_TC " +
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlLoadTCRequestByIdRichiesta =
|
||||
"SELECT ID_RICHIESTA, DATA_NOTIFICA_CREDITO, ORA_NOTIFICA_CREDITO, STATO, IMPORTO, "+
|
||||
" NOME_FILE_AOM, DATA_TRANSIZIONE_STATO, DATA_ORA_MODIFICA , FLAG_VERIFICA_CREDITO_ANOMALO " +
|
||||
"FROM DBCGO_GESTIONE_RICHIESTA_TC " +
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
/*
|
||||
// non utilizzata
|
||||
String sqlLoadDataTransizioneStatoTCReqByIdRichiesta =
|
||||
"SELECT DATA_TRANSIZIONE_STATO " +
|
||||
"FROM DBCGO_GESTIONE_RICHIESTA_TC " +
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
*/
|
||||
|
||||
public void insertRequest(DonorTCReqDTO aDonorTCReqDTO) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = new LoggableStatement(c, sqlInsertTCReq);
|
||||
|
||||
pstmt.setString(1, aDonorTCReqDTO.getIdRichiesta());
|
||||
pstmt.setDate(2, utilToSql(aDonorTCReqDTO.getDataNotificaCredito()));
|
||||
pstmt.setString(3, aDonorTCReqDTO.getOraNotificaCredito());
|
||||
pstmt.setInt(4, aDonorTCReqDTO.getStato().intValue());
|
||||
pstmt.setFloat(5, aDonorTCReqDTO.getImporto().floatValue());
|
||||
pstmt.setString(6, aDonorTCReqDTO.getNomeFileAOM());
|
||||
pstmt.setDate(7, new java.sql.Date(aDonorTCReqDTO.getDataTransizioneStato().getTime()));
|
||||
pstmt.setTimestamp(8, aDonorTCReqDTO.getDataOraModifica());
|
||||
if (aDonorTCReqDTO.getFlagVerificaCreditoAnomalo()!=null)
|
||||
pstmt.setLong(9, aDonorTCReqDTO.getFlagVerificaCreditoAnomalo().longValue());
|
||||
else
|
||||
pstmt.setLong(9, 0);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing query: "+ ((LoggableStatement)pstmt).getQueryString());
|
||||
pstmt.execute();
|
||||
|
||||
} finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateRequest(DonorTCReqDTO aDonorTCReqDTO) throws SQLException {
|
||||
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
connection = getConnection();
|
||||
pstmt = new LoggableStatement(connection, sqlUpdateTCReqByIdRichiesta);
|
||||
|
||||
pstmt.setDate(1, utilToSql(aDonorTCReqDTO.getDataNotificaCredito()));
|
||||
pstmt.setString(2, aDonorTCReqDTO.getOraNotificaCredito());
|
||||
pstmt.setInt(3, aDonorTCReqDTO.getStato().intValue());
|
||||
pstmt.setFloat(4, aDonorTCReqDTO.getImporto().floatValue());
|
||||
pstmt.setString(5, aDonorTCReqDTO.getNomeFileAOM());
|
||||
pstmt.setDate(6, new java.sql.Date(aDonorTCReqDTO.getDataTransizioneStato().getTime()));
|
||||
pstmt.setTimestamp(7, aDonorTCReqDTO.getDataOraModifica());
|
||||
pstmt.setLong(8, aDonorTCReqDTO.getFlagVerificaCreditoAnomalo().longValue());
|
||||
pstmt.setString(9, aDonorTCReqDTO.getIdRichiesta());
|
||||
|
||||
pstmt.execute();
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing update: " + ((LoggableStatement)pstmt).getQueryString());
|
||||
|
||||
} finally {
|
||||
closeAll(rs,pstmt,connection);
|
||||
}
|
||||
}
|
||||
|
||||
public int getNumeroRichiesteById(String idRichiesta) throws SQLException {
|
||||
return super.countByRequestID(sqlCountTCReqByIdRichiesta, idRichiesta);
|
||||
}
|
||||
|
||||
|
||||
public DonorTCReqDTO getRichiestaById(String idRichiesta) throws SQLException {
|
||||
|
||||
DonorTCReqDTO aDonorTCReqDTO = new DonorTCReqDTO();
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
connection = getConnection();
|
||||
pstmt = connection.prepareStatement(sqlLoadTCRequestByIdRichiesta);
|
||||
pstmt.setString(1, idRichiesta);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
aDonorTCReqDTO.setIdRichiesta(rs.getString(1));
|
||||
aDonorTCReqDTO.setDataNotificaCredito(rs.getDate(2));
|
||||
aDonorTCReqDTO.setOraNotificaCredito(rs.getString(3));
|
||||
aDonorTCReqDTO.setStato(new Integer(rs.getInt(4)));
|
||||
aDonorTCReqDTO.setImporto(new Float(rs.getFloat(5)));
|
||||
aDonorTCReqDTO.setNomeFileAOM(rs.getString(6));
|
||||
aDonorTCReqDTO.setDataTransizioneStato(rs.getTimestamp(7));
|
||||
aDonorTCReqDTO.setDataOraModifica(rs.getTimestamp(8));
|
||||
aDonorTCReqDTO.setFlagVerificaCreditoAnomalo(new Long(rs.getInt(9)));
|
||||
}
|
||||
} finally {
|
||||
closeAll(rs, pstmt, connection);
|
||||
}
|
||||
return aDonorTCReqDTO;
|
||||
}
|
||||
|
||||
/*
|
||||
// forse non serve
|
||||
public Date getDataTransizioneStatoById(String idRichiesta) throws SQLException {
|
||||
|
||||
Date dataTransizioneStato = null;
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
connection = getConnection();
|
||||
pstmt = connection.prepareStatement(sqlLoadDataTransizioneStatoTCReqByIdRichiesta);
|
||||
pstmt.setString(1, idRichiesta);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
dataTransizioneStato = rs.getDate(1);
|
||||
}
|
||||
} finally {
|
||||
closeAll(rs, pstmt, connection);
|
||||
}
|
||||
return dataTransizioneStato;
|
||||
}
|
||||
*/
|
||||
|
||||
public java.sql.Date utilToSql(java.util.Date utilDate) {
|
||||
java.sql.Date sqlDate = null;
|
||||
|
||||
if (utilDate != null) {
|
||||
sqlDate = new java.sql.Date(utilDate.getTime());
|
||||
}
|
||||
return sqlDate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
public class DwhtVolumiAom extends Entity {
|
||||
|
||||
public DwhtVolumiAom() {
|
||||
fieldsValue= new String[DwhtVolumiAomDAO.FIELDCOUNT];
|
||||
}
|
||||
|
||||
public String getMSISDN() {
|
||||
return getFieldValue(DwhtVolumiAomDAO.MSISDN);
|
||||
}
|
||||
public void setMSISDN(String value) {
|
||||
setFieldValue(DwhtVolumiAomDAO.MSISDN, value);
|
||||
}
|
||||
public String getCODICE_OPERATORE() {
|
||||
return getFieldValue(DwhtVolumiAomDAO.CODICE_OPERATORE);
|
||||
}
|
||||
public void setCODICE_OPERATORE(String value) {
|
||||
setFieldValue(DwhtVolumiAomDAO.CODICE_OPERATORE, value);
|
||||
}
|
||||
public String getNC() {
|
||||
return getFieldValue(DwhtVolumiAomDAO.NC);
|
||||
}
|
||||
public void setNC(String value) {
|
||||
setFieldValue(DwhtVolumiAomDAO.NC, value);
|
||||
}
|
||||
public String getDC() {
|
||||
return getFieldValue(DwhtVolumiAomDAO.DC);
|
||||
}
|
||||
public void setDC(String value) {
|
||||
setFieldValue(DwhtVolumiAomDAO.DC, value);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import org.apache.log4j.Logger;
|
||||
import it.valueteam.dbcgo.common.Utils;
|
||||
import java.sql.Statement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
import java.sql.Connection;
|
||||
|
||||
public class DwhtVolumiAomDAO extends BaseDAO {
|
||||
|
||||
static Logger logger = Logger.getLogger(SapAnagFVDAO.class);
|
||||
|
||||
public static final int MSISDN = 0;
|
||||
public static final int CODICE_OPERATORE = 1;
|
||||
public static final int NC = 2;
|
||||
public static final int DC = 3;
|
||||
|
||||
public static final int FIELDCOUNT = 4;
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"MSISDN",
|
||||
"CODICE_OPERATORE",
|
||||
"NC",
|
||||
"DC"
|
||||
};
|
||||
|
||||
public static final String tableName = "DWHT_VOLUMI_AOM";
|
||||
|
||||
public DwhtVolumiAomDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
public static int getFieldIndex(String fieldName) {
|
||||
for (int i = 0; i < FIELDCOUNT; i++) {
|
||||
if (fieldsName[i].equals(fieldName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private List select(String s) throws SQLException {
|
||||
|
||||
logger.debug(s);
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
List l = new Vector();
|
||||
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(s);
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
while (rs.next()) {
|
||||
DwhtVolumiAom item = new DwhtVolumiAom();
|
||||
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
|
||||
int j = getFieldIndex(rsmd.getColumnName(i));
|
||||
if (j != -1) {
|
||||
String columType = rsmd.getColumnTypeName(i);
|
||||
if (columType.equalsIgnoreCase("DATE"))
|
||||
item.setFieldValue(j, Utils.getString((java.util.Date) rs.getDate(i)));
|
||||
else
|
||||
item.setFieldValue(j, rs.getString(i));
|
||||
}
|
||||
}
|
||||
l.add(item);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
public List selectByMsisdn(String msisdn) throws SQLException {
|
||||
String s = "select " +
|
||||
fieldsName[MSISDN] + "," +
|
||||
fieldsName[CODICE_OPERATORE] + "," +
|
||||
fieldsName[NC] + "," +
|
||||
fieldsName[DC] +
|
||||
" from " + tableName +
|
||||
" where " + fieldsName[MSISDN] + " = '" + msisdn + "'";
|
||||
|
||||
return select(s);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public abstract class Entity implements Serializable {
|
||||
|
||||
public String[] fieldsValue;
|
||||
|
||||
public Entity() {
|
||||
}
|
||||
|
||||
public String getFieldValue(int index) {
|
||||
return fieldsValue[index];
|
||||
}
|
||||
|
||||
public void setFieldValue(int index, String value) {
|
||||
fieldsValue[index] = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Vector;
|
||||
|
||||
public class Filter {
|
||||
|
||||
public static final int LOGIC_OPERATOR_AND=0;
|
||||
public static final int LOGIC_OPERATOR_OR=1;
|
||||
|
||||
public static final String SEPARATOR = ";";
|
||||
|
||||
private static final String[] LOGIC_OPERATOR_SYMBOL = {"AND","OR"};
|
||||
|
||||
private List filterField=new Vector();
|
||||
private List filter=new Vector();
|
||||
private int logicOperator=0;
|
||||
|
||||
public Filter() {
|
||||
}
|
||||
|
||||
public void addFilterField(String name, String value){
|
||||
FilterField f = new FilterField(name, value);
|
||||
filterField.add(f);
|
||||
}
|
||||
|
||||
public void addFilterField(String name, String value, int type, int operator, boolean notNull, String alias){
|
||||
|
||||
//se operatore !=, campo nullable e valore !=null allora deve essere aggiunto un filtro più complesso
|
||||
if(operator==FilterField.OPERATOR_NOTEQUAL && !notNull && !FilterField.SEARCH_NULL.equals(value)){
|
||||
this.addNotEqualOrNotNullFilter(name, value, type, alias);
|
||||
}
|
||||
else{
|
||||
FilterField f = new FilterField(name, value, type, operator, notNull, alias);
|
||||
filterField.add(f);
|
||||
}
|
||||
}
|
||||
|
||||
public void addFilterField(String name, String value, int type, String operatorSymbol, boolean notNull, String alias) {
|
||||
FilterField f = new FilterField(name, value, type, operatorSymbol, notNull, alias);
|
||||
filterField.add(f);
|
||||
}
|
||||
|
||||
public void addFilterField(FilterField f){
|
||||
filterField.add(f);
|
||||
}
|
||||
|
||||
public void addFilter(Filter f){
|
||||
filter.add(f);
|
||||
}
|
||||
|
||||
//s deve contenere 2 o 4 valori separati da <separator> che rappresentano le coppie <operatorSymbol> <value>
|
||||
//se i due valori della coppia sono nulli non inserisce il filtro
|
||||
public void addRangeFilterFromString(String name,String s,int type,boolean notNull,String alias){
|
||||
Filter f = new Filter();
|
||||
String[] ss = s.split(SEPARATOR);
|
||||
|
||||
if(ss[0]+ss[1] != null && (ss[0]+ss[1]).length() > 0 )
|
||||
f.addFilterField(name,ss[1],type,ss[0],notNull,alias);
|
||||
if(ss.length==4)
|
||||
if(ss[2]+ss[3] != null && (ss[2]+ss[3]).length() > 0 )
|
||||
f.addFilterField(name,ss[3],type,ss[2],notNull,alias);
|
||||
|
||||
filter.add(f);
|
||||
}
|
||||
|
||||
//se "=" --> aggiunge un filtro di tipo Range con operatori ">=" e "<="
|
||||
//se "!=" --> aggiunge un filtro di tipo Range con operatori "<" e ">"
|
||||
//value deve contenere 2 valori separati da <separator>
|
||||
public void addRange0Filter(String name,String value,int type,int operator,boolean notNull,String alias){
|
||||
Filter f = new Filter();
|
||||
String[] v = value.split(SEPARATOR);
|
||||
if(operator == FilterField.OPERATOR_EQUAL){
|
||||
f.addFilterField(name,v[0],type,FilterField.OPERATOR_GREATEREQUAL,notNull,alias);
|
||||
f.addFilterField(name,v[1],type,FilterField.OPERATOR_LESSEQUAL,notNull,alias);
|
||||
}
|
||||
else{
|
||||
f.setLogicOperator(Filter.LOGIC_OPERATOR_OR);
|
||||
f.addFilterField(name,v[0],type,FilterField.OPERATOR_LESS,notNull,alias);
|
||||
f.addFilterField(name,v[1],type,FilterField.OPERATOR_GREATER,notNull,alias);
|
||||
}
|
||||
|
||||
filter.add(f);
|
||||
}
|
||||
|
||||
//decode operator delle date:
|
||||
//se "=" --> aggiunge un filtro di tipo Range con operatori ">=" e "< +1"
|
||||
//se "!=" --> aggiunge un filtro di tipo Range con operatori "<" e ">"
|
||||
//value deve contenere 2 valori separati da <separator>
|
||||
public void addRange1Filter(String name,String value,int type,int operator,boolean notNull,String alias){
|
||||
Filter f = new Filter();
|
||||
String[] v = value.split(SEPARATOR);
|
||||
if(operator == FilterField.OPERATOR_EQUAL){
|
||||
f.addFilterField(name,v[0],type,FilterField.OPERATOR_GREATEREQUAL,notNull,alias);
|
||||
f.addFilterField(name,v[1],type,FilterField.OPERATOR_LESS_PLUS1,notNull,alias);
|
||||
}
|
||||
else{
|
||||
f.setLogicOperator(Filter.LOGIC_OPERATOR_OR);
|
||||
f.addFilterField(name,v[0],type,FilterField.OPERATOR_LESS,notNull,alias);
|
||||
f.addFilterField(name,v[1],type,FilterField.OPERATOR_GREATER,notNull,alias);
|
||||
}
|
||||
|
||||
filter.add(f);
|
||||
}
|
||||
|
||||
//filtro "diverso da" per i campi che possono essere nulli
|
||||
//aggiunge un filtro (!= OR is not null)
|
||||
public void addNotEqualOrNotNullFilter(String name,String value,int type,String alias){
|
||||
Filter f = new Filter();
|
||||
f.setLogicOperator(Filter.LOGIC_OPERATOR_OR);
|
||||
//notNull a true per evitare loop con addFilterField
|
||||
f.addFilterField(name,value,type,FilterField.OPERATOR_NOTEQUAL,true,alias);
|
||||
f.addFilterField(name,FilterField.SEARCH_NULL,type,FilterField.OPERATOR_EQUAL,false,alias);
|
||||
filter.add(f);
|
||||
}
|
||||
|
||||
//filtro "diverso da" per i campi che possono essere nulli
|
||||
//aggiunge un filtro (!= OR is not null)
|
||||
public void makingFilterOR(String name,String value,int type,String alias){
|
||||
Filter f = new Filter();
|
||||
f.setLogicOperator(Filter.LOGIC_OPERATOR_OR);
|
||||
//notNull a true per evitare loop con addFilterField
|
||||
f.addFilterField(name,value,type,FilterField.OPERATOR_NOT_LIKE,true,alias);
|
||||
f.addFilterField(name,FilterField.SEARCH_NULL,type,FilterField.OPERATOR_EQUAL,false,alias);
|
||||
filter.add(f);
|
||||
}
|
||||
|
||||
private String getFieldSQL(){
|
||||
|
||||
if (filterField == null || filterField.size()==0)
|
||||
return "";
|
||||
|
||||
String s="(";
|
||||
|
||||
ListIterator li = filterField.listIterator();
|
||||
while (li.hasNext()) {
|
||||
if(li.nextIndex()>0)
|
||||
s=s + " " + LOGIC_OPERATOR_SYMBOL[logicOperator] + " ";
|
||||
s=s + ((FilterField)li.next()).getSQL();
|
||||
}
|
||||
s=s+")";
|
||||
|
||||
return s;
|
||||
|
||||
}
|
||||
|
||||
public String getSQL(){
|
||||
|
||||
if (filter == null || filter.size()==0)
|
||||
return getFieldSQL();
|
||||
|
||||
String s="";
|
||||
|
||||
ListIterator li = filter.listIterator();
|
||||
while (li.hasNext()) {
|
||||
if(li.nextIndex()>0)
|
||||
s=s + " " + LOGIC_OPERATOR_SYMBOL[logicOperator] + " ";
|
||||
s=s + ((Filter)li.next()).getSQL();
|
||||
}
|
||||
if (filterField != null && filterField.size()>0)
|
||||
s=s+ " " + LOGIC_OPERATOR_SYMBOL[logicOperator] + " "+getFieldSQL();
|
||||
|
||||
return s;
|
||||
|
||||
}
|
||||
|
||||
public void setFilterField(List filterField) {
|
||||
this.filterField = filterField;
|
||||
}
|
||||
|
||||
public List getFilterField() {
|
||||
return filterField;
|
||||
}
|
||||
|
||||
public void setFilter(List filter) {
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
public List getFilter() {
|
||||
return filter;
|
||||
}
|
||||
|
||||
public void setLogicOperator(int logicOperator) {
|
||||
this.logicOperator = logicOperator;
|
||||
}
|
||||
|
||||
public int getLogicOperator() {
|
||||
return logicOperator;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class FilterField {
|
||||
|
||||
public static final int TYPE_STRING=0;
|
||||
public static final int TYPE_DATE=1;
|
||||
public static final int TYPE_NUMBER=2;
|
||||
|
||||
public static final int OPERATOR_EQUAL=0;
|
||||
public static final int OPERATOR_NOTEQUAL=1;
|
||||
public static final int OPERATOR_LESS=2;
|
||||
public static final int OPERATOR_LESSEQUAL=3;
|
||||
public static final int OPERATOR_GREATER=4;
|
||||
public static final int OPERATOR_GREATEREQUAL=5;
|
||||
public static final int OPERATOR_LESS_PLUS1=6;
|
||||
public static final int OPERATOR_LIKE=7;
|
||||
public static final int OPERATOR_NOT_LIKE=8;
|
||||
|
||||
public static final int DATE_FORMAT_SHORT=0;
|
||||
public static final int DATE_FORMAT_LONG=1;
|
||||
|
||||
public static final String SEARCH_NULL="null";
|
||||
|
||||
private static final String[] OPERATOR_SYMBOL = {"=","!=","<","<=",">",">=","<"," like "," not like "};
|
||||
|
||||
private static final String[] DATE_FORMAT = {"dd/MM/yyyy","dd/MM/yyyy HH:mm:ss"};
|
||||
|
||||
private String name;
|
||||
private String value;
|
||||
private int type=0; //default String
|
||||
private int operator=0; //default "="
|
||||
private int dateFormat=0; //default "dd/MM/yyyy"
|
||||
private boolean notNull=false;
|
||||
private String alias=null;
|
||||
|
||||
static Logger log = Logger.getLogger(FilterField.class.getName());
|
||||
|
||||
public FilterField(String name, String value) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public FilterField(String name, String value, int type, int operator, boolean notNull, String alias) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.type = type;
|
||||
this.operator = operator;
|
||||
this.notNull = notNull;
|
||||
this.alias = alias;
|
||||
}
|
||||
|
||||
public FilterField(String name, String value, int type, String operatorSymbol, boolean notNull, String alias) {
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.type = type;
|
||||
this.setOperatorFromOperatorSymbol(operatorSymbol);
|
||||
this.notNull = notNull;
|
||||
this.alias = alias;
|
||||
}
|
||||
|
||||
public String getSQL() {
|
||||
|
||||
String s="";
|
||||
String prefix="";
|
||||
String name=this.name;
|
||||
if (this.alias!=null){
|
||||
prefix=this.alias+".";
|
||||
name=prefix+name;
|
||||
}
|
||||
|
||||
if (!this.notNull && this.SEARCH_NULL.equals(value)) {
|
||||
|
||||
if (this.operator==OPERATOR_EQUAL)
|
||||
s = name + " is null ";
|
||||
else
|
||||
s = name + " is not null ";
|
||||
|
||||
} else {
|
||||
try{
|
||||
s = name + OPERATOR_SYMBOL[this.operator] + getValueSQL();
|
||||
}
|
||||
catch(Exception e){
|
||||
log.error("Wrong operator index" + this.operator + ". Using default (=).");
|
||||
this.operator=OPERATOR_EQUAL;
|
||||
}
|
||||
s = name + OPERATOR_SYMBOL[this.operator] + getValueSQL();
|
||||
if (operator==this.OPERATOR_LESS_PLUS1)
|
||||
s = s + " + 1";
|
||||
}
|
||||
return s;
|
||||
|
||||
}
|
||||
|
||||
public String getValueSQL() {
|
||||
|
||||
String s="";
|
||||
switch (type) {
|
||||
case TYPE_STRING:
|
||||
if(this.operator==OPERATOR_LIKE){
|
||||
s="'"+ value + "%'";
|
||||
|
||||
}else if(this.operator==OPERATOR_NOT_LIKE){
|
||||
s="'"+ value + "%'";
|
||||
} else
|
||||
s = "'" + value + "'";
|
||||
break;
|
||||
case TYPE_NUMBER:
|
||||
s = value;
|
||||
break;
|
||||
case TYPE_DATE:
|
||||
s = " to_date('" + value + "','" + DATE_FORMAT[dateFormat] + "')";
|
||||
break;
|
||||
default:
|
||||
s = value;
|
||||
}
|
||||
return s;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setNotNull(boolean notNull) {
|
||||
this.notNull = notNull;
|
||||
}
|
||||
|
||||
public boolean isNotNull() {
|
||||
return notNull;
|
||||
}
|
||||
|
||||
public void setDateFormat(int dateFormat) {
|
||||
this.dateFormat = dateFormat;
|
||||
}
|
||||
|
||||
public int getDateFormat() {
|
||||
return dateFormat;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setOperator(int operator) {
|
||||
this.operator = operator;
|
||||
}
|
||||
|
||||
public void setOperatorFromOperatorSymbol(String operatorSymbol){
|
||||
int i= getOperatorFromOperatorSymbol(operatorSymbol);
|
||||
if (i==-1)
|
||||
log.error("Wrong operator symbol: " + operatorSymbol);
|
||||
else
|
||||
setOperator(i);
|
||||
}
|
||||
|
||||
public int getOperator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
public int getOperatorFromOperatorSymbol(String operatorSymbol) {
|
||||
for (int i=0;i<OPERATOR_SYMBOL.length;i++)
|
||||
if (OPERATOR_SYMBOL[i].equals(operatorSymbol))
|
||||
return i;
|
||||
|
||||
//se non trovo nulla che corrisponda
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static String getOperatorSymbol(int operator) {
|
||||
if (operator < OPERATOR_SYMBOL.length)
|
||||
return OPERATOR_SYMBOL[operator];
|
||||
else
|
||||
//se non trovo nulla che corrisponda
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,67 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
public class Lov extends Entity {
|
||||
|
||||
public Lov() {
|
||||
fieldsValue = new String[LovDAO.FIELDCOUNT];
|
||||
}
|
||||
|
||||
public int getFieldIndex(String fieldName) {
|
||||
|
||||
for (int i = 0; i < LovDAO.FIELDCOUNT; i++) {
|
||||
if (LovDAO.fieldsName[i].equals(fieldName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public String getLOV_ID() {
|
||||
return getFieldValue(LovDAO.LOV_ID);
|
||||
}
|
||||
|
||||
public void setLOV_ID(String value) {
|
||||
setFieldValue(LovDAO.LOV_ID, value);
|
||||
}
|
||||
|
||||
public String getLOV_NAME() {
|
||||
return getFieldValue(LovDAO.LOV_NAME);
|
||||
}
|
||||
|
||||
public void setLOV_NAME(String value) {
|
||||
setFieldValue(LovDAO.LOV_NAME, value);
|
||||
}
|
||||
|
||||
public String getNAME() {
|
||||
return getFieldValue(LovDAO.NAME);
|
||||
}
|
||||
|
||||
public void setNAME(String value) {
|
||||
setFieldValue(LovDAO.NAME, value);
|
||||
}
|
||||
|
||||
public String getDESCR() {
|
||||
return getFieldValue(LovDAO.DESCR);
|
||||
}
|
||||
|
||||
public void setDESCR(String value) {
|
||||
setFieldValue(LovDAO.DESCR, value);
|
||||
}
|
||||
|
||||
public String getORDER_BY() {
|
||||
return getFieldValue(LovDAO.ORDER_BY);
|
||||
}
|
||||
|
||||
public void setORDER_BY(String value) {
|
||||
setFieldValue(LovDAO.ORDER_BY, value);
|
||||
}
|
||||
|
||||
public String getNAME_REF() {
|
||||
return getFieldValue(LovDAO.NAME_REF);
|
||||
}
|
||||
|
||||
public void setNAME_REF(String value) {
|
||||
setFieldValue(LovDAO.NAME_REF, value);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.dao.BaseDAO;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
|
||||
public class LovDAO extends BaseDAO {
|
||||
|
||||
public static final int LOV_ID = 0;
|
||||
public static final int LOV_NAME = 1;
|
||||
public static final int NAME = 2;
|
||||
public static final int DESCR = 3;
|
||||
public static final int NAME_REF = 4;
|
||||
public static final int ORDER_BY = 5;
|
||||
|
||||
|
||||
|
||||
public static final int FIELDCOUNT = 6;
|
||||
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"LOV_ID",
|
||||
"LOV_NAME",
|
||||
"NAME",
|
||||
"DESCR",
|
||||
"NAME_REF",
|
||||
"ORDER_BY"
|
||||
|
||||
};
|
||||
|
||||
public static String tableName = "DBCGO_LOV";
|
||||
|
||||
//LOV NAME
|
||||
public static final String LOV_NAME_OT_SAP = "OT_SAP";
|
||||
public static final String LOV_NAME_OT_REC = "OT_REC";
|
||||
//LOV_NAME PER IL MAPPING TRA MARCAGGIO DBM E MARCAGGIO VISUALIZZATO DA DBCGO
|
||||
public static final String LOV_NAME_OT_DBM_MAPPING = "DBM_OT_MAPPING";
|
||||
public static final String LOV_NAME_TIPO_OPERAZIONE = "TIPO_OPERAZIONE";
|
||||
|
||||
//NAME
|
||||
public static final String NAME_VALORE_CLIENTE_BASSO = "BASSO";
|
||||
public static final String NAME_VALORE_CLIENTE_MEDIO = "MEDIO";
|
||||
public static final String NAME_VALORE_CLIENTE_ALTO = "ALTO";
|
||||
public static final String NAME_VALORE_CLIENTE_NON_DEFINITO = "ND";
|
||||
public static final String NAME_VALORE_SPESA_BASSO_SP = "BASSO_SP";
|
||||
public static final String NAME_VALORE_SPESA_MEDIO_SP = "MEDIO_SP";
|
||||
public static final String NAME_VALORE_SPESA_ALTO_SP = "ALTO_SP";
|
||||
public static final String NAME_VALORE_SPESA_NON_DEFINITO = "ND";
|
||||
|
||||
private static String sqllLoadByLovName = "SELECT * FROM DBCGO_LOV "+
|
||||
"WHERE LOV_NAME=?";
|
||||
|
||||
private static final String SELECT_BY_LOVE_NAME_WITH_REF = "select b.NAME, b.DESCR, b.lov_id, b.lov_name, a.NAME as NAME_REF "
|
||||
+ " from DBCGO_LOV a, DBCGO_LOV b, DBCGO_LOV_REF c"
|
||||
+ " where a.LOV_ID = c.LOV_ID_REF"
|
||||
+ " and b.NAME =?"
|
||||
+ " and b.LOV_NAME =?"
|
||||
+ " and b.LOV_ID = c.LOV_ID";
|
||||
|
||||
public LovDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
public LovDAO() throws Exception {
|
||||
super();
|
||||
}
|
||||
|
||||
public List loadByLovName(String lov_name) throws Exception {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
List result = new ArrayList();
|
||||
Lov lov = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqllLoadByLovName);
|
||||
pstmt.setString(1, lov_name);
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
lov = new Lov();
|
||||
lov.setLOV_ID(String.valueOf(rs.getInt("LOV_ID")));
|
||||
lov.setLOV_NAME(rs.getString("LOV_NAME"));
|
||||
lov.setNAME(rs.getString("NAME"));
|
||||
lov.setDESCR(rs.getString("DESCR"));
|
||||
lov.setORDER_BY(String.valueOf(rs.getInt("ORDER_BY")));
|
||||
result.add(lov);
|
||||
}
|
||||
|
||||
}
|
||||
catch(SQLException ex){
|
||||
ex.printStackTrace();
|
||||
throw ex;
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public List selectByLovNameAndNameWithRef(String name, String lovName) throws SQLException {
|
||||
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
List result = new ArrayList();
|
||||
Lov lov = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(SELECT_BY_LOVE_NAME_WITH_REF);
|
||||
pstmt.setString(1, name);
|
||||
pstmt.setString(2, lovName);
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next()) {
|
||||
lov = new Lov();
|
||||
lov.setLOV_ID(String.valueOf(rs.getInt("LOV_ID")));
|
||||
lov.setLOV_NAME(rs.getString("LOV_NAME"));
|
||||
lov.setNAME(rs.getString("NAME"));
|
||||
lov.setDESCR(rs.getString("DESCR"));
|
||||
lov.setNAME_REF(rs.getString("NAME_REF"));
|
||||
result.add(lov);
|
||||
}
|
||||
|
||||
} catch (SQLException ex) {
|
||||
ex.printStackTrace();
|
||||
throw ex;
|
||||
} finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.dao.BaseDAO;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
public class LovRefDAO extends BaseDAO {
|
||||
|
||||
public static final int LOV_ID = 0;
|
||||
public static final int LOV_ID_REF = 1;
|
||||
|
||||
public static final int FIELDCOUNT = 2;
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"LOV_ID",
|
||||
"LOV_ID_REF"
|
||||
};
|
||||
|
||||
public static String tableName = "DBCGO_LOV_REF";
|
||||
|
||||
public LovRefDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import it.valueteam.dbcgo.mnp.AllineamentoDaCCCResultDbcgoModel;
|
||||
import it.valueteam.dbcgo.sync.dto.MnpDonatingForCatastaleDbcgoDTO;
|
||||
|
||||
public class MnpDonatingForCatastaleDbcgoDao extends BaseReqDAO{
|
||||
static Logger logger = Logger.getLogger(MnpDonatingForCatastaleDbcgoDao.class);
|
||||
|
||||
private static final String SQL_BASE = "SET CODICE_ISTAT = ? WHERE ID_RICHIESTA = ? AND MSISDN = ?";
|
||||
private static final String SQL_UPDATE_DBCGO_GESTIONE_RICHIESTA = "UPDATE DBCGO_GESTIONE_RICHIESTA " + SQL_BASE;
|
||||
private static final String SQL_UPDATE_DBCGO_GEST_RICH_REC_VIRT = "UPDATE DBCGO_GEST_RICH_REC_VIRT " + SQL_BASE;
|
||||
|
||||
public MnpDonatingForCatastaleDbcgoDao(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
public List<AllineamentoDaCCCResultDbcgoModel> updateRecord(MnpDonatingForCatastaleDbcgoDTO dto) throws Exception {
|
||||
logger.debug("Start updateRecord");
|
||||
|
||||
Connection conn = null;
|
||||
PreparedStatement pstmt = null;
|
||||
List<AllineamentoDaCCCResultDbcgoModel> result = new ArrayList<AllineamentoDaCCCResultDbcgoModel>();
|
||||
try {
|
||||
conn = getConnection();
|
||||
logger.debug("Connection ottenuta");
|
||||
|
||||
// UPDATE TABELLE DONOR
|
||||
result.add(new AllineamentoDaCCCResultDbcgoModel("DBCGO_GESTIONE_RICHIESTA", commonUpdate(conn, pstmt, SQL_UPDATE_DBCGO_GESTIONE_RICHIESTA, dto, false)));
|
||||
result.add(new AllineamentoDaCCCResultDbcgoModel("DBCGO_GEST_RICH_REC_VIRT", commonUpdate(conn, pstmt, SQL_UPDATE_DBCGO_GEST_RICH_REC_VIRT, dto, false)));
|
||||
} catch (Exception ex) {
|
||||
logger.debug("Exception ex in updateRecord" + ex.getMessage());
|
||||
throw ex;
|
||||
} finally {
|
||||
closeAll(null, pstmt, conn);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private int commonUpdate(Connection conn, PreparedStatement pstmt, String sqlStatement, MnpDonatingForCatastaleDbcgoDTO model, boolean pdv) throws Exception {
|
||||
int index = 0;
|
||||
pstmt = conn.prepareStatement(sqlStatement);
|
||||
pstmt.setString(++index, model.getCodiceCatastale());
|
||||
pstmt.setString(++index, model.getIdRichiesta());
|
||||
pstmt.setString(++index, model.getMsisdn());
|
||||
return pstmt.executeUpdate();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* <p>Title: </p>
|
||||
* <p>Description: </p>
|
||||
* <p>Copyright: Copyright (c) 2006</p>
|
||||
* <p>Company: ValueTeam </p>
|
||||
* @author Mario Giurlanda
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
|
||||
public class OffertaDAO extends ProfiloTariffarioDAO {
|
||||
public OffertaDAO(DataSource ds) {
|
||||
super(ds);
|
||||
|
||||
this.tableName = "DBCGO_OFFERTA";
|
||||
|
||||
this.viewName = "DBCGO_OFFERTA_V";
|
||||
|
||||
this.fieldsName = new String[] {
|
||||
"SISTEMA_MITTENTE",
|
||||
"COD_OFFERTA",
|
||||
"DESC_OFFERTA",
|
||||
"TIPO_CLIENTE"
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,314 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.sync.dto.PingPongDTO;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* <p>Title: </p>
|
||||
* <p>Description: </p>
|
||||
* <p>Copyright: Copyright (c) 2005</p>
|
||||
* <p>Company: </p>
|
||||
* @author not attributable
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class PingPongDAO extends BaseDAO{
|
||||
static Logger logger = Logger.getLogger(PingPongDAO.class);
|
||||
|
||||
static final String sqlLockPPByMsisdn = ""+
|
||||
"SELECT msisdn "+
|
||||
"FROM dbcgo_pp "+
|
||||
"where msisdn=? "+
|
||||
"for update";
|
||||
static final String sqlCountFinalReqByMsisdn = ""+
|
||||
"SELECT count(*) "+
|
||||
"FROM dbcgo_pp_view "+
|
||||
"where msisdn=? "+
|
||||
"and id_richiesta<>?";
|
||||
static final String sqlInsertPPFromFinalByMsisdn =""+
|
||||
"insert into DBCGO_PP("+
|
||||
"id_richiesta, "+
|
||||
"data_operazione, "+
|
||||
"codice_operatore_donating, "+
|
||||
"codice_operatore_recipient, "+
|
||||
"msisdn, "+
|
||||
"processo, "+
|
||||
"terminato) "+
|
||||
"select id_richiesta, data_operazione, codice_operatore_don_eff , "+
|
||||
" codice_operatore_rec_eff , msisdn, processo, 1 "+
|
||||
"from dbcgo_pp_view pp_view "+
|
||||
"where msisdn=? "+
|
||||
"and id_richiesta<>? "+
|
||||
// il pezzo che segue serve per evitare duplicati nel caso che
|
||||
// ci arrivano + richieste con stesso msisdn
|
||||
"and not exists ( "+
|
||||
"select id_richiesta,processo "+
|
||||
"from DBCGO_PP pp1 "+
|
||||
"where terminato=1 and pp1.id_richiesta=pp_view.id_richiesta and pp1.processo=pp_view.processo)";
|
||||
|
||||
|
||||
static final String sqlInsertPP =
|
||||
"insert into DBCGO_PP("+
|
||||
"id_richiesta, "+
|
||||
"data_operazione, "+
|
||||
"codice_operatore_donating, "+
|
||||
"codice_operatore_recipient, "+
|
||||
"msisdn, "+
|
||||
"processo, "+
|
||||
"terminato) "+
|
||||
"VALUES (?,?,?,?,?,?,?)";
|
||||
|
||||
static final String sqlUpdatePPTerminato=
|
||||
"update DBCGO_PP "+
|
||||
"set terminato=? "+
|
||||
"where id_richiesta=? "+
|
||||
"and processo=?";
|
||||
|
||||
static final String sqlUpdatePPDataOPerazione=
|
||||
"update DBCGO_PP "+
|
||||
"set DATA_OPERAZIONE=? " +
|
||||
"where id_richiesta=? "+
|
||||
"and processo=?";
|
||||
|
||||
static final String sqlCountPPReqByIdRichiesta =
|
||||
"SELECT count(*) "+
|
||||
"FROM DBCGO_PP "+
|
||||
"where id_richiesta=? "+
|
||||
"and processo=?";
|
||||
static final String sqlDeletePPReqByIdRichiesta=
|
||||
"delete from DBCGO_PP "+
|
||||
"where id_richiesta=? "+
|
||||
"and processo=?";
|
||||
static final String sqlUpdatePP=
|
||||
"update DBCGO_PP set " +
|
||||
"data_operazione=?, " +
|
||||
"codice_operatore_donating=? " +
|
||||
"codice_operatore_recipient=?, " +
|
||||
"msisdn=?, " +
|
||||
"processo=?, " +
|
||||
"terminato=? " +
|
||||
"where id_richiesta=? ";
|
||||
static final String sqlCountPPReqByMsisdn =
|
||||
"SELECT count(*) "+
|
||||
"FROM DBCGO_PP "+
|
||||
"where msisdn=? ";
|
||||
static final String sqlDeletePPReqByMsisdn=
|
||||
"delete from DBCGO_PP "+
|
||||
"where msisdn=? ";
|
||||
|
||||
|
||||
public PingPongDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
public void insertPPReqFromFinalByMsisdn(String msisdn,String currentIdRichiesta, String donorEff, String recipientEff) throws SQLException {
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlInsertPPFromFinalByMsisdn);
|
||||
System.out.println("cristiano query"+sqlInsertPPFromFinalByMsisdn);
|
||||
//pstmt.setString(1, donorEff);
|
||||
//pstmt.setString(2, recipientEff);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
pstmt.setString(1, msisdn);
|
||||
pstmt.setString(2, currentIdRichiesta);
|
||||
int row = pstmt.executeUpdate();
|
||||
}
|
||||
finally {
|
||||
closeAll(null, pstmt, c);
|
||||
}
|
||||
}
|
||||
|
||||
public int countFinalReqByMsisdn(String msisdn,String currentIdRichiesta) throws SQLException {
|
||||
int count = 0;
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlCountFinalReqByMsisdn);
|
||||
pstmt.setString(1, msisdn);
|
||||
pstmt.setString(2, currentIdRichiesta);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
count = rs.getInt(1);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public int insertPPReq(PingPongDTO dto) throws SQLException {
|
||||
int row=0;
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlInsertPP);
|
||||
pstmt.setString(1, dto.getIdRichiesta());
|
||||
pstmt.setDate(2, utilToSql(dto.getDataOperazione()));
|
||||
pstmt.setString(3, dto.getCodiceOperatoreDonating());
|
||||
pstmt.setString(4, dto.getCodiceOperatoreRecipient());
|
||||
pstmt.setString(5, dto.getMsisdn());
|
||||
pstmt.setString(6, dto.getProcesso());
|
||||
pstmt.setBoolean(7, dto.isTerminato());
|
||||
row = pstmt.executeUpdate();
|
||||
}
|
||||
finally {
|
||||
closeAll(null, pstmt, c);
|
||||
}
|
||||
return row;
|
||||
}
|
||||
|
||||
public int updatePPReqTerminato(String idRichiesta,String processo,boolean terminato) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
int count=0;
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlUpdatePPTerminato);
|
||||
pstmt.setBoolean(1, terminato);
|
||||
pstmt.setString(2, idRichiesta);
|
||||
pstmt.setString(3, processo);
|
||||
count = pstmt.executeUpdate();
|
||||
}
|
||||
finally {
|
||||
closeAll(null, pstmt, c);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public int countPPReqByIdRichiesta(String idRichiesta,String processo) throws SQLException {
|
||||
int count = 0;
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlCountPPReqByIdRichiesta);
|
||||
pstmt.setString(1, idRichiesta);
|
||||
pstmt.setString(2, processo);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
count = rs.getInt(1);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public int deletePPReqByIdRichiesta(String idRichiesta,String processo) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
int count=0;
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlDeletePPReqByIdRichiesta);
|
||||
pstmt.setString(1, idRichiesta);
|
||||
pstmt.setString(2, processo);
|
||||
count = pstmt.executeUpdate();
|
||||
}
|
||||
finally {
|
||||
closeAll(null, pstmt, c);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public int countPPReqByMsisdn(String msisdn) throws SQLException {
|
||||
int count = 0;
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlCountPPReqByMsisdn);
|
||||
pstmt.setString(1, msisdn);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
count = rs.getInt(1);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public int deletePPReqByMsisdn(String msisdn) throws
|
||||
SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
int count = 0;
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlDeletePPReqByMsisdn);
|
||||
pstmt.setString(1, msisdn);
|
||||
count = pstmt.executeUpdate();
|
||||
} finally {
|
||||
closeAll(null, pstmt, c);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
public int lockPPByMsisdn(String msisdn) throws SQLException {
|
||||
int count = 0;
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlLockPPByMsisdn);
|
||||
pstmt.setString(1, msisdn);
|
||||
pstmt.executeQuery();
|
||||
} finally {
|
||||
closeAll(null, pstmt, c);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public int updatePPDataOperazione(String idRichiesta, String processo, Date terminationDate) throws SQLException {
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
int count = 0;
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlUpdatePPDataOPerazione);
|
||||
pstmt.setDate(1, utilToSql(terminationDate));
|
||||
pstmt.setString(2, idRichiesta);
|
||||
pstmt.setString(3, processo);
|
||||
count = pstmt.executeUpdate();
|
||||
} finally {
|
||||
closeAll(null, pstmt, c);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* Created on 12-set-05
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.sync.dto.PortingReqDTO;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @author Giovanni
|
||||
*
|
||||
* To change the template for this generated type comment go to
|
||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
public class PortingReqDAO extends BaseReqDAO {
|
||||
|
||||
static Logger logger = Logger.getLogger(PortingReqDAO.class);
|
||||
|
||||
public PortingReqDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
static final String sqlInsertReq =
|
||||
"INSERT INTO DBCGO_GESTIONE_RICHIESTA_POR( " +
|
||||
"TIMESTAMP, " +
|
||||
"ID_RICHIESTA, " +
|
||||
"STATO, " +
|
||||
"DATARICEZIONERICHIESTA, " +
|
||||
"DATA_CUT_OVER, " +
|
||||
"DATA_TRANSIZIONE_STATO, " +
|
||||
"CODICE_OPERATORE_DONATING, " +
|
||||
"CODICE_OPERATORE_RECIPIENT, " +
|
||||
"MSISDN, " +
|
||||
"INSERT_DATE, " +
|
||||
"UPDATE_DATE " +
|
||||
" ) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
|
||||
|
||||
static final String sqlUpdateReqByRequestId =
|
||||
"UPDATE DBCGO_GESTIONE_RICHIESTA_POR SET " +
|
||||
"TIMESTAMP = ?, " +
|
||||
"STATO = ?, " +
|
||||
"DATARICEZIONERICHIESTA = ?, " +
|
||||
"DATA_CUT_OVER = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO = ?, " +
|
||||
"CODICE_OPERATORE_DONATING = ?, " +
|
||||
"CODICE_OPERATORE_RECIPIENT = ?, " +
|
||||
"MSISDN = ?, " +
|
||||
"UPDATE_DATE = ? " +
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
static final String sqlCountReqByRequestId =
|
||||
" SELECT COUNT(*) " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA_POR " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
static final String sqlLoadTimestampReqByRequestId =
|
||||
" SELECT TIMESTAMP " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA_POR " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
static final String sqlLoadStateReqByRequestId =
|
||||
" SELECT STATO " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA_POR " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
static final String sqlGetStateType =
|
||||
"SELECT stato_type "+
|
||||
"FROM dbcgo_stato_por "+
|
||||
"where id_stato= ?";
|
||||
|
||||
|
||||
public int countByRequestID(String requestId) throws SQLException {
|
||||
|
||||
return super.countByRequestID(
|
||||
sqlCountReqByRequestId,
|
||||
requestId
|
||||
);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
public Timestamp getTimestampByRequestID(String requestId) throws
|
||||
SQLException {
|
||||
|
||||
return super.getTimestampByRequestID(
|
||||
sqlLoadTimestampReqByRequestId,
|
||||
requestId);
|
||||
}
|
||||
|
||||
public int getStateByRequestID(String id_richiesta) throws SQLException {
|
||||
|
||||
return super.getStateByRequestID(
|
||||
sqlLoadStateReqByRequestId,
|
||||
id_richiesta);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
public void insertRequest(PortingReqDTO dto) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
//pstmt = c.prepareStatement(sqlInsertReq);
|
||||
pstmt = new LoggableStatement(c, sqlInsertReq);
|
||||
|
||||
//SET start
|
||||
Date now = new Date();
|
||||
|
||||
pstmt.setTimestamp(1, dto.timestamp);
|
||||
pstmt.setString(2, dto.idRichiesta);
|
||||
pstmt.setInt(3, dto.stato);
|
||||
pstmt.setDate(4, utilToSql(dto.dataRicezioneRichiesta));
|
||||
pstmt.setDate(5, utilToSql(dto.dataCutOver));
|
||||
pstmt.setDate(6, utilToSql(dto.dataTransizioneStato));
|
||||
pstmt.setString(7, dto.codiceOperatoreDonating);
|
||||
pstmt.setString(8, dto.codiceOperatoreRecipient);
|
||||
pstmt.setString(9, dto.msisdn);
|
||||
pstmt.setDate(10, new java.sql.Date(now.getTime()));
|
||||
pstmt.setDate(11, new java.sql.Date(now.getTime()));
|
||||
|
||||
//SET end
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing query: " +
|
||||
((LoggableStatement) pstmt).getQueryString());
|
||||
pstmt.execute();
|
||||
|
||||
} finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
public void updateRequest(PortingReqDTO dto) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
//pstmt = c.prepareStatement(sqlUpdateReqByRequestId);
|
||||
pstmt = new LoggableStatement(c, sqlUpdateReqByRequestId);
|
||||
//SET start
|
||||
Date now = new Date();
|
||||
|
||||
pstmt.setTimestamp(1, dto.timestamp);
|
||||
pstmt.setInt(2, dto.stato);
|
||||
pstmt.setDate(3, utilToSql(dto.dataRicezioneRichiesta));
|
||||
pstmt.setDate(4, utilToSql(dto.dataCutOver));
|
||||
pstmt.setDate(5, utilToSql(dto.dataTransizioneStato));
|
||||
pstmt.setString(6, dto.codiceOperatoreDonating);
|
||||
pstmt.setString(7, dto.codiceOperatoreRecipient);
|
||||
pstmt.setString(8, dto.msisdn);
|
||||
pstmt.setDate(9, new java.sql.Date(now.getTime())); //update date
|
||||
|
||||
pstmt.setString(10, dto.idRichiesta);
|
||||
//SET end
|
||||
pstmt.execute();
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing update: " +
|
||||
((LoggableStatement) pstmt).getQueryString());
|
||||
} finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
}
|
||||
|
||||
public java.sql.Date utilToSql(java.util.Date utilDate) {
|
||||
|
||||
java.sql.Date sqlDate = null;
|
||||
|
||||
if (utilDate != null) {
|
||||
sqlDate = new java.sql.Date(utilDate.getTime());
|
||||
}
|
||||
|
||||
return sqlDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ritorna il state type(attivo,finale positivo,finale negativo)
|
||||
* per la richiesta in questione
|
||||
* @param id_richiesta String
|
||||
* @throws SQLException
|
||||
* @return int
|
||||
*/
|
||||
public int getStateType(int stato) throws SQLException {
|
||||
return super.getStateType(sqlGetStateType, stato);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* <p>Title: </p>
|
||||
* <p>Description: </p>
|
||||
* <p>Copyright: Copyright (c) 2006</p>
|
||||
* <p>Company: ValueTeam </p>
|
||||
* @author Mario Giurlanda
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
|
||||
public class ProfiloDAO extends ProfiloTariffarioDAO {
|
||||
public ProfiloDAO(DataSource ds) {
|
||||
|
||||
super(ds);
|
||||
|
||||
this.tableName = "DBCGO_PROFILO_TARIFFARIO";
|
||||
|
||||
this.viewName = "DBCGO_PROFILO_TARIFFARIO_V";
|
||||
|
||||
this.fieldsName = new String[] {
|
||||
"SISTEMA_MITTENTE",
|
||||
"COD_PROFILO_TARIFFARIO",
|
||||
"DESC_PROFILO_TARIFFARIO",
|
||||
"TIPO_CLIENTE"
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
/**
|
||||
* <p>Title: </p>
|
||||
*
|
||||
* <p>Description: Value Object che contiene i dati anagrafici relativi al Profilo Tariffario </p>
|
||||
*
|
||||
* <p>Copyright: Copyright (c) 2006</p>
|
||||
*
|
||||
* <p>Company: ValueTeam</p>
|
||||
*
|
||||
* @author Mario Giurlanda
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ProfiloTariffario extends Entity {
|
||||
public ProfiloTariffario() {
|
||||
fieldsValue= new String[ProfiloTariffarioDAO.FIELDCOUNT];
|
||||
}
|
||||
|
||||
|
||||
public String getCODICE() {
|
||||
return getFieldValue(ProfiloTariffarioDAO.CODICE);
|
||||
}
|
||||
public void setCODICE(String value) {
|
||||
setFieldValue(ProfiloTariffarioDAO.CODICE, value);
|
||||
}
|
||||
public String getDESCRIZIONE() {
|
||||
return getFieldValue(ProfiloTariffarioDAO.DESCRIZIONE);
|
||||
}
|
||||
public void setDESCRIZIONE(String value) {
|
||||
setFieldValue(ProfiloTariffarioDAO.DESCRIZIONE, value);
|
||||
}
|
||||
public String getSISTEMA_MITTENTE() {
|
||||
return getFieldValue(ProfiloTariffarioDAO.SISTEMA_MITTENTE);
|
||||
}
|
||||
public void setSISTEMA_MITTENTE(String value) {
|
||||
setFieldValue(ProfiloTariffarioDAO.SISTEMA_MITTENTE, value);
|
||||
}
|
||||
public String getTIPO_CLIENTE() {
|
||||
return getFieldValue(ProfiloTariffarioDAO.TIPO_CLIENTE);
|
||||
}
|
||||
public void setTIPO_CLIENTE(String value) {
|
||||
setFieldValue(ProfiloTariffarioDAO.TIPO_CLIENTE, value);
|
||||
}
|
||||
|
||||
public String getSISTEMA_CODICE() {
|
||||
return getFieldValue(ProfiloTariffarioDAO.SISTEMA_MITTENTE) + ";" + getFieldValue(ProfiloTariffarioDAO.CODICE);
|
||||
}
|
||||
|
||||
public void setSISTEMA_CODICE(String sistema_codice) {
|
||||
String[] sistemaCodice = sistema_codice.split(";");
|
||||
if (sistemaCodice.length == 2) {
|
||||
if (getFieldValue(ProfiloTariffarioDAO.SISTEMA_MITTENTE) == null) {
|
||||
setFieldValue(ProfiloTariffarioDAO.SISTEMA_MITTENTE, sistemaCodice[0]);
|
||||
}
|
||||
setFieldValue(ProfiloTariffarioDAO.CODICE, sistemaCodice[1]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import javax.sql.*;
|
||||
|
||||
import org.apache.log4j.*;
|
||||
import it.valueteam.dbcgo.common.*;
|
||||
|
||||
/**
|
||||
* <p>Title: </p>
|
||||
*
|
||||
* <p>Description: Data Access Object per la gestione delle anagrafiche relative
|
||||
* al profilo tariffario</p>
|
||||
*
|
||||
* <p>Copyright: Copyright (c) 2006</p>
|
||||
*
|
||||
* <p>Company: Value Team </p>
|
||||
* @author Mario Giurlanda
|
||||
* @version 1.0
|
||||
*/
|
||||
public abstract class ProfiloTariffarioDAO extends BaseDAO {
|
||||
|
||||
static Logger logger = Logger.getLogger(ProfiloTariffarioDAO.class);
|
||||
|
||||
public static final int SISTEMA_MITTENTE = 0;
|
||||
public static final int CODICE = 1;
|
||||
public static final int DESCRIZIONE = 2;
|
||||
public static final int TIPO_CLIENTE = 3;
|
||||
|
||||
public static final int FIELDCOUNT = 4;
|
||||
|
||||
protected String[] fieldsName = null;
|
||||
|
||||
protected String tableName = null;
|
||||
|
||||
protected String viewName = null;
|
||||
|
||||
public ProfiloTariffarioDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
/**
|
||||
* selectRow - Seleziona una riga dalle tabelle di anagrafica
|
||||
*
|
||||
* @param codice String
|
||||
* @param sistema_mittente String
|
||||
* @throws SQLException
|
||||
* @return List
|
||||
*/
|
||||
public List selectRow(String codice, String sistema_mittente) throws SQLException {
|
||||
|
||||
String s = "select *" +
|
||||
" from " + tableName +
|
||||
" where " + fieldsName[SISTEMA_MITTENTE] + " = '" + sistema_mittente +
|
||||
"'" +
|
||||
" and " + fieldsName[CODICE] + " = '" + codice + "'";
|
||||
|
||||
return select(s);
|
||||
|
||||
}
|
||||
|
||||
private int getFieldIndex(String fieldName) {
|
||||
|
||||
for (int i = 0; i < FIELDCOUNT; i++) {
|
||||
if (fieldsName[i].equals(fieldName)) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
private List select(String s) throws SQLException {
|
||||
|
||||
logger.debug(s);
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
List l = new Vector();
|
||||
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
|
||||
ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(s);
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
while (rs.next()) {
|
||||
ProfiloTariffario item = new ProfiloTariffario();
|
||||
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
|
||||
int j = getFieldIndex(rsmd.getColumnName(i));
|
||||
if (j != -1) {
|
||||
String columType = rsmd.getColumnTypeName(i);
|
||||
if (columType.equalsIgnoreCase("DATE")) {
|
||||
item.setFieldValue(j, Utils.getString( (java.util.Date) rs.getDate(i)));
|
||||
}
|
||||
else {
|
||||
item.setFieldValue(j, rs.getString(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
l.add(item);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
/**
|
||||
* insertRow - Inserisce una riga nelle tabelle di anagrafica
|
||||
*
|
||||
* @param pTar ProfiloTariffario
|
||||
* @throws SQLException
|
||||
*/
|
||||
public void insertRow(ProfiloTariffario pTar) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
String insert = " insert into " + tableName +
|
||||
" (" +
|
||||
fieldsName[CODICE] + "," +
|
||||
fieldsName[DESCRIZIONE] + "," +
|
||||
fieldsName[SISTEMA_MITTENTE] + ") "+
|
||||
" values (?,?,?)" ;
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = new LoggableStatement(c, insert);
|
||||
pstmt.setString(1,pTar.getCODICE());
|
||||
pstmt.setString(2,pTar.getDESCRIZIONE());
|
||||
pstmt.setString(3,pTar.getSISTEMA_MITTENTE());
|
||||
//SET end
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing query: " +
|
||||
((LoggableStatement) pstmt).getQueryString());
|
||||
pstmt.execute();
|
||||
}
|
||||
catch (SQLException e) {
|
||||
//se il codice errore è la violazione della PK --> update
|
||||
if (e.getErrorCode() == 1) {
|
||||
updateRow(pTar);
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
finally {
|
||||
closeAll(null, pstmt, c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* updateRow - Aggiiorna una riga nelle tabelle di anagrafica
|
||||
*
|
||||
* @param pTar ProfiloTariffario
|
||||
* @throws SQLException
|
||||
*/
|
||||
public void updateRow(ProfiloTariffario pTar) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
String update = " update " + tableName +
|
||||
" set " + fieldsName[DESCRIZIONE] + "=?" +
|
||||
" where " + fieldsName[CODICE] + "=? " +
|
||||
" and " + fieldsName[SISTEMA_MITTENTE] + "=?";
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = new LoggableStatement(c, update);
|
||||
pstmt.setString(1, pTar.getDESCRIZIONE());
|
||||
pstmt.setString(2, pTar.getCODICE());
|
||||
pstmt.setString(3, pTar.getSISTEMA_MITTENTE());
|
||||
//SET end
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing query: " +
|
||||
((LoggableStatement) pstmt).getQueryString());
|
||||
pstmt.execute();
|
||||
} catch (SQLException e) {
|
||||
throw e;
|
||||
} finally {
|
||||
closeAll(null, pstmt, c);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* selectFromView - Seleziona dalle view di anagrafica
|
||||
*
|
||||
* @param orderByFieldIndex int
|
||||
* @throws SQLException
|
||||
* @return List
|
||||
*/
|
||||
public List selectFromView(int orderByFieldIndex) throws SQLException {
|
||||
|
||||
String s = "SELECT " +
|
||||
" a." + fieldsName[this.CODICE] + "," +
|
||||
" a." + fieldsName[this.DESCRIZIONE] + "," +
|
||||
" a." + fieldsName[this.SISTEMA_MITTENTE] + "," +
|
||||
" a." + fieldsName[this.TIPO_CLIENTE] +
|
||||
" from " + viewName + " a " +
|
||||
" order by " + fieldsName[orderByFieldIndex];
|
||||
|
||||
return select(s);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,528 @@
|
||||
/*
|
||||
* Created on 12-set-05
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.sync.dto.RecipientReqDTO;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class RecipientReqDAO extends BaseReqDAO {
|
||||
|
||||
static Logger logger = Logger.getLogger(RecipientReqDAO.class);
|
||||
|
||||
public RecipientReqDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
String sqlInsertReq =
|
||||
"INSERT INTO DBCGO_GESTIONE_RICHIESTA_REC( " +
|
||||
"TIMESTAMP, " +
|
||||
"ID_RICHIESTA, " +
|
||||
"STATO, " +
|
||||
"TIPO_CLIENTE, " +
|
||||
"DATA_CUT_OVER_CALC, " +
|
||||
"DATA_VALIDAZIONE_MAX, " +
|
||||
"DATARICEZIONERICHIESTA, " +
|
||||
"DATA_CUT_OVER, " +
|
||||
"DATA_TRANSIZIONE_STATO, " +
|
||||
"CODICE_OPERATORE_DONATING, " +
|
||||
"CODICE_OPERATORE_RECIPIENT, " +
|
||||
"MSISDN, " +
|
||||
"CODICE_FISCALE_PARTITA_IVA, " +
|
||||
"CODICE_PRE_POST_PAGATO, " +
|
||||
"NOME_CLIENTE, " +
|
||||
"COGNOME_CLIENTE, " +
|
||||
"RAGIONE_SOCIALE, " +
|
||||
"CAUSALE_ACCODAMENTO, " +
|
||||
"RICHIESTAADHOC, " +
|
||||
"RICHIESTAADHOCAOM, " +
|
||||
"ICCD_SERIAL_NUMBER, " +
|
||||
"IMSI, " +
|
||||
"NOME_OT, " +
|
||||
"NUMERO_DOCUMENTO, " +
|
||||
"TIPO_DOCUMENTO, " +
|
||||
"NUMERO_INVII, " +
|
||||
"ID_PRIORITA_MNP, " +
|
||||
"INSERT_DATE, " +
|
||||
"UPDATE_DATE, " +
|
||||
"DATA_TRANSIZIONE_STATO_GRP, " +
|
||||
"CODICE_GRUPPO, " +
|
||||
"CODICE_DEALER," +
|
||||
"CAR1," +
|
||||
"CAR2," +
|
||||
"SISTEMA_MITTENTE," +
|
||||
"COD_PROFILO_TARIFFARIO,"+
|
||||
"COD_ACCORDO," +
|
||||
"COD_OFFERTA," +
|
||||
"DESCANALE_VENDITA_BU," +
|
||||
"TIPO_OPERAZIONE," +
|
||||
"CODICE_ORDINE," +
|
||||
"FLAG_TC," +
|
||||
"DATA_PRESA_IN_CARICO," +
|
||||
"CODICE_OPERATORE_V_DONOR," +
|
||||
"CODICE_OPERATORE_V_RECIPIENT," +
|
||||
"CODICI_RIFIUTO_VALIDAZIONE," +
|
||||
"FLAG_PREVALIDAZIONE," +
|
||||
"FLAG_FURTO, DATA_ACQUISIZIONE, " +
|
||||
"DATA_VALIDAZIONE_EFFETTIVA, " +
|
||||
"DATA_CUT_OVER_EFF, "+
|
||||
"FLAG_ESP, " +
|
||||
"BUSINESS_ID, "+
|
||||
"CODICE_ISTAT, "+
|
||||
"CODICE_PDV, "+
|
||||
"CANALE, "+
|
||||
"SOTTO_CANALE, "+
|
||||
"TIPO_ACCOUNT_CIM "+
|
||||
" ) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
|
||||
String sqlUpdateReqByRequestId =
|
||||
"UPDATE DBCGO_GESTIONE_RICHIESTA_REC SET " +
|
||||
"TIMESTAMP = ?, " +
|
||||
"STATO = ?, " +
|
||||
"TIPO_CLIENTE = ?, " +
|
||||
"DATA_CUT_OVER_CALC = ?, " +
|
||||
"DATA_VALIDAZIONE_MAX = ?, " +
|
||||
"DATARICEZIONERICHIESTA = ?, " +
|
||||
"DATA_CUT_OVER = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO = ?, " +
|
||||
"CODICE_OPERATORE_DONATING = ?, " +
|
||||
"CODICE_OPERATORE_RECIPIENT = ?, " +
|
||||
"MSISDN = ?, " +
|
||||
"CODICE_FISCALE_PARTITA_IVA = ?, " +
|
||||
"CODICE_PRE_POST_PAGATO = ?, " +
|
||||
"NOME_CLIENTE = ?, " +
|
||||
"COGNOME_CLIENTE = ?, " +
|
||||
"RAGIONE_SOCIALE = ?, " +
|
||||
"CAUSALE_ACCODAMENTO = ?, " +
|
||||
"RICHIESTAADHOC = ?, " +
|
||||
"RICHIESTAADHOCAOM = ?, " +
|
||||
"ICCD_SERIAL_NUMBER = ?, " +
|
||||
"IMSI = ?, " +
|
||||
"NUMERO_DOCUMENTO = ?, " +
|
||||
"TIPO_DOCUMENTO = ?, " +
|
||||
"NUMERO_INVII = ?, " +
|
||||
"ID_PRIORITA_MNP = ?, " +
|
||||
"UPDATE_DATE = ?, " +
|
||||
"CODICE_GRUPPO = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO_GRP = ?, " +
|
||||
"FLAG_TC = ?, " +
|
||||
"DATA_PRESA_IN_CARICO = ?, " +
|
||||
"CODICE_OPERATORE_V_DONOR = ?, " +
|
||||
"CODICE_OPERATORE_V_RECIPIENT = ?, " +
|
||||
"CODICI_RIFIUTO_VALIDAZIONE = ? ," +
|
||||
"FLAG_PREVALIDAZIONE = ?, " +
|
||||
"FLAG_FURTO = ? , DATA_ACQUISIZIONE = ?, " +
|
||||
"DATA_VALIDAZIONE_EFFETTIVA = ?, " +
|
||||
"DATA_CUT_OVER_EFF = ?, "+
|
||||
"FLAG_ESP = ?, " +
|
||||
"BUSINESS_ID=? "+
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlUpdateReqButNotStateGrpByRequestId=
|
||||
"UPDATE DBCGO_GESTIONE_RICHIESTA_REC SET " +
|
||||
"TIMESTAMP = ?, " +
|
||||
"STATO = ?, " +
|
||||
"TIPO_CLIENTE = ?, " +
|
||||
"DATA_CUT_OVER_CALC = ?, " +
|
||||
"DATA_VALIDAZIONE_MAX = ?, " +
|
||||
"DATARICEZIONERICHIESTA = ?, " +
|
||||
"DATA_CUT_OVER = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO = ?, " +
|
||||
"CODICE_OPERATORE_DONATING = ?, " +
|
||||
"CODICE_OPERATORE_RECIPIENT = ?, " +
|
||||
"MSISDN = ?, " +
|
||||
"CODICE_FISCALE_PARTITA_IVA = ?, " +
|
||||
"CODICE_PRE_POST_PAGATO = ?, " +
|
||||
"NOME_CLIENTE = ?, " +
|
||||
"COGNOME_CLIENTE = ?, " +
|
||||
"RAGIONE_SOCIALE = ?, " +
|
||||
"CAUSALE_ACCODAMENTO = ?, " +
|
||||
"RICHIESTAADHOC = ?, " +
|
||||
"RICHIESTAADHOCAOM = ?, " +
|
||||
"ICCD_SERIAL_NUMBER = ?, " +
|
||||
"IMSI = ?, " +
|
||||
"NUMERO_DOCUMENTO = ?, " +
|
||||
"TIPO_DOCUMENTO = ?, " +
|
||||
"NUMERO_INVII = ?, " +
|
||||
"ID_PRIORITA_MNP = ?, " +
|
||||
"UPDATE_DATE = ?, " +
|
||||
"CODICE_GRUPPO = ?, " +
|
||||
"FLAG_TC = ?, " +
|
||||
"DATA_PRESA_IN_CARICO = ?, " +
|
||||
"CODICE_OPERATORE_V_DONOR = ?, " +
|
||||
"CODICE_OPERATORE_V_RECIPIENT = ?, " +
|
||||
"CODICI_RIFIUTO_VALIDAZIONE = ?," +
|
||||
"FLAG_PREVALIDAZIONE = ? ," +
|
||||
"FLAG_FURTO = ? , DATA_ACQUISIZIONE = ?, " +
|
||||
"DATA_VALIDAZIONE_EFFETTIVA = ?, " +
|
||||
"DATA_CUT_OVER_EFF = ?, "+
|
||||
"FLAG_ESP = ?, " +
|
||||
"BUSINESS_ID=? "+
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlCountReqByRequestId =
|
||||
" SELECT COUNT(ID_RICHIESTA) " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA_REC " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlLoadTimestampReqByRequestId =
|
||||
" SELECT TIMESTAMP " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA_REC " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlLoadStateReqByRequestId =
|
||||
" SELECT STATO " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA_REC " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlLoadByRequestId =
|
||||
" SELECT TIMESTAMP,STATO " +
|
||||
" FROM DBCGO_GESTIONE_RICHIESTA_REC " +
|
||||
" WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlIsStateGrpChanged =
|
||||
"select a.id_stato_grp - b.id_stato_grp ischanged " +
|
||||
"from dbcgo_stato_rec a, dbcgo_stato_rec b " +
|
||||
"where a.id_stato=? " +
|
||||
"and b.id_stato=? ";
|
||||
|
||||
String sqlGetStateType =
|
||||
"SELECT stato_type "+
|
||||
"FROM dbcgo_stato_rec "+
|
||||
"where id_stato= ?";
|
||||
|
||||
String sqlStoreCodiceCanale =
|
||||
"update dbcgo_gestione_richiesta_rec rec set rec.cod_canale= "+
|
||||
"(select decode(a.tipo_cliente,'CO',saf.CANALE_ACQUISIZIONE,'BU', q.name,null) "+
|
||||
"from dbcgo_gestione_richiesta_rec a,dbcgo_lov q,sap_anag_fv saf "+
|
||||
"where a.CODICE_DEALER=saf.cod_id(+) "+
|
||||
"AND a.descanale_vendita_BU=q.descr(+) "+
|
||||
"and a.id_richiesta=?) "+
|
||||
"where rec.id_richiesta=?";
|
||||
|
||||
public int countByRequestID(String requestId)
|
||||
throws SQLException {
|
||||
|
||||
return super.countByRequestID(
|
||||
sqlCountReqByRequestId,
|
||||
requestId
|
||||
);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
public Timestamp getTimestampByRequestID(String requestId)
|
||||
throws SQLException {
|
||||
|
||||
return super.getTimestampByRequestID(
|
||||
sqlLoadTimestampReqByRequestId,
|
||||
requestId);
|
||||
}
|
||||
public int getStateByRequestID(String id_richiesta) throws SQLException {
|
||||
|
||||
return super.getStateByRequestID(
|
||||
sqlLoadStateReqByRequestId,
|
||||
id_richiesta);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------
|
||||
public void insertRequest(RecipientReqDTO dto)
|
||||
throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
//pstmt = c.prepareStatement(sqlInsertReq);
|
||||
pstmt = new LoggableStatement(c, sqlInsertReq);
|
||||
|
||||
//SET start
|
||||
Date now = new Date();
|
||||
|
||||
pstmt.setTimestamp(1,dto.timestamp);
|
||||
pstmt.setString(2,dto.idRichiesta);
|
||||
pstmt.setInt(3,dto.stato);
|
||||
pstmt.setString(4,dto.tipoCliente);
|
||||
pstmt.setDate(5,utilToSql(dto.dataCutOverCalc));
|
||||
pstmt.setDate(6,utilToSql(dto.dataValidazioneMax));
|
||||
pstmt.setDate(7,utilToSql(dto.dataRicezioneRichiesta));
|
||||
pstmt.setDate(8,utilToSql(dto.dataCutOver));
|
||||
pstmt.setDate(9,utilToSql(dto.dataTransizioneStato));
|
||||
pstmt.setString(10,dto.codiceOperatoreDonating);
|
||||
pstmt.setString(11,dto.codiceOperatoreRecipient);
|
||||
pstmt.setString(12,dto.msisdn);
|
||||
pstmt.setString(13,dto.codiceFiscalePartitaIva);
|
||||
pstmt.setString(14,dto.codicePrePostPagato);
|
||||
pstmt.setString(15,dto.nomeCliente);
|
||||
pstmt.setString(16,dto.cognomeCliente);
|
||||
pstmt.setString(17,dto.ragioneSociale);
|
||||
pstmt.setString(18,dto.causaleAccodamento);
|
||||
pstmt.setInt(19,dto.richiestaAdHoc);
|
||||
pstmt.setInt(20,dto.richiestaAdHocAom);
|
||||
pstmt.setString(21,dto.iccdSerialNumber);
|
||||
pstmt.setString(22,dto.imsi);
|
||||
pstmt.setString(23,dto.nomeOt);
|
||||
pstmt.setString(24,dto.numeroDocumento);
|
||||
pstmt.setString(25,dto.tipoDocumento);
|
||||
pstmt.setInt(26,dto.numeroInvii);
|
||||
pstmt.setInt(27,dto.idPrioritaMnp);
|
||||
pstmt.setDate(28,new java.sql.Date(now.getTime()));
|
||||
pstmt.setDate(29,new java.sql.Date(now.getTime()));
|
||||
pstmt.setDate(30,utilToSql(dto.dataTransizioneStato));
|
||||
pstmt.setString(31,dto.codiceGruppo);
|
||||
pstmt.setString(32,dto.codiceDealer);
|
||||
pstmt.setString(33,dto.valoreCliente);
|
||||
pstmt.setString(34,dto.valoreSpesa);
|
||||
pstmt.setString(35,dto.sistemaMittente);
|
||||
pstmt.setString(36,dto.codProfiloTariffario);
|
||||
pstmt.setString(37,dto.codAccordo);
|
||||
pstmt.setString(38,dto.codOfferta);
|
||||
pstmt.setString(39,dto.descanaleVendita);
|
||||
pstmt.setString(40,dto.tipoOperazione);
|
||||
pstmt.setString(41,dto.codiceOrdine);
|
||||
pstmt.setString(42,dto.flagTrasferimentoCredito);
|
||||
pstmt.setDate(43,utilToSql(dto.dataPresaInCarico));
|
||||
pstmt.setString(44,isOperatoreVirtuale(dto.codiceOperatoreDonating,dto.codiceOperatoreDonEffettivo));
|
||||
pstmt.setString(45,isOperatoreVirtuale(dto.codiceOperatoreRecipient,dto.codiceOperatoreRecEffettivo));
|
||||
pstmt.setString(46,dto.codiceRifiutoValidazione);
|
||||
pstmt.setString(47,dto.flagPrevalidazione);
|
||||
pstmt.setString(48,dto.flagFurto);
|
||||
pstmt.setDate(49, utilToSql(dto.dataAcquisizione));
|
||||
|
||||
// aggiunte kit Aprile 2012
|
||||
pstmt.setDate(50, utilToSql(dto.data_cut_over_eff));
|
||||
pstmt.setDate(51, utilToSql(dto.data_validazione_eff));
|
||||
pstmt.setInt(52, dto.flagEsp);
|
||||
pstmt.setString(53, dto.businessId);
|
||||
|
||||
pstmt.setString(54, dto.codiceIstat);
|
||||
pstmt.setString(55, dto.codicePdv);
|
||||
pstmt.setString(56, dto.canale);
|
||||
pstmt.setString(57, dto.sottoCanale);
|
||||
pstmt.setString(58, dto.tipoAccountCim);
|
||||
|
||||
//SET end
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing query: "+ ((LoggableStatement)pstmt).getQueryString());
|
||||
pstmt.execute();
|
||||
|
||||
}
|
||||
finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------------
|
||||
public void updateRequest(RecipientReqDTO dto) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
|
||||
if (dto.dataTransizioneStatoGrp == null){
|
||||
pstmt = new LoggableStatement(c, sqlUpdateReqButNotStateGrpByRequestId);
|
||||
} else {
|
||||
pstmt = new LoggableStatement(c, sqlUpdateReqByRequestId);
|
||||
}
|
||||
|
||||
//SET start
|
||||
Date now = new Date();
|
||||
|
||||
pstmt.setTimestamp(1,dto.timestamp);
|
||||
pstmt.setInt(2,dto.stato);
|
||||
pstmt.setString(3,dto.tipoCliente);
|
||||
pstmt.setDate(4,utilToSql(dto.dataCutOverCalc));
|
||||
pstmt.setDate(5,utilToSql(dto.dataValidazioneMax));
|
||||
pstmt.setDate(6,utilToSql(dto.dataRicezioneRichiesta));
|
||||
pstmt.setDate(7,utilToSql(dto.dataCutOver));
|
||||
pstmt.setDate(8,utilToSql(dto.dataTransizioneStato));
|
||||
pstmt.setString(9,dto.codiceOperatoreDonating);
|
||||
pstmt.setString(10,dto.codiceOperatoreRecipient);
|
||||
pstmt.setString(11,dto.msisdn);
|
||||
pstmt.setString(12,dto.codiceFiscalePartitaIva);
|
||||
pstmt.setString(13,dto.codicePrePostPagato);
|
||||
pstmt.setString(14,dto.nomeCliente);
|
||||
pstmt.setString(15,dto.cognomeCliente);
|
||||
pstmt.setString(16,dto.ragioneSociale);
|
||||
pstmt.setString(17,dto.causaleAccodamento);
|
||||
pstmt.setInt(18,dto.richiestaAdHoc);
|
||||
pstmt.setInt(19,dto.richiestaAdHocAom);
|
||||
pstmt.setString(20,dto.iccdSerialNumber);
|
||||
pstmt.setString(21,dto.imsi);
|
||||
pstmt.setString(22,dto.numeroDocumento);
|
||||
pstmt.setString(23,dto.tipoDocumento);
|
||||
pstmt.setInt(24,dto.numeroInvii);
|
||||
pstmt.setInt(25,dto.idPrioritaMnp);
|
||||
pstmt.setDate(26,new java.sql.Date(now.getTime())); //update date
|
||||
pstmt.setString(27,dto.codiceGruppo);
|
||||
if (dto.dataTransizioneStatoGrp == null){
|
||||
pstmt.setString(28,dto.flagTrasferimentoCredito);
|
||||
pstmt.setDate(29,utilToSql(dto.dataPresaInCarico));
|
||||
pstmt.setString(30,isOperatoreVirtuale(dto.codiceOperatoreDonating, dto.codiceOperatoreDonEffettivo));
|
||||
pstmt.setString(31,isOperatoreVirtuale(dto.codiceOperatoreRecipient,dto.codiceOperatoreRecEffettivo));
|
||||
pstmt.setString(32,dto.codiceRifiutoValidazione);
|
||||
pstmt.setString(33,dto.flagPrevalidazione);
|
||||
pstmt.setString(34,dto.flagFurto);
|
||||
pstmt.setDate(35, utilToSql(dto.dataAcquisizione));
|
||||
//kit aprile 2012
|
||||
pstmt.setDate(36,utilToSql(dto.data_validazione_eff));
|
||||
pstmt.setDate(37,utilToSql(dto.data_cut_over_eff));
|
||||
pstmt.setInt(38, dto.flagEsp);
|
||||
pstmt.setString(39, dto.businessId);
|
||||
//
|
||||
pstmt.setString(40,dto.idRichiesta);
|
||||
} else {
|
||||
pstmt.setDate(28,utilToSql(dto.dataTransizioneStatoGrp));
|
||||
pstmt.setString(29,dto.flagTrasferimentoCredito);
|
||||
pstmt.setDate(30,utilToSql(dto.dataPresaInCarico));
|
||||
pstmt.setString(31,isOperatoreVirtuale(dto.codiceOperatoreDonating, dto.codiceOperatoreDonEffettivo));
|
||||
pstmt.setString(32,isOperatoreVirtuale(dto.codiceOperatoreRecipient,dto.codiceOperatoreRecEffettivo));
|
||||
pstmt.setString(33,dto.codiceRifiutoValidazione);
|
||||
pstmt.setString(34,dto.flagPrevalidazione);
|
||||
pstmt.setString(35,dto.flagFurto);
|
||||
pstmt.setDate(36, utilToSql(dto.dataAcquisizione));
|
||||
//kit aprile 2012
|
||||
pstmt.setDate(37,utilToSql(dto.data_validazione_eff));
|
||||
pstmt.setDate(38,utilToSql(dto.data_cut_over_eff));
|
||||
pstmt.setInt(39, dto.flagEsp);
|
||||
pstmt.setString(40, dto.businessId);
|
||||
//
|
||||
pstmt.setString(41,dto.idRichiesta);
|
||||
}
|
||||
|
||||
//SET end
|
||||
pstmt.execute();
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing update: "+
|
||||
((LoggableStatement)pstmt).getQueryString());
|
||||
}
|
||||
finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
}
|
||||
|
||||
public java.sql.Date utilToSql(java.util.Date utilDate) {
|
||||
|
||||
java.sql.Date sqlDate = null;
|
||||
|
||||
if (utilDate != null) {
|
||||
sqlDate = new java.sql.Date(utilDate.getTime());
|
||||
}
|
||||
|
||||
return sqlDate;
|
||||
}
|
||||
|
||||
public boolean isStateGrpChanged(int stateOld, int stateNew) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
boolean isChanged = true;
|
||||
int res = 0;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlIsStateGrpChanged);
|
||||
pstmt.setInt(1, stateOld);
|
||||
pstmt.setInt(2, stateNew);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
res = rs.getInt(1);
|
||||
}
|
||||
else
|
||||
throw new RuntimeException("Unable to check state group.");
|
||||
|
||||
if (res == 0) isChanged = false;
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
|
||||
return isChanged;
|
||||
}
|
||||
|
||||
public RecipientReqDTO getByRequestId(String requestId) throws SQLException {
|
||||
//estrae solo i dati che servono
|
||||
|
||||
RecipientReqDTO rr = new RecipientReqDTO();
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = c.prepareStatement(sqlLoadByRequestId);
|
||||
pstmt.setString(1, requestId);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
rr.timestamp = rs.getTimestamp(1);
|
||||
rr.stato = rs.getInt(2);
|
||||
}
|
||||
else
|
||||
throw new RuntimeException("Unable to retrieve recipient request with id " + requestId);
|
||||
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, pstmt, c);
|
||||
}
|
||||
|
||||
return rr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ritorna il state type(attivo,finale positivo,finale negativo)
|
||||
* per la richiesta in questione
|
||||
* @param id_richiesta String
|
||||
* @throws SQLException
|
||||
* @return int
|
||||
*/
|
||||
public int getStateType(int stato) throws SQLException {
|
||||
return super.getStateType(sqlGetStateType,stato);
|
||||
}
|
||||
|
||||
public void storeCodiceCanale(String idRichiesta) throws SQLException {
|
||||
|
||||
Connection c = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
c = getConnection();
|
||||
pstmt = new LoggableStatement(c, sqlStoreCodiceCanale);
|
||||
pstmt.setString(1,idRichiesta);
|
||||
pstmt.setString(2,idRichiesta);
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing query: "+ ((LoggableStatement)pstmt).getQueryString());
|
||||
pstmt.execute();
|
||||
} finally {
|
||||
closeAll(rs,pstmt,c);
|
||||
}
|
||||
}
|
||||
|
||||
private String isOperatoreVirtuale(String codOperatore, String codOperatoreEffettivo){
|
||||
if(codOperatore.equalsIgnoreCase(codOperatoreEffettivo)){
|
||||
//Operatore reale
|
||||
return null;
|
||||
} else {
|
||||
return codOperatoreEffettivo;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import it.valueteam.dbcgo.sync.dto.RecipientTCReqDTO;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class RecipientTCReqDAO extends BaseReqDAO {
|
||||
|
||||
static Logger logger = Logger.getLogger(RecipientTCReqDAO.class);
|
||||
|
||||
public RecipientTCReqDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
String sqlInsertTCReq =
|
||||
"INSERT INTO DBCGO_GESTIONE_RICHIESTA_R_TC(" +
|
||||
"ID_RICHIESTA, " +
|
||||
"DATA_NOTIFICA_CREDITO, " +
|
||||
"ORA_NOTIFICA_CREDITO, " +
|
||||
"STATO, " +
|
||||
"IMPORTO, " +
|
||||
"NOME_FILE_AOM, " +
|
||||
"DATA_TRANSIZIONE_STATO," +
|
||||
"DATA_ORA_MODIFICA,"+
|
||||
"FLAG_VERIFICA_CREDITO_ANOMALO "+
|
||||
") VALUES (" +
|
||||
"?,?,?,?,?,?,?,?,?)";
|
||||
|
||||
String sqlUpdateTCReqByIdRichiesta =
|
||||
"UPDATE DBCGO_GESTIONE_RICHIESTA_R_TC SET " +
|
||||
"DATA_NOTIFICA_CREDITO = ?, " +
|
||||
"ORA_NOTIFICA_CREDITO = ?, " +
|
||||
"STATO = ?, " +
|
||||
"IMPORTO = ?, " +
|
||||
"NOME_FILE_AOM = ?, " +
|
||||
"DATA_TRANSIZIONE_STATO = ?, " +
|
||||
"DATA_ORA_MODIFICA = ?, " +
|
||||
"FLAG_VERIFICA_CREDITO_ANOMALO = ? " +
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlCountTCReqByIdRichiesta =
|
||||
"SELECT COUNT(ID_RICHIESTA) " +
|
||||
"FROM DBCGO_GESTIONE_RICHIESTA_R_TC " +
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
String sqlLoadTCRequestByIdRichiesta =
|
||||
"SELECT ID_RICHIESTA, DATA_NOTIFICA_CREDITO, ORA_NOTIFICA_CREDITO, STATO, IMPORTO, NOME_FILE_AOM, "+
|
||||
"DATA_TRANSIZIONE_STATO, DATA_ORA_MODIFICA,FLAG_VERIFICA_CREDITO_ANOMALO " +
|
||||
"FROM DBCGO_GESTIONE_RICHIESTA_R_TC " +
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
|
||||
/*
|
||||
// non utilizzata
|
||||
String sqlLoadDataTransizioneStatoTCReqByIdRichiesta =
|
||||
"SELECT DATA_TRANSIZIONE_STATO " +
|
||||
"FROM DBCGO_GESTIONE_RICHIESTA_R_TC " +
|
||||
"WHERE ID_RICHIESTA = ? ";
|
||||
*/
|
||||
|
||||
public void insertRequest(RecipientTCReqDTO aRecipientTCReqDTO) throws SQLException {
|
||||
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
connection = getConnection();
|
||||
pstmt = new LoggableStatement(connection, sqlInsertTCReq);
|
||||
|
||||
pstmt.setString(1, aRecipientTCReqDTO.getIdRichiesta());
|
||||
pstmt.setDate(2, utilToSql(aRecipientTCReqDTO.getDataNotificaCredito()));
|
||||
pstmt.setString(3, aRecipientTCReqDTO.getOraNotificaCredito());
|
||||
pstmt.setInt(4, aRecipientTCReqDTO.getStato().intValue());
|
||||
pstmt.setFloat(5, aRecipientTCReqDTO.getImporto().floatValue());
|
||||
pstmt.setString(6, aRecipientTCReqDTO.getNomeFileAOM());
|
||||
pstmt.setDate(7, new java.sql.Date(aRecipientTCReqDTO.getDataTransizioneStato().getTime()));
|
||||
pstmt.setTimestamp(8, aRecipientTCReqDTO.getDataOraModifica());
|
||||
if (aRecipientTCReqDTO.getFlagVerificaCreditoAnomalo()!=null)
|
||||
pstmt.setLong(9, aRecipientTCReqDTO.getFlagVerificaCreditoAnomalo().longValue());
|
||||
else
|
||||
pstmt.setLong(9, 0);
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing query: "+ ((LoggableStatement)pstmt).getQueryString());
|
||||
pstmt.execute();
|
||||
|
||||
} finally {
|
||||
closeAll(rs,pstmt,connection);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateRequest(RecipientTCReqDTO aRecipientTCReqDTO) throws SQLException {
|
||||
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
connection = getConnection();
|
||||
pstmt = new LoggableStatement(connection, sqlUpdateTCReqByIdRichiesta);
|
||||
|
||||
pstmt.setDate(1, utilToSql(aRecipientTCReqDTO.getDataNotificaCredito()));
|
||||
pstmt.setString(2, aRecipientTCReqDTO.getOraNotificaCredito());
|
||||
pstmt.setInt(3, aRecipientTCReqDTO.getStato().intValue());
|
||||
pstmt.setFloat(4, aRecipientTCReqDTO.getImporto().floatValue());
|
||||
pstmt.setString(5, aRecipientTCReqDTO.getNomeFileAOM());
|
||||
pstmt.setDate(6, new java.sql.Date(aRecipientTCReqDTO.getDataTransizioneStato().getTime()));
|
||||
pstmt.setTimestamp(7, aRecipientTCReqDTO.getDataOraModifica());
|
||||
pstmt.setLong(8, aRecipientTCReqDTO.getFlagVerificaCreditoAnomalo().longValue());
|
||||
pstmt.setString(9, aRecipientTCReqDTO.getIdRichiesta());
|
||||
|
||||
pstmt.execute();
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Executing update: " + ((LoggableStatement)pstmt).getQueryString());
|
||||
|
||||
} finally {
|
||||
closeAll(rs,pstmt,connection);
|
||||
}
|
||||
}
|
||||
|
||||
public int getNumeroRichiesteById(String idRichiesta) throws SQLException {
|
||||
return super.countByRequestID(sqlCountTCReqByIdRichiesta, idRichiesta);
|
||||
}
|
||||
|
||||
|
||||
public RecipientTCReqDTO getRichiestaById(String idRichiesta) throws SQLException {
|
||||
|
||||
RecipientTCReqDTO aRecipientTCReqDTO = new RecipientTCReqDTO();
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
connection = getConnection();
|
||||
pstmt = connection.prepareStatement(sqlLoadTCRequestByIdRichiesta);
|
||||
pstmt.setString(1, idRichiesta);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
aRecipientTCReqDTO.setIdRichiesta(rs.getString(1));
|
||||
aRecipientTCReqDTO.setDataNotificaCredito(rs.getDate(2));
|
||||
aRecipientTCReqDTO.setOraNotificaCredito(rs.getString(3));
|
||||
aRecipientTCReqDTO.setStato(new Integer(rs.getInt(4)));
|
||||
aRecipientTCReqDTO.setImporto(new Float(rs.getFloat(5)));
|
||||
aRecipientTCReqDTO.setNomeFileAOM(rs.getString(6));
|
||||
aRecipientTCReqDTO.setDataTransizioneStato(rs.getTimestamp(7));
|
||||
aRecipientTCReqDTO.setDataOraModifica(rs.getTimestamp(8));
|
||||
aRecipientTCReqDTO.setFlagVerificaCreditoAnomalo(new Long(rs.getLong(9)));
|
||||
}
|
||||
} finally {
|
||||
closeAll(rs, pstmt, connection);
|
||||
}
|
||||
return aRecipientTCReqDTO;
|
||||
}
|
||||
|
||||
/*
|
||||
// forse non serve
|
||||
public Date getDataTransizioneStatoById(String idRichiesta) throws SQLException {
|
||||
|
||||
Date dataTransizioneStato = null;
|
||||
Connection connection = null;
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
|
||||
try {
|
||||
connection = getConnection();
|
||||
pstmt = connection.prepareStatement(sqlLoadDataTransizioneStatoTCReqByIdRichiesta);
|
||||
pstmt.setString(1, idRichiesta);
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
dataTransizioneStato = rs.getDate(1);
|
||||
}
|
||||
} finally {
|
||||
closeAll(rs, pstmt, connection);
|
||||
}
|
||||
return dataTransizioneStato;
|
||||
}
|
||||
*/
|
||||
|
||||
public java.sql.Date utilToSql(java.util.Date utilDate) {
|
||||
java.sql.Date sqlDate = null;
|
||||
|
||||
if (utilDate != null) {
|
||||
sqlDate = new java.sql.Date(utilDate.getTime());
|
||||
}
|
||||
return sqlDate;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
public class SapAnagFV extends Entity{
|
||||
|
||||
public SapAnagFV() {
|
||||
fieldsValue= new String[SapAnagFVDAO.FIELDCOUNT];
|
||||
}
|
||||
|
||||
public String getCOD_ID() {
|
||||
return getFieldValue(SapAnagFVDAO.COD_ID);
|
||||
}
|
||||
public void setCOD_ID(String value) {
|
||||
setFieldValue(SapAnagFVDAO.COD_ID, value);
|
||||
}
|
||||
public String getCOD_ID_PADRE() {
|
||||
return getFieldValue(SapAnagFVDAO.COD_ID_PADRE);
|
||||
}
|
||||
public void setCOD_ID_PADRE(String value) {
|
||||
setFieldValue(SapAnagFVDAO.COD_ID_PADRE, value);
|
||||
}
|
||||
public String getMERCATO() {
|
||||
return getFieldValue(SapAnagFVDAO.MERCATO);
|
||||
}
|
||||
public void setMERCATO(String value) {
|
||||
setFieldValue(SapAnagFVDAO.MERCATO, value);
|
||||
}
|
||||
public String getDISLOCAZIONE_TERR() {
|
||||
return getFieldValue(SapAnagFVDAO.DISLOCAZIONE_TERR);
|
||||
}
|
||||
public void setDISLOCAZIONE_TERR(String value) {
|
||||
setFieldValue(SapAnagFVDAO.DISLOCAZIONE_TERR, value);
|
||||
}
|
||||
public String getSTATO() {
|
||||
return getFieldValue(SapAnagFVDAO.STATO);
|
||||
}
|
||||
public void setSTATO(String value) {
|
||||
setFieldValue(SapAnagFVDAO.STATO, value);
|
||||
}
|
||||
public String getCANALE_ACQUISIZIONE() {
|
||||
return getFieldValue(SapAnagFVDAO.CANALE_ACQUISIZIONE);
|
||||
}
|
||||
public void setCANALE_ACQUISIZIONE(String value) {
|
||||
setFieldValue(SapAnagFVDAO.CANALE_ACQUISIZIONE, value);
|
||||
}
|
||||
public String getSOTTOCANALE_ACQUISIZIONE() {
|
||||
return getFieldValue(SapAnagFVDAO.SOTTOCANALE_ACQUISIZIONE);
|
||||
}
|
||||
public void setSOTTOCANALE_ACQUISIZIONE(String value) {
|
||||
setFieldValue(SapAnagFVDAO.SOTTOCANALE_ACQUISIZIONE, value);
|
||||
}
|
||||
public String getSEGMENTAZIONE_CANALE() {
|
||||
return getFieldValue(SapAnagFVDAO.SEGMENTAZIONE_CANALE);
|
||||
}
|
||||
public void setSEGMENTAZIONE_CANALE(String value) {
|
||||
setFieldValue(SapAnagFVDAO.SEGMENTAZIONE_CANALE, value);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,319 @@
|
||||
package it.valueteam.dbcgo.dao;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.SQLException;
|
||||
import java.io.BufferedReader;
|
||||
import java.sql.Connection;
|
||||
import org.apache.log4j.Logger;
|
||||
import java.util.Properties;
|
||||
import it.valueteam.dbcgo.common.Key;
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
import it.valueteam.dbcgo.common.Utils;
|
||||
import it.valueteam.dbcgo.service.ServiceLocator;
|
||||
import it.valueteam.dbcgo.service.ServiceLocatorException;
|
||||
import it.valueteam.dbcgo.dao.BaseDAO;
|
||||
|
||||
public class SapAnagFVDAO extends BaseDAO {
|
||||
|
||||
static Logger logger = Logger.getLogger(SapAnagFVDAO.class);
|
||||
|
||||
public static final int COD_ID = 0;
|
||||
public static final int COD_ID_PADRE = 1;
|
||||
public static final int MERCATO = 2;
|
||||
public static final int DISLOCAZIONE_TERR = 3;
|
||||
public static final int STATO = 4;
|
||||
public static final int DEALER_TYPE=5;
|
||||
public static final int CANALE_ACQUISIZIONE = 6;
|
||||
public static final int SOTTOCANALE_ACQUISIZIONE = 7;
|
||||
public static final int SEGMENTAZIONE_CANALE = 8;
|
||||
|
||||
public static final int FIELDCOUNT = 9;
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"COD_ID",
|
||||
"COD_ID_PADRE",
|
||||
"MERCATO",
|
||||
"DISLOCAZIONE_TERR",
|
||||
"STATO",
|
||||
"DEALER_TYPE",
|
||||
"CANALE_ACQUISIZIONE",
|
||||
"SOTTOCANALE_ACQUISIZIONE",
|
||||
"SEGMENTAZIONE_CANALE"
|
||||
};
|
||||
|
||||
public static final String tableName = "SAP_ANAG_FV";
|
||||
|
||||
public SapAnagFVDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
//insert se non esiste
|
||||
//update se esiste
|
||||
public int upsert(SapAnagFV savf, Connection conn, Statement st) throws SQLException {
|
||||
int n = 0;
|
||||
String insert = " insert into " + tableName +
|
||||
" (" +
|
||||
fieldsName[COD_ID] + "," +
|
||||
fieldsName[COD_ID_PADRE] + "," +
|
||||
fieldsName[MERCATO] + "," +
|
||||
fieldsName[DISLOCAZIONE_TERR] + "," +
|
||||
fieldsName[STATO] + "," +
|
||||
fieldsName[CANALE_ACQUISIZIONE] + "," +
|
||||
fieldsName[SOTTOCANALE_ACQUISIZIONE] + "," +
|
||||
fieldsName[SEGMENTAZIONE_CANALE] +
|
||||
") values (" +
|
||||
"'" + savf.getCOD_ID() + "'," +
|
||||
"'" + savf.getCOD_ID_PADRE() + "'," +
|
||||
"'" + savf.getMERCATO() + "'," +
|
||||
"'" + savf.getDISLOCAZIONE_TERR() + "'," +
|
||||
savf.getSTATO() + "," +
|
||||
"'" + savf.getCANALE_ACQUISIZIONE() + "'," +
|
||||
"'" + savf.getSOTTOCANALE_ACQUISIZIONE() + "'," +
|
||||
"'" + savf.getSEGMENTAZIONE_CANALE() + "')";
|
||||
|
||||
String update = " update " + tableName +
|
||||
" set " +
|
||||
fieldsName[COD_ID_PADRE] + "='" + savf.getCOD_ID_PADRE() + "'," +
|
||||
fieldsName[DISLOCAZIONE_TERR] + "='" + savf.getDISLOCAZIONE_TERR() + "'," +
|
||||
fieldsName[MERCATO] + "='" + savf.getMERCATO() + "'," +
|
||||
fieldsName[STATO] + "=" + savf.getSTATO() + "," +
|
||||
fieldsName[CANALE_ACQUISIZIONE] + "='" + savf.getCANALE_ACQUISIZIONE() + "'," +
|
||||
fieldsName[SOTTOCANALE_ACQUISIZIONE] + "='" + savf.getSOTTOCANALE_ACQUISIZIONE() + "'," +
|
||||
fieldsName[SEGMENTAZIONE_CANALE] + "='" + savf.getSEGMENTAZIONE_CANALE() + "'" +
|
||||
" where " + fieldsName[COD_ID] + "='" + savf.getCOD_ID() + "'";
|
||||
|
||||
try {
|
||||
n = update(insert, st);
|
||||
} catch (SQLException e) {
|
||||
//se il codice errore è la violazione della PK --> update
|
||||
if (e.getErrorCode() == 1) {
|
||||
n = update(update, st);
|
||||
} else
|
||||
throw e;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
//dato uno stream in input aggiorna i dealer su db
|
||||
//insert se non esiste
|
||||
//update se esiste
|
||||
public int upsert(BufferedReader in, Properties param) throws SQLException, IOException {
|
||||
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
int lineNum = 0;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement();
|
||||
String line = "";
|
||||
while (line != null) {
|
||||
line = null;
|
||||
line = in.readLine();
|
||||
if (line == null)
|
||||
continue;
|
||||
lineNum++;
|
||||
logger.debug("Processing line " + lineNum);
|
||||
SapAnagFV safv = null;
|
||||
try {
|
||||
safv = getSapAnagFVFromLineData(line,param);
|
||||
} catch (IOException e) {
|
||||
//errore di parsing --> deve rifiutare il file
|
||||
throw new IOException("Error parsing line " + lineNum + " - " + e.getMessage());
|
||||
}
|
||||
|
||||
//se la riga è vuota si passa alla successiva
|
||||
if (safv == null) {
|
||||
logger.debug("Skipping line " + lineNum);
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
upsert(safv, conn, st);
|
||||
} catch (SQLException e) {
|
||||
//errore di db --> interruzionde del processo
|
||||
throw new SQLException("Error at line " + lineNum + " - " + e.getMessage());
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
closeAll(null, st,conn);
|
||||
}
|
||||
return lineNum;
|
||||
|
||||
}
|
||||
|
||||
private SapAnagFV getSapAnagFVFromLineData(String line, Properties struct) throws IOException {
|
||||
//input stringa da file
|
||||
//output la SapAnagFV
|
||||
//i numeri sono cablati in quanto il formato file è fisso
|
||||
//return null per saltare la riga
|
||||
|
||||
if (line == null)
|
||||
return null;
|
||||
if (line.trim().length() == 0)
|
||||
return null;
|
||||
|
||||
logger.debug(line);
|
||||
SapAnagFV s = new SapAnagFV();
|
||||
|
||||
//file type to parse
|
||||
String filetype = struct.getProperty(Key.SRC_FILE_TYPE);
|
||||
if(Key.SRC_FILE_TYPE_FIXEDLENGTH.equalsIgnoreCase(filetype)){
|
||||
int length= Integer.parseInt(struct.getProperty(Key.SRC_FILE_LINE_LENGTH));
|
||||
//controllo lunghezza riga
|
||||
if (line.length() != length) {
|
||||
throw new IOException("Wrong line length");
|
||||
}
|
||||
|
||||
//check insegna
|
||||
String dealerType = getValueFromName(line, struct, "FLG_CTIM_PDV");
|
||||
if ("I".equalsIgnoreCase(dealerType)){
|
||||
//se insegna viene ignorata la riga
|
||||
return null;
|
||||
}
|
||||
// ALESCAR 20100913 per SAP UNICO
|
||||
if ("E".equalsIgnoreCase(dealerType)){
|
||||
//se ESECUTORE PAGAMENTO ignora la riga
|
||||
return null;
|
||||
}
|
||||
//get dei valori
|
||||
for(int i=0;i<fieldsName.length;i++){
|
||||
String value = getValueFromName(line, struct, fieldsName[i]);
|
||||
if(i==STATO){
|
||||
if ("V".equals(value) || "A".equals(value) || "R".equals(value) || value.trim().length()==0)
|
||||
s.setSTATO("1");
|
||||
else if ("C".equals(value))
|
||||
s.setSTATO("0");
|
||||
else
|
||||
throw new IOException("Wrong state");
|
||||
}
|
||||
else{
|
||||
s.setFieldValue(i, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
throw new IOException("Invalid file type property: " + filetype);
|
||||
}
|
||||
|
||||
return s;
|
||||
|
||||
}
|
||||
|
||||
private String getValueFromName(String line, Properties struct, String name) throws NumberFormatException {
|
||||
String range=struct.getProperty(Key.SRC_FILE_LINE+"."+name);
|
||||
if (range == null)
|
||||
return null;
|
||||
logger.debug(Key.SRC_FILE_LINE+"."+name);
|
||||
logger.debug("range:" + range);
|
||||
int fromIndex = Integer.parseInt(range.substring(0, range.indexOf(",")).trim());
|
||||
int toIndex = Integer.parseInt(range.substring(range.indexOf(",")+1).trim());
|
||||
String value = line.substring(fromIndex, toIndex).trim();
|
||||
logger.debug(name + "("+fromIndex+","+toIndex+"): " + value);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
private List select(String s) throws SQLException {
|
||||
|
||||
logger.debug(s);
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
List l = new Vector();
|
||||
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(s);
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
while (rs.next()) {
|
||||
SapAnagFV item = new SapAnagFV();
|
||||
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
|
||||
int j = getFieldIndex(rsmd.getColumnName(i));
|
||||
if (j != -1) {
|
||||
String columType = rsmd.getColumnTypeName(i);
|
||||
if (columType.equalsIgnoreCase("DATE"))
|
||||
item.setFieldValue(j, Utils.getString((java.util.Date) rs.getDate(i)));
|
||||
else
|
||||
item.setFieldValue(j, rs.getString(i));
|
||||
}
|
||||
}
|
||||
l.add(item);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
closeAll(rs,st,conn);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
public static int getFieldIndex(String fieldName) {
|
||||
|
||||
for (int i = 0; i < FIELDCOUNT; i++) {
|
||||
if (fieldsName[i].equals(fieldName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public List selectByCodId(String codId) throws SQLException {
|
||||
|
||||
String s = "select " +
|
||||
fieldsName[COD_ID] + "," +
|
||||
fieldsName[COD_ID_PADRE] + "," +
|
||||
fieldsName[MERCATO] + "," +
|
||||
fieldsName[DISLOCAZIONE_TERR] + "," +
|
||||
fieldsName[STATO] + "," +
|
||||
" from " + tableName +
|
||||
" where " + fieldsName[COD_ID] + " = '" + codId + "'";
|
||||
|
||||
return select(s);
|
||||
|
||||
}
|
||||
|
||||
public List selectByDealerType(int dealerType, int orderByFieldIndex) throws SQLException {
|
||||
|
||||
List l = new Vector();
|
||||
String s = this.getSelectFields(fieldsName, tableName);
|
||||
s = s + " from " + tableName +
|
||||
" WHERE " + fieldsName[DEALER_TYPE] + " = " + dealerType +
|
||||
" ORDER BY " + fieldsName[orderByFieldIndex];
|
||||
|
||||
return select(s);
|
||||
|
||||
}
|
||||
|
||||
public String getOTByCodId(String codId) throws SQLException, ServiceLocatorException {
|
||||
|
||||
String[] dbcgoMercatoToDislocazioneTerr = ServiceLocator.getInstance().getDbcgoMercatoToDislocazioneTerr().split(",");
|
||||
String decode=" decode(a." + fieldsName[MERCATO];
|
||||
for (int i=0;i<dbcgoMercatoToDislocazioneTerr.length;i++)
|
||||
decode = decode + ",'" + dbcgoMercatoToDislocazioneTerr[i] + "',a." + fieldsName[DISLOCAZIONE_TERR];
|
||||
decode = decode + ",a." + fieldsName[MERCATO] + ")";
|
||||
|
||||
String s = "select d." + LovDAO.fieldsName[LovDAO.NAME] + " as " + fieldsName[MERCATO] +
|
||||
" from " +
|
||||
tableName + " a," +
|
||||
LovDAO.tableName + " b," +
|
||||
LovRefDAO.tableName + " c," +
|
||||
LovDAO.tableName + " d" +
|
||||
" where " +
|
||||
decode +"=b." + LovDAO.fieldsName[LovDAO.NAME] +
|
||||
" and b."+ LovDAO.fieldsName[LovDAO.LOV_NAME] + "='" +LovDAO.LOV_NAME_OT_SAP + "'" +
|
||||
" and b."+ LovDAO.fieldsName[LovDAO.LOV_ID] + "=c." +LovRefDAO.fieldsName[LovRefDAO.LOV_ID] +
|
||||
" and d."+ LovDAO.fieldsName[LovDAO.LOV_ID] + "=c." +LovRefDAO.fieldsName[LovRefDAO.LOV_ID_REF] +
|
||||
" and a." + fieldsName[COD_ID] + " = '" + codId + "'";
|
||||
|
||||
List l = select(s);
|
||||
if (l.size()==0)
|
||||
return null;
|
||||
else
|
||||
return ((SapAnagFV)l.get(0)).getMERCATO();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.Key;
|
||||
import it.valueteam.dbcgo.common.Utils;
|
||||
import it.valueteam.dbcgo.dao.BaseDAO;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
public abstract class AbstractReportDAO extends BaseDAO implements ReportDAOIF {
|
||||
|
||||
public AbstractReportDAO() throws Exception {
|
||||
super();
|
||||
}
|
||||
|
||||
public AbstractReportDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
public String getFileName(String reportName) throws Exception {
|
||||
return reportName.replaceAll(" ", "") + Utils.getString(new java.util.Date(), Key.DATE_FORMAT_CSV) + "." +Key.DOWNLOAD_FILE_EXT;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,262 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.ReportMap;
|
||||
import it.valueteam.dbcgo.common.Utils;
|
||||
import it.valueteam.dbcgo.dao.BaseDAO;
|
||||
import it.valueteam.dbcgo.dao.DaoUtils;
|
||||
import it.valueteam.dbcgo.dao.Filter;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class CanaleEvasioneDAO extends AbstractReportDAO implements ReportDAOIF {
|
||||
|
||||
public CanaleEvasioneDAO() throws Exception{
|
||||
super();
|
||||
TABLE_NAME = "MNP_RECIPIENT_CANALE_VIEW";
|
||||
TABLE_NAME_MASTER = "MNP_DWH_REC_PUSH";
|
||||
FROM_CLAUSE = " FROM " + TABLE_NAME + " " + ALIAS;
|
||||
}
|
||||
public CanaleEvasioneDAO(String tname, String master_tname) throws Exception{
|
||||
super();
|
||||
TABLE_NAME = tname;
|
||||
TABLE_NAME_MASTER = master_tname;
|
||||
FROM_CLAUSE = " FROM " + TABLE_NAME + " " + ALIAS;
|
||||
}
|
||||
|
||||
static Logger logger = Logger.getLogger(CanaleEvasioneDAO.class);
|
||||
|
||||
private String TABLE_NAME = "";
|
||||
private String TABLE_NAME_MASTER = "";
|
||||
private String FROM_CLAUSE = "";
|
||||
|
||||
private static final String ALIAS = "a";
|
||||
|
||||
public static final int FIELDCOUNT = 22;
|
||||
|
||||
public static final int ID_PROG=0;
|
||||
public static final int DATA_AGGIORNAMENTO = 1;
|
||||
public static final int TIPO_RICHIESTA = 2;
|
||||
public static final int TIPO_CLIENTE = 3;
|
||||
public static final int NOME_OT = 4;
|
||||
public static final int CODICE_DEALER = 5;
|
||||
public static final int TIPO_SERVIZIO = 6;
|
||||
public static final int DONATING = 7;
|
||||
public static final int DATA_EVENTO = 8;
|
||||
public static final int SETTIMANA_EVENTO = 9;
|
||||
public static final int MESE_EVENTO = 10;
|
||||
public static final int DESCR_STATO_EVENTO = 11;
|
||||
public static final int DESC_STATO_ATTUALE = 12;
|
||||
public static final int STATO_EVENTO = 13;
|
||||
public static final int STATO_ATTUALE = 14;
|
||||
public static final int COD_RIFIUTO = 15;
|
||||
public static final int CAUSALE_RIFIUTO = 16;
|
||||
public static final int CANALE_ACQUISIZIONE = 17;
|
||||
public static final int SOTTOCANALE_ACQUISIZIONE = 18;
|
||||
public static final int RIGA = 19;
|
||||
public static final int DONOR_EFFETTIVO=20;
|
||||
public static final int RECIPIENT_EFFETTIVO=21;
|
||||
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"ID_PROG",
|
||||
"DATA_AGGIORNAMENTO",
|
||||
"TIPO_RICHIESTA",
|
||||
"TIPO_CLIENTE",
|
||||
"NOME_OT",
|
||||
"CODICE_DEALER",
|
||||
"TIPO_SERVIZIO",
|
||||
"DONATING",
|
||||
"DATA_EVENTO",
|
||||
"SETTIMANA_EVENTO",
|
||||
"MESE_EVENTO",
|
||||
"DESCR_STATO_EVENTO",
|
||||
"DESC_STATO_ATTUALE",
|
||||
"STATO_EVENTO",
|
||||
"STATO_ATTUALE",
|
||||
"COD_RIFIUTO",
|
||||
"CAUSALE_RIFIUTO",
|
||||
"CANALE_ACQUISIZIONE",
|
||||
"SOTTOCANALE_ACQUISIZIONE",
|
||||
"RIGA",
|
||||
"DONOR_EFFETTIVO",
|
||||
"RECIPIENT_EFFETTIVO"
|
||||
};
|
||||
|
||||
|
||||
private static final String SELECT_CLAUSE = "SELECT "
|
||||
+ ALIAS +"." + fieldsName[ID_PROG] + ","
|
||||
+ ALIAS + "." + fieldsName[DATA_AGGIORNAMENTO] + ","
|
||||
+ ALIAS + "." + fieldsName[TIPO_RICHIESTA] + ","
|
||||
+ ALIAS + "." + fieldsName[TIPO_CLIENTE] + ","
|
||||
+ ALIAS + "." + fieldsName[NOME_OT]+ ","
|
||||
+ ALIAS + "." + fieldsName[CODICE_DEALER]+ ","
|
||||
+ ALIAS + "." + fieldsName[TIPO_SERVIZIO]+ ","
|
||||
+ ALIAS + "." + fieldsName[DONATING]+ ","
|
||||
+ ALIAS + "." + fieldsName[DATA_EVENTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[SETTIMANA_EVENTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[MESE_EVENTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[DESCR_STATO_EVENTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[DESC_STATO_ATTUALE]+ ","
|
||||
+ ALIAS + "." + fieldsName[STATO_EVENTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[STATO_ATTUALE]+ ","
|
||||
+ ALIAS + "." + fieldsName[COD_RIFIUTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[CAUSALE_RIFIUTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[CANALE_ACQUISIZIONE]+ ","
|
||||
+ ALIAS + "." + fieldsName[SOTTOCANALE_ACQUISIZIONE]+ ","
|
||||
+ ALIAS + "." + fieldsName[RIGA]+ ","
|
||||
+ ALIAS + "." + fieldsName[DONOR_EFFETTIVO]+ ","
|
||||
+ ALIAS + "." + fieldsName[RECIPIENT_EFFETTIVO];
|
||||
|
||||
private static final String SELECT_COUNT_CLAUSE = "SELECT COUNT("+ ALIAS + "." + fieldsName[ID_PROG] + ")";
|
||||
|
||||
private static final String ORDER_BY_CLAUSE = " ORDER BY " + fieldsName[ID_PROG];
|
||||
|
||||
public Date getLastRefresh() throws Exception {
|
||||
return getLastUpdate(TABLE_NAME_MASTER);
|
||||
}
|
||||
|
||||
public List loadReportItems(String id, Filter filter) throws Exception {
|
||||
String query;
|
||||
|
||||
if (ReportMap.CANALI_RECIPIENT.equals(id) || ReportMap.CANALI_RECIPIENT_VIRT.equals(id)) {
|
||||
query = getQueryCanaleRecipient(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
List l = new Vector();
|
||||
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
while (rs.next()) {
|
||||
CanaleRecipient item = new CanaleRecipient();
|
||||
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
|
||||
int j = getFieldIndex(rsmd.getColumnName(i));
|
||||
if (j != -1) {
|
||||
String columType = rsmd.getColumnTypeName(i);
|
||||
if (columType.equalsIgnoreCase("DATE"))
|
||||
item.setFieldValue(j, Utils.getString((java.util.Date) rs.getDate(i)));
|
||||
else
|
||||
item.setFieldValue(j, rs.getString(i));
|
||||
}
|
||||
}
|
||||
l.add(item);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
} finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
public int writeCSVReport(String id, Filter filter, OutputStream os) throws Exception {
|
||||
//init
|
||||
String query;
|
||||
List columnToExclude = new ArrayList();
|
||||
columnToExclude.add("ID_PROG");
|
||||
|
||||
if (ReportMap.CANALI_RECIPIENT.equals(id) || ReportMap.CANALI_RECIPIENT_VIRT.equals(id)) {
|
||||
query = getQueryCanaleRecipient(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
int k = 0;
|
||||
|
||||
try {
|
||||
//query
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
k = DaoUtils.writeCSV(rs, os, ReportMap.DELIMITER, true, columnToExclude);
|
||||
logger.debug("writed out " + k);
|
||||
} catch (SQLException e) {
|
||||
throw e;
|
||||
} finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return k;
|
||||
}
|
||||
|
||||
private String getQueryCanaleRecipient(Filter filter) {
|
||||
String query = SELECT_CLAUSE + FROM_CLAUSE + " WHERE " + filter.getSQL() + ORDER_BY_CLAUSE;;
|
||||
return query;
|
||||
}
|
||||
|
||||
private String getQueryCountCanaleRecipient(Filter filter) {
|
||||
String query = SELECT_COUNT_CLAUSE + FROM_CLAUSE + " WHERE " + filter.getSQL();
|
||||
return query;
|
||||
}
|
||||
|
||||
private int getFieldIndex(String fieldName) {
|
||||
for (int i = 0; i < FIELDCOUNT; i++) {
|
||||
if (fieldsName[i].equals(fieldName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public long countReportItems(String id, Filter filter) throws Exception {
|
||||
String query;
|
||||
|
||||
if (ReportMap.CANALI_RECIPIENT.equals(id) || ReportMap.CANALI_RECIPIENT_VIRT.equals(id)) {
|
||||
query = getQueryCountCanaleRecipient(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
|
||||
Connection conn = null;
|
||||
long n = 0;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
ResultSet rs = st.executeQuery(query);
|
||||
while (rs.next()) {
|
||||
n = rs.getLong(1);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
} catch (SQLException e) {
|
||||
//query failed
|
||||
logger.debug(query);
|
||||
throw e;
|
||||
} finally {
|
||||
try {
|
||||
if (!conn.isClosed())
|
||||
conn.close();
|
||||
} catch (SQLException e) {
|
||||
conn = null;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.PagingObjectIF;
|
||||
import it.valueteam.dbcgo.dao.Entity;
|
||||
|
||||
/**
|
||||
* Bean che mappa il report CANALE RECIPIENT - read only
|
||||
*/
|
||||
public class CanaleRecipient extends Entity implements PagingObjectIF {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public CanaleRecipient(){
|
||||
this.fieldsValue=new String[CanaleRecipientDAO.FIELDCOUNT];
|
||||
}
|
||||
|
||||
public String getPagingKey() {
|
||||
return getID_PROG();
|
||||
}
|
||||
|
||||
public String getID_PROG() {
|
||||
return getFieldValue(CanaleRecipientDAO.ID_PROG);
|
||||
}
|
||||
|
||||
public String getDATA_AGGIORNAMENTO() {
|
||||
return getFieldValue(CanaleRecipientDAO.DATA_AGGIORNAMENTO);
|
||||
}
|
||||
|
||||
public String getTIPO_RICHIESTA() {
|
||||
return getFieldValue(CanaleRecipientDAO.TIPO_RICHIESTA);
|
||||
}
|
||||
|
||||
public String getTIPO_CLIENTE() {
|
||||
return getFieldValue(CanaleRecipientDAO.TIPO_CLIENTE);
|
||||
}
|
||||
|
||||
public String getNOME_OT() {
|
||||
return getFieldValue(CanaleRecipientDAO.NOME_OT);
|
||||
}
|
||||
|
||||
public String getCODICE_DEALER() {
|
||||
return getFieldValue(CanaleRecipientDAO.CODICE_DEALER);
|
||||
}
|
||||
|
||||
public String getTIPO_SERVIZIO() {
|
||||
return getFieldValue(CanaleRecipientDAO.TIPO_SERVIZIO);
|
||||
}
|
||||
|
||||
public String getDONATING() {
|
||||
return getFieldValue(CanaleRecipientDAO.DONATING);
|
||||
}
|
||||
|
||||
public String getDATA_EVENTO() {
|
||||
return getFieldValue(CanaleRecipientDAO.DATA_EVENTO);
|
||||
}
|
||||
|
||||
public String getSETTIMANA_EVENTO() {
|
||||
return getFieldValue(CanaleRecipientDAO.SETTIMANA_EVENTO);
|
||||
}
|
||||
|
||||
public String getMESE_EVENTO() {
|
||||
return getFieldValue(CanaleRecipientDAO.MESE_EVENTO);
|
||||
}
|
||||
|
||||
public String getDESCR_STATO_EVENTO() {
|
||||
return getFieldValue(CanaleRecipientDAO.DESCR_STATO_EVENTO);
|
||||
}
|
||||
|
||||
public String getDESC_STATO_ATTUALE() {
|
||||
return getFieldValue(CanaleRecipientDAO.DESC_STATO_ATTUALE);
|
||||
}
|
||||
|
||||
public String getSTATO_EVENTO() {
|
||||
return getFieldValue(CanaleRecipientDAO.STATO_EVENTO);
|
||||
}
|
||||
|
||||
public String getSTATO_ATTUALE() {
|
||||
return getFieldValue(CanaleRecipientDAO.STATO_ATTUALE);
|
||||
}
|
||||
|
||||
public String getCOD_RIFIUTO() {
|
||||
return getFieldValue(CanaleRecipientDAO.COD_RIFIUTO);
|
||||
}
|
||||
|
||||
public String getCAUSALE_RIFIUTO() {
|
||||
return getFieldValue(CanaleRecipientDAO.CAUSALE_RIFIUTO);
|
||||
}
|
||||
|
||||
public String getCANALE_ACQUISIZIONE() {
|
||||
return getFieldValue(CanaleRecipientDAO.CANALE_ACQUISIZIONE);
|
||||
}
|
||||
|
||||
public String getSOTTOCANALE_ACQUISIZIONE() {
|
||||
return getFieldValue(CanaleRecipientDAO.SOTTOCANALE_ACQUISIZIONE);
|
||||
}
|
||||
|
||||
public String getDONOR_EFFETTIVO() {
|
||||
return getFieldValue(CanaleRecipientDAO.DONOR_EFFETTIVO);
|
||||
}
|
||||
|
||||
public String getRECIPIENT_EFFETTIVO() {
|
||||
return getFieldValue(CanaleRecipientDAO.RECIPIENT_EFFETTIVO);
|
||||
}
|
||||
|
||||
public String getRIGA() {
|
||||
return getFieldValue(CanaleRecipientDAO.RIGA);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,262 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.ReportMap;
|
||||
import it.valueteam.dbcgo.common.Utils;
|
||||
import it.valueteam.dbcgo.dao.BaseDAO;
|
||||
import it.valueteam.dbcgo.dao.DaoUtils;
|
||||
import it.valueteam.dbcgo.dao.Filter;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class CanaleRecipientDAO extends AbstractReportDAO implements ReportDAOIF {
|
||||
|
||||
public CanaleRecipientDAO() throws Exception{
|
||||
super();
|
||||
TABLE_NAME = "MNP_RECIPIENT_CANALE_VIEW";
|
||||
TABLE_NAME_MASTER = "MNP_DWH_REC_PUSH";
|
||||
FROM_CLAUSE = " FROM " + TABLE_NAME + " " + ALIAS;
|
||||
}
|
||||
public CanaleRecipientDAO(String tname, String master_tname) throws Exception{
|
||||
super();
|
||||
TABLE_NAME = tname;
|
||||
TABLE_NAME_MASTER = master_tname;
|
||||
FROM_CLAUSE = " FROM " + TABLE_NAME + " " + ALIAS;
|
||||
}
|
||||
|
||||
static Logger logger = Logger.getLogger(CanaleRecipientDAO.class);
|
||||
|
||||
private String TABLE_NAME = "";
|
||||
private String TABLE_NAME_MASTER = "";
|
||||
private String FROM_CLAUSE = "";
|
||||
|
||||
private static final String ALIAS = "a";
|
||||
|
||||
public static final int FIELDCOUNT = 22;
|
||||
|
||||
public static final int ID_PROG=0;
|
||||
public static final int DATA_AGGIORNAMENTO = 1;
|
||||
public static final int TIPO_RICHIESTA = 2;
|
||||
public static final int TIPO_CLIENTE = 3;
|
||||
public static final int NOME_OT = 4;
|
||||
public static final int CODICE_DEALER = 5;
|
||||
public static final int TIPO_SERVIZIO = 6;
|
||||
public static final int DONATING = 7;
|
||||
public static final int DATA_EVENTO = 8;
|
||||
public static final int SETTIMANA_EVENTO = 9;
|
||||
public static final int MESE_EVENTO = 10;
|
||||
public static final int DESCR_STATO_EVENTO = 11;
|
||||
public static final int DESC_STATO_ATTUALE = 12;
|
||||
public static final int STATO_EVENTO = 13;
|
||||
public static final int STATO_ATTUALE = 14;
|
||||
public static final int COD_RIFIUTO = 15;
|
||||
public static final int CAUSALE_RIFIUTO = 16;
|
||||
public static final int CANALE_ACQUISIZIONE = 17;
|
||||
public static final int SOTTOCANALE_ACQUISIZIONE = 18;
|
||||
public static final int RIGA = 19;
|
||||
public static final int DONOR_EFFETTIVO=20;
|
||||
public static final int RECIPIENT_EFFETTIVO=21;
|
||||
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"ID_PROG",
|
||||
"DATA_AGGIORNAMENTO",
|
||||
"TIPO_RICHIESTA",
|
||||
"TIPO_CLIENTE",
|
||||
"NOME_OT",
|
||||
"CODICE_DEALER",
|
||||
"TIPO_SERVIZIO",
|
||||
"DONATING",
|
||||
"DATA_EVENTO",
|
||||
"SETTIMANA_EVENTO",
|
||||
"MESE_EVENTO",
|
||||
"DESCR_STATO_EVENTO",
|
||||
"DESC_STATO_ATTUALE",
|
||||
"STATO_EVENTO",
|
||||
"STATO_ATTUALE",
|
||||
"COD_RIFIUTO",
|
||||
"CAUSALE_RIFIUTO",
|
||||
"CANALE_ACQUISIZIONE",
|
||||
"SOTTOCANALE_ACQUISIZIONE",
|
||||
"RIGA",
|
||||
"DONOR_EFFETTIVO",
|
||||
"RECIPIENT_EFFETTIVO"
|
||||
};
|
||||
|
||||
|
||||
private static final String SELECT_CLAUSE = "SELECT "
|
||||
+ ALIAS +"." + fieldsName[ID_PROG] + ","
|
||||
+ ALIAS + "." + fieldsName[DATA_AGGIORNAMENTO] + ","
|
||||
+ ALIAS + "." + fieldsName[TIPO_RICHIESTA] + ","
|
||||
+ ALIAS + "." + fieldsName[TIPO_CLIENTE] + ","
|
||||
+ ALIAS + "." + fieldsName[NOME_OT]+ ","
|
||||
+ ALIAS + "." + fieldsName[CODICE_DEALER]+ ","
|
||||
+ ALIAS + "." + fieldsName[TIPO_SERVIZIO]+ ","
|
||||
+ ALIAS + "." + fieldsName[DONATING]+ ","
|
||||
+ ALIAS + "." + fieldsName[DATA_EVENTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[SETTIMANA_EVENTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[MESE_EVENTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[DESCR_STATO_EVENTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[DESC_STATO_ATTUALE]+ ","
|
||||
+ ALIAS + "." + fieldsName[STATO_EVENTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[STATO_ATTUALE]+ ","
|
||||
+ ALIAS + "." + fieldsName[COD_RIFIUTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[CAUSALE_RIFIUTO]+ ","
|
||||
+ ALIAS + "." + fieldsName[CANALE_ACQUISIZIONE]+ ","
|
||||
+ ALIAS + "." + fieldsName[SOTTOCANALE_ACQUISIZIONE]+ ","
|
||||
+ ALIAS + "." + fieldsName[RIGA]+ ","
|
||||
+ ALIAS + "." + fieldsName[DONOR_EFFETTIVO]+ ","
|
||||
+ ALIAS + "." + fieldsName[RECIPIENT_EFFETTIVO];
|
||||
|
||||
private static final String SELECT_COUNT_CLAUSE = "SELECT COUNT("+ ALIAS + "." + fieldsName[ID_PROG] + ")";
|
||||
|
||||
private static final String ORDER_BY_CLAUSE = " ORDER BY " + fieldsName[ID_PROG];
|
||||
|
||||
public Date getLastRefresh() throws Exception {
|
||||
return getLastUpdate(TABLE_NAME_MASTER);
|
||||
}
|
||||
|
||||
public List loadReportItems(String id, Filter filter) throws Exception {
|
||||
String query;
|
||||
|
||||
if (ReportMap.CANALI_RECIPIENT.equals(id) || ReportMap.CANALI_RECIPIENT_VIRT.equals(id)) {
|
||||
query = getQueryCanaleRecipient(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
List l = new Vector();
|
||||
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
while (rs.next()) {
|
||||
CanaleRecipient item = new CanaleRecipient();
|
||||
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
|
||||
int j = getFieldIndex(rsmd.getColumnName(i));
|
||||
if (j != -1) {
|
||||
String columType = rsmd.getColumnTypeName(i);
|
||||
if (columType.equalsIgnoreCase("DATE"))
|
||||
item.setFieldValue(j, Utils.getString((java.util.Date) rs.getDate(i)));
|
||||
else
|
||||
item.setFieldValue(j, rs.getString(i));
|
||||
}
|
||||
}
|
||||
l.add(item);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
} finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
public int writeCSVReport(String id, Filter filter, OutputStream os) throws Exception {
|
||||
//init
|
||||
String query;
|
||||
List columnToExclude = new ArrayList();
|
||||
columnToExclude.add("ID_PROG");
|
||||
|
||||
if (ReportMap.CANALI_RECIPIENT.equals(id) || ReportMap.CANALI_RECIPIENT_VIRT.equals(id)) {
|
||||
query = getQueryCanaleRecipient(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
int k = 0;
|
||||
|
||||
try {
|
||||
//query
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
k = DaoUtils.writeCSV(rs, os, ReportMap.DELIMITER, true, columnToExclude);
|
||||
logger.debug("writed out " + k);
|
||||
} catch (SQLException e) {
|
||||
throw e;
|
||||
} finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return k;
|
||||
}
|
||||
|
||||
private String getQueryCanaleRecipient(Filter filter) {
|
||||
String query = SELECT_CLAUSE + FROM_CLAUSE + " WHERE " + filter.getSQL() + ORDER_BY_CLAUSE;;
|
||||
return query;
|
||||
}
|
||||
|
||||
private String getQueryCountCanaleRecipient(Filter filter) {
|
||||
String query = SELECT_COUNT_CLAUSE + FROM_CLAUSE + " WHERE " + filter.getSQL();
|
||||
return query;
|
||||
}
|
||||
|
||||
private int getFieldIndex(String fieldName) {
|
||||
for (int i = 0; i < FIELDCOUNT; i++) {
|
||||
if (fieldsName[i].equals(fieldName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public long countReportItems(String id, Filter filter) throws Exception {
|
||||
String query;
|
||||
|
||||
if (ReportMap.CANALI_RECIPIENT.equals(id) || ReportMap.CANALI_RECIPIENT_VIRT.equals(id)) {
|
||||
query = getQueryCountCanaleRecipient(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
|
||||
Connection conn = null;
|
||||
long n = 0;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
ResultSet rs = st.executeQuery(query);
|
||||
while (rs.next()) {
|
||||
n = rs.getLong(1);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
} catch (SQLException e) {
|
||||
//query failed
|
||||
logger.debug(query);
|
||||
throw e;
|
||||
} finally {
|
||||
try {
|
||||
if (!conn.isClosed())
|
||||
conn.close();
|
||||
} catch (SQLException e) {
|
||||
conn = null;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.dao.Entity;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Locale;
|
||||
|
||||
|
||||
public class CapacitaEvasione extends Entity{
|
||||
|
||||
private static double CAPACITA_MAX = 0.8;
|
||||
|
||||
private String mese;
|
||||
private int richiestePreseInCarico;
|
||||
private int richiesteScartateWaitList;
|
||||
private int richiesteScartateManprogr;
|
||||
|
||||
private String mese2;
|
||||
private int richiestePreseInCarico2;
|
||||
private int richiesteScartateWaitList2;
|
||||
private int richiesteScartateManprogr2;
|
||||
|
||||
private int capacita;
|
||||
private int giorniLavorativi;
|
||||
private int giorniLavorativi2;
|
||||
|
||||
/**
|
||||
* Costruttore della classe
|
||||
*/
|
||||
public CapacitaEvasione(){}
|
||||
|
||||
public double getSommaRichiestePreseInCarico() {
|
||||
return (richiestePreseInCarico + richiestePreseInCarico2);
|
||||
}
|
||||
|
||||
public double getSommaRichiesteScartateWaitList() {
|
||||
return (richiesteScartateWaitList + richiesteScartateWaitList2);
|
||||
}
|
||||
|
||||
public double getSommaRichiesteScartateManProgr() {
|
||||
return (richiesteScartateManprogr + richiesteScartateManprogr2);
|
||||
}
|
||||
|
||||
public double getTotaleBimestrale() {
|
||||
return (getSommaRichiestePreseInCarico() + getSommaRichiesteScartateWaitList() + getSommaRichiesteScartateManProgr());
|
||||
}
|
||||
|
||||
public double getMediaBimestrale() {
|
||||
return (getTotaleBimestrale() / getGiorniLavorativiBimestrali());
|
||||
}
|
||||
|
||||
private double getGiorniLavorativiBimestrali() {
|
||||
return giorniLavorativi + giorniLavorativi2;
|
||||
}
|
||||
|
||||
public double getCapacitaPeriodo() {
|
||||
return capacita;
|
||||
}
|
||||
|
||||
public double getValoreDiGuardia() {
|
||||
double valore = capacita * CAPACITA_MAX;
|
||||
return Math.ceil(valore / 100) * 100; //rounding al centinaio sup.
|
||||
}
|
||||
|
||||
public double getCapacitaProxMese() {
|
||||
if(getValoreDiGuardia() < getMediaBimestrale()){
|
||||
capacita += 3000;
|
||||
}
|
||||
return capacita;
|
||||
}
|
||||
|
||||
public String getMesiAndAnno(){
|
||||
return getMeseAnnoPrecedente(-2) + " - " + getMeseAnnoPrecedente(-1);
|
||||
}
|
||||
|
||||
public String getMeseAnnoPrecedente(int i){
|
||||
Calendar ca1 = Calendar.getInstance();
|
||||
ca1.add(Calendar.MONTH, i);
|
||||
java.util.Date d = new java.util.Date(ca1.getTimeInMillis());
|
||||
return new SimpleDateFormat("MMMM", Locale.ITALY).format(d) + " " + new SimpleDateFormat("yyyy", Locale.ITALY).format(d);
|
||||
}
|
||||
|
||||
public void setBean1(CapacitaEvasione capacitaEvasioneBean) {
|
||||
this.mese = capacitaEvasioneBean.getMese();
|
||||
this.richiestePreseInCarico= capacitaEvasioneBean.getRichiestePreseInCarico();
|
||||
this.richiesteScartateWaitList=capacitaEvasioneBean.getRichiesteScartateWaitList();
|
||||
this.richiesteScartateManprogr=capacitaEvasioneBean.getRichiesteScartateManProgr();
|
||||
this.giorniLavorativi=capacitaEvasioneBean.getGiorniLavorativi();
|
||||
this.capacita=capacitaEvasioneBean.getCapacita();
|
||||
}
|
||||
|
||||
public void setBean2(CapacitaEvasione capacitaEvasioneBean) {
|
||||
this.mese2 = capacitaEvasioneBean.getMese();
|
||||
this.richiestePreseInCarico2= capacitaEvasioneBean.getRichiestePreseInCarico();
|
||||
this.richiesteScartateWaitList2=capacitaEvasioneBean.getRichiesteScartateWaitList();
|
||||
this.richiesteScartateManprogr2=capacitaEvasioneBean.getRichiesteScartateManProgr();
|
||||
this.giorniLavorativi2=capacitaEvasioneBean.getGiorniLavorativi();
|
||||
}
|
||||
|
||||
|
||||
public String getMese() {
|
||||
return mese;
|
||||
}
|
||||
|
||||
public void setMese(String mese) {
|
||||
this.mese = mese;
|
||||
}
|
||||
|
||||
public int getRichiestePreseInCarico() {
|
||||
return richiestePreseInCarico;
|
||||
}
|
||||
|
||||
public void setRichiestePreseInCarico(int richiestePreseInCarico) {
|
||||
this.richiestePreseInCarico = richiestePreseInCarico;
|
||||
}
|
||||
|
||||
public int getRichiesteScartateWaitList() {
|
||||
return richiesteScartateWaitList;
|
||||
}
|
||||
|
||||
public void setRichiesteScartateWaitList(int richiesteScartateWaitList) {
|
||||
this.richiesteScartateWaitList = richiesteScartateWaitList;
|
||||
}
|
||||
|
||||
public int getRichiesteScartateManProgr() {
|
||||
return richiesteScartateManprogr;
|
||||
}
|
||||
|
||||
public void setRichiesteScartateManprogr(int richiesteScartateManprogr) {
|
||||
this.richiesteScartateManprogr = richiesteScartateManprogr;
|
||||
}
|
||||
|
||||
public int getCapacita() {
|
||||
return capacita;
|
||||
}
|
||||
|
||||
public void setCapacita(int capacita) {
|
||||
this.capacita = capacita;
|
||||
}
|
||||
|
||||
public int getGiorniLavorativi() {
|
||||
return giorniLavorativi;
|
||||
}
|
||||
|
||||
public void setGiorniLavorativi(int giorniLavorativi) {
|
||||
this.giorniLavorativi = giorniLavorativi;
|
||||
}
|
||||
|
||||
public int getGiorniLavorativi2() {
|
||||
return giorniLavorativi2;
|
||||
}
|
||||
|
||||
public void setGiorniLavorativi2(int giorniLavorativi2) {
|
||||
this.giorniLavorativi2 = giorniLavorativi2;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.dao.Filter;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class CapacitaEvasioneDAO extends AbstractReportDAO {
|
||||
|
||||
static Logger logger = Logger.getLogger(CapacitaEvasioneDAO.class);
|
||||
|
||||
private static String TABLE_NAME = "MNP_DW_REPORT_CAPACITAEVASIONE";
|
||||
private static String TABLE_NAME2 = "MNP_EVASIONE@DWH";
|
||||
|
||||
private static final String ALIAS = "t";
|
||||
|
||||
public static final int FIELDCOUNT = 5;
|
||||
|
||||
public static final int MESE=0;
|
||||
public static final int RICHIESTE_PRESEINCARICO = 1;
|
||||
public static final int RICHIESTE_SCARTATE_WAITLIST = 2;
|
||||
public static final int RICHIESTE_SCARTATE_MANPROGR = 3;
|
||||
public static final int CAPACITA = 4;
|
||||
|
||||
public static final String CAPACITA_TOTALE = "CAPACITA_TOTALE";
|
||||
public static final String ID_OPERATORE = "ID_OPERATORE";
|
||||
public static final String ID_MESE = "MESE";
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"MESE",
|
||||
"RICHIESTE_PRESEINCARICO",
|
||||
"RICHIESTE_SCARTATE_WAITLIST",
|
||||
"RICHIESTE_SCARTATE_MANPROGR",
|
||||
"CAPACITA"
|
||||
};
|
||||
|
||||
private static String SELECT_CLAUSE = "select " + ALIAS + ".*, (select " + CAPACITA_TOTALE + " from " + TABLE_NAME2 + " where " + ID_OPERATORE + " = 'TIMG') CAPACITA ";
|
||||
private static String WHERE_CLAUSE = " where mese in (TO_CHAR(ADD_MONTHS(SYSDATE,-2),'MM/YYYY'),TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MM/YYYY'))";
|
||||
private static String FROM_CLAUSE = " from "+ TABLE_NAME + " " + ALIAS;
|
||||
private static String ORDER_BY = " order by "+ ALIAS + "." + ID_MESE;
|
||||
|
||||
|
||||
public CapacitaEvasioneDAO() throws Exception{
|
||||
super();
|
||||
}
|
||||
|
||||
public List loadReportItems() throws Exception {
|
||||
String query = getQuery();
|
||||
|
||||
logger.debug(query);
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
List l = new Vector();
|
||||
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
while (rs.next()) {
|
||||
CapacitaEvasione item = new CapacitaEvasione();
|
||||
item.setMese(rs.getString(1));
|
||||
item.setGiorniLavorativi(rs.getInt(2));
|
||||
item.setRichiestePreseInCarico(rs.getInt(3));
|
||||
item.setRichiesteScartateWaitList(rs.getInt(4));
|
||||
item.setRichiesteScartateManprogr(rs.getInt(5));
|
||||
item.setCapacita(rs.getInt(6));
|
||||
l.add(item);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
}
|
||||
catch(Exception e){
|
||||
logger.error(e);
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
private String getQuery() {
|
||||
return SELECT_CLAUSE + FROM_CLAUSE + WHERE_CLAUSE + ORDER_BY;
|
||||
}
|
||||
|
||||
|
||||
public long countReportItems(String id, Filter filter) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public int writeCSVReport(String id, Filter filter, OutputStream os)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public Date getLastRefresh() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
public List loadReportItems(String id_report, Filter filter)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.PagingObjectIF;
|
||||
import it.valueteam.dbcgo.dao.Entity;
|
||||
|
||||
public class DeliberaDon extends Entity implements PagingObjectIF {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public DeliberaDon() {
|
||||
this.fieldsValue= new String[DeliberaDonDAO.FIELDCOUNT];
|
||||
}
|
||||
|
||||
public String getID_PROG() {
|
||||
return getFieldValue(DeliberaDonDAO.ID_PROG);
|
||||
}
|
||||
|
||||
public String getOLO() {
|
||||
return getFieldValue(DeliberaDonDAO.OLO);
|
||||
}
|
||||
|
||||
public String getRIC_PIC() {
|
||||
return getFieldValue(DeliberaDonDAO.RIC_PIC);
|
||||
}
|
||||
|
||||
public String getDATA_EVENTO() {
|
||||
return getFieldValue(DeliberaDonDAO.DATA_EVENTO);
|
||||
}
|
||||
|
||||
public String getRIC_RICEVUTE() {
|
||||
return getFieldValue(DeliberaDonDAO.RIC_RICEVUTE);
|
||||
}
|
||||
|
||||
public String getRECIPIENT_EFFETTIVO() {
|
||||
return getFieldValue(DeliberaDonDAO.RECIPIENT_EFFETTIVO);
|
||||
}
|
||||
|
||||
public String getPagingKey() {
|
||||
return getID_PROG();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.ReportMap;
|
||||
import it.valueteam.dbcgo.common.Utils;
|
||||
import it.valueteam.dbcgo.dao.BaseDAO;
|
||||
import it.valueteam.dbcgo.dao.DaoUtils;
|
||||
import it.valueteam.dbcgo.dao.Filter;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class DeliberaDonDAO extends AbstractReportDAO implements ReportDAOIF {
|
||||
|
||||
public DeliberaDonDAO() throws Exception {
|
||||
super();
|
||||
TABLE_NAME = "MNP_DELIBERA_DON_VIEW";
|
||||
MASTER_TABLE_NAME = "MNP_DWH_DON";
|
||||
FROM_CLAUSE = " FROM " + TABLE_NAME + " " + ALIAS;
|
||||
}
|
||||
|
||||
public DeliberaDonDAO(String tname, String master_tname) throws Exception {
|
||||
super();
|
||||
TABLE_NAME = tname;
|
||||
MASTER_TABLE_NAME = master_tname;
|
||||
FROM_CLAUSE = " FROM " + TABLE_NAME + " " + ALIAS;
|
||||
}
|
||||
|
||||
static Logger logger = Logger.getLogger(DeliberaDonDAO.class);
|
||||
|
||||
private String TABLE_NAME = "";
|
||||
private String MASTER_TABLE_NAME = "";
|
||||
private String FROM_CLAUSE = "";
|
||||
|
||||
private static final String ALIAS = "a";
|
||||
|
||||
public static final int FIELDCOUNT = 6;
|
||||
|
||||
public static final int ID_PROG=0;
|
||||
public static final int OLO = 1;
|
||||
public static final int RIC_RICEVUTE = 2;
|
||||
public static final int RIC_PIC = 3;
|
||||
public static final int DATA_EVENTO = 4;
|
||||
public static final int RECIPIENT_EFFETTIVO = 5;
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"ID_PROG","OLO",
|
||||
"RIC_RICEVUTE",
|
||||
"RIC_PIC",
|
||||
"DATA_EVENTO",
|
||||
"RECIPIENT_EFFETTIVO"
|
||||
};
|
||||
|
||||
private static final String SELECT_CLAUSE = "SELECT "
|
||||
+ ALIAS +"." + fieldsName[ID_PROG] + ","
|
||||
+ ALIAS + "." + fieldsName[OLO] + ","
|
||||
+ ALIAS + "." + fieldsName[RIC_RICEVUTE] + ","
|
||||
+ ALIAS + "." + fieldsName[RIC_PIC] + ","
|
||||
+ ALIAS + "." + fieldsName[DATA_EVENTO] + ","
|
||||
+ ALIAS + "." + fieldsName[RECIPIENT_EFFETTIVO];
|
||||
|
||||
private static final String SELECT_COUNT_CLAUSE = "SELECT COUNT("+ ALIAS + "." + fieldsName[ID_PROG] + ")";
|
||||
|
||||
private static final String ORDER_BY_CLAUSE = " ORDER BY " + fieldsName[ID_PROG];
|
||||
|
||||
public Date getLastRefresh() throws Exception {
|
||||
return getLastUpdate(MASTER_TABLE_NAME);
|
||||
}
|
||||
|
||||
public List loadReportItems(String id, Filter filter) throws Exception {
|
||||
String query;
|
||||
|
||||
if (ReportMap.DELIBERA_DONATING.equals(id) || ReportMap.DELIBERA_DONATING_VIRT.equals(id)) {
|
||||
query = getQueryDeliberaDon(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
List l = new Vector();
|
||||
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
while (rs.next()) {
|
||||
DeliberaDon item = new DeliberaDon();
|
||||
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
|
||||
int j = getFieldIndex(rsmd.getColumnName(i));
|
||||
if (j != -1) {
|
||||
String columType = rsmd.getColumnTypeName(i);
|
||||
if (columType.equalsIgnoreCase("DATE"))
|
||||
item.setFieldValue(j, Utils.getString((java.util.Date) rs.getDate(i)));
|
||||
else
|
||||
item.setFieldValue(j, rs.getString(i));
|
||||
}
|
||||
}
|
||||
l.add(item);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
} finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
public int writeCSVReport(String id, Filter filter, OutputStream os)
|
||||
throws Exception {
|
||||
//init
|
||||
String query;
|
||||
List columnToExclude = new ArrayList();
|
||||
columnToExclude.add("ID_PROG");
|
||||
|
||||
if (ReportMap.DELIBERA_DONATING.equals(id) || ReportMap.DELIBERA_DONATING_VIRT.equals(id)) {
|
||||
query = getQueryDeliberaDon(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
int k = 0;
|
||||
|
||||
try {
|
||||
//query
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
k = DaoUtils.writeCSV(rs, os, ReportMap.DELIMITER, true, columnToExclude);
|
||||
logger.debug("writed out " + k);
|
||||
} catch (SQLException e) {
|
||||
throw e;
|
||||
} finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return k;
|
||||
}
|
||||
|
||||
private String getQueryDeliberaDon(Filter filter) {
|
||||
String query = SELECT_CLAUSE + FROM_CLAUSE + " WHERE " + filter.getSQL() + ORDER_BY_CLAUSE;;
|
||||
return query;
|
||||
}
|
||||
|
||||
private String getQueryCountDeliberaDon(Filter filter) {
|
||||
String query = SELECT_COUNT_CLAUSE + FROM_CLAUSE + " WHERE " + filter.getSQL();
|
||||
return query;
|
||||
}
|
||||
|
||||
private int getFieldIndex(String fieldName) {
|
||||
for (int i = 0; i < FIELDCOUNT; i++) {
|
||||
if (fieldsName[i].equals(fieldName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public long countReportItems(String id, Filter filter) throws Exception {
|
||||
String query;
|
||||
|
||||
if (ReportMap.DELIBERA_DONATING.equals(id) || ReportMap.DELIBERA_DONATING_VIRT.equals(id)) {
|
||||
query = getQueryCountDeliberaDon(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
|
||||
Connection conn = null;
|
||||
long n = 0;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
ResultSet rs = st.executeQuery(query);
|
||||
while (rs.next()) {
|
||||
n = rs.getLong(1);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
} catch (SQLException e) {
|
||||
//query failed
|
||||
logger.debug(query);
|
||||
throw e;
|
||||
} finally {
|
||||
try {
|
||||
if (!conn.isClosed())
|
||||
conn.close();
|
||||
} catch (SQLException e) {
|
||||
conn = null;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.PagingObjectIF;
|
||||
import it.valueteam.dbcgo.dao.Entity;
|
||||
|
||||
/**
|
||||
* Bean che mappa il report MNP TIM CESSAZIONI IN DATI - read only
|
||||
* @author Giurlandama
|
||||
*
|
||||
*/
|
||||
public class DwhCessazioniIn extends Entity implements PagingObjectIF {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* constructor
|
||||
*/
|
||||
public DwhCessazioniIn() {
|
||||
this.fieldsValue= new String[DwhCessazioniInDAO.FIELDCOUNT];
|
||||
}
|
||||
|
||||
public String getID_PROG() {
|
||||
return getFieldValue(DwhCessazioniInDAO.ID_PROG);
|
||||
}
|
||||
|
||||
public String getRICHIESTE() {
|
||||
return getFieldValue(DwhCessazioniInDAO.RICHIESTE);
|
||||
}
|
||||
|
||||
public String getCODICE_OPERATORE_DONATING() {
|
||||
return getFieldValue(DwhCessazioniInDAO.OPERATORE_DONATING);
|
||||
}
|
||||
public String getDATA_EVENTO() {
|
||||
return getFieldValue(DwhCessazioniInDAO.DATA_EVENTO);
|
||||
}
|
||||
public String getSETTIMANA_EVENTO() {
|
||||
return getFieldValue(DwhCessazioniInDAO.SETTIMANA_EVENTO);
|
||||
}
|
||||
public String getMESE_EVENTO() {
|
||||
return getFieldValue(DwhCessazioniInDAO.MESE_EVENTO);
|
||||
}
|
||||
public String getDESCR_STATO_EVENTO() {
|
||||
return getFieldValue(DwhCessazioniInDAO.DESCR_STATO_EVENTO);
|
||||
}
|
||||
public String getDESCR_STATO_ATTUALE() {
|
||||
return getFieldValue(DwhCessazioniInDAO.DESCR_STATO_ATTUALE);
|
||||
}
|
||||
public String getSTATO_EVENTO() {
|
||||
return getFieldValue(DwhCessazioniInDAO.STATO_EVENTO);
|
||||
}
|
||||
public String getSTATO_ATTUALE() {
|
||||
return getFieldValue(DwhCessazioniInDAO.STATO_ATTUALE);
|
||||
}
|
||||
|
||||
public String getPagingKey() {
|
||||
return getID_PROG();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.ReportMap;
|
||||
import it.valueteam.dbcgo.common.Utils;
|
||||
import it.valueteam.dbcgo.dao.BaseDAO;
|
||||
import it.valueteam.dbcgo.dao.DaoUtils;
|
||||
import it.valueteam.dbcgo.dao.Filter;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class DwhCessazioniInDAO extends AbstractReportDAO implements ReportDAOIF {
|
||||
|
||||
static Logger logger = Logger.getLogger(DwhCessazioniInDAO.class);
|
||||
|
||||
private static final String TABLE_NAME = "MNP_DWH_CESS_IN";
|
||||
private static final String ALIAS = "a";
|
||||
|
||||
public static final int FIELDCOUNT = 10;
|
||||
|
||||
public static final int ID_PROG=0;
|
||||
public static final int RICHIESTE=1;
|
||||
public static final int OPERATORE_DONATING=2;
|
||||
public static final int DATA_EVENTO=3;
|
||||
public static final int SETTIMANA_EVENTO=4;
|
||||
public static final int MESE_EVENTO=5;
|
||||
public static final int DESCR_STATO_EVENTO=6;
|
||||
public static final int DESCR_STATO_ATTUALE=7;
|
||||
public static final int STATO_EVENTO=8;
|
||||
public static final int STATO_ATTUALE=9;
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"ID_PROG",
|
||||
"RICHIESTE",
|
||||
"OPERATORE_DONATING",
|
||||
"DATA_EVENTO",
|
||||
"SETTIMANA_EVENTO",
|
||||
"MESE_EVENTO",
|
||||
"DESCR_STATO_EVENTO",
|
||||
"DESCR_STATO_ATTUALE",
|
||||
"STATO_EVENTO",
|
||||
"STATO_ATTUALE"
|
||||
};
|
||||
|
||||
private static final String FROM_CLAUSE = " FROM " + TABLE_NAME + " " +ALIAS;
|
||||
|
||||
private static final String STANDARD_SELECT_CLAUSE =
|
||||
"SELECT " +
|
||||
ALIAS +"." + fieldsName[ID_PROG] + "," +
|
||||
ALIAS +"." + fieldsName[RICHIESTE] + "," +
|
||||
ALIAS +"." + fieldsName[OPERATORE_DONATING] + "," +
|
||||
ALIAS +"." + fieldsName[DATA_EVENTO] + "," +
|
||||
ALIAS +"." + fieldsName[SETTIMANA_EVENTO] + "," +
|
||||
ALIAS +"." + fieldsName[MESE_EVENTO] + "," +
|
||||
ALIAS +"." + fieldsName[DESCR_STATO_EVENTO] + "," +
|
||||
ALIAS +"." + fieldsName[DESCR_STATO_ATTUALE] + "," +
|
||||
ALIAS +"." + fieldsName[STATO_EVENTO] + "," +
|
||||
ALIAS +"." + fieldsName[STATO_ATTUALE];
|
||||
|
||||
private static final String ORDER_BY_CLAUSE = " ORDER BY " + fieldsName[ID_PROG] + "," + fieldsName[SETTIMANA_EVENTO];
|
||||
|
||||
|
||||
private static final String SELECT_COUNT_CLAUSE =
|
||||
"SELECT COUNT("+ ALIAS + "." + fieldsName[ID_PROG] + ")";
|
||||
|
||||
public DwhCessazioniInDAO() throws Exception {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ds
|
||||
*/
|
||||
public DwhCessazioniInDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
public List loadReportItems(String id, Filter filter) throws Exception {
|
||||
|
||||
String query;
|
||||
query = getQueryCessazioniInDati(filter);
|
||||
|
||||
logger.debug(query);
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
List l = new Vector();
|
||||
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
|
||||
ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
while (rs.next()) {
|
||||
DwhCessazioniIn item = new DwhCessazioniIn();
|
||||
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
|
||||
int j = getFieldIndex(rsmd.getColumnName(i));
|
||||
if (j != -1) {
|
||||
String columType = rsmd.getColumnTypeName(i);
|
||||
if (columType.equalsIgnoreCase("DATE"))
|
||||
item.setFieldValue(j, Utils
|
||||
.getString((java.util.Date) rs.getDate(i)));
|
||||
else
|
||||
item.setFieldValue(j, rs.getString(i));
|
||||
}
|
||||
}
|
||||
l.add(item);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
} finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
private String getQueryCessazioniInDati(Filter filter) {
|
||||
String query = STANDARD_SELECT_CLAUSE + "" + FROM_CLAUSE +
|
||||
" WHERE " + filter.getSQL() + ORDER_BY_CLAUSE;
|
||||
return query;
|
||||
}
|
||||
|
||||
private String getQueryCountCessazioniInDati(Filter filter) {
|
||||
String query = SELECT_COUNT_CLAUSE + FROM_CLAUSE + " WHERE " + filter.getSQL();
|
||||
return query;
|
||||
}
|
||||
|
||||
private int getFieldIndex(String fieldName) {
|
||||
for (int i = 0; i < FIELDCOUNT; i++) {
|
||||
if (fieldsName[i].equals(fieldName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int writeCSVReport(String id, Filter filter, OutputStream os) throws Exception {
|
||||
//init
|
||||
String query;
|
||||
List columnToExclude = new ArrayList();
|
||||
columnToExclude.add("ID_PROG");
|
||||
|
||||
if (ReportMap.MNP_TIM_CESSAZIONE_IN_OUT_DATI_IN.equals(id)) {
|
||||
query = getQueryCessazioniInDati(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
int k = 0;
|
||||
|
||||
try {
|
||||
|
||||
//query
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
k = DaoUtils.writeCSV(rs, os, ReportMap.DELIMITER, true, columnToExclude);
|
||||
logger.debug("writed out " + k);
|
||||
}
|
||||
catch (SQLException e) {
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return k;
|
||||
}
|
||||
|
||||
public Date getLastRefresh() throws Exception {
|
||||
return getLastUpdate(TABLE_NAME);
|
||||
}
|
||||
|
||||
|
||||
public long countReportItems(String id, Filter filter) throws Exception {
|
||||
String query;
|
||||
|
||||
if (ReportMap.MNP_TIM_CESSAZIONE_IN_OUT_DATI_IN.equals(id)) {
|
||||
query = getQueryCountCessazioniInDati(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
logger.debug(query);
|
||||
|
||||
Connection conn = null;
|
||||
long n = 0;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
Statement st = conn.createStatement(
|
||||
ResultSet.TYPE_SCROLL_INSENSITIVE,
|
||||
ResultSet.CONCUR_READ_ONLY);
|
||||
ResultSet rs = st.executeQuery(query);
|
||||
while (rs.next()) {
|
||||
n = rs.getLong(1);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
} catch (SQLException e) {
|
||||
//query failed
|
||||
logger.debug(query);
|
||||
throw e;
|
||||
} finally {
|
||||
try {
|
||||
if (!conn.isClosed())
|
||||
conn.close();
|
||||
} catch (SQLException e) {
|
||||
conn = null;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.PagingObjectIF;
|
||||
import it.valueteam.dbcgo.dao.Entity;
|
||||
|
||||
/**
|
||||
* Bean che mappa il report MNP TIM CESSAZIONI OUT - read only
|
||||
* @author Giurlandama
|
||||
*
|
||||
*/
|
||||
public class DwhCessazioniOut extends Entity implements PagingObjectIF {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* constructor
|
||||
*/
|
||||
public DwhCessazioniOut() {
|
||||
this.fieldsValue= new String[DwhCessazioniOutDAO.FIELDCOUNT];
|
||||
}
|
||||
|
||||
public String getID_PROG() {
|
||||
return getFieldValue(DwhCessazioniOutDAO.ID_PROG);
|
||||
}
|
||||
|
||||
public String getRICHIESTE() {
|
||||
return getFieldValue(DwhCessazioniOutDAO.RICHIESTE);
|
||||
}
|
||||
|
||||
public String getCODICE_OPERATORE_RECIPIENT() {
|
||||
return getFieldValue(DwhCessazioniOutDAO.OPERATORE_RECIPIENT);
|
||||
}
|
||||
public String getDATA_EVENTO() {
|
||||
return getFieldValue(DwhCessazioniOutDAO.DATA_EVENTO);
|
||||
}
|
||||
public String getSETTIMANA_EVENTO() {
|
||||
return getFieldValue(DwhCessazioniOutDAO.SETTIMANA_EVENTO);
|
||||
}
|
||||
public String getMESE_EVENTO() {
|
||||
return getFieldValue(DwhCessazioniOutDAO.MESE_EVENTO);
|
||||
}
|
||||
public String getDESCR_STATO_EVENTO() {
|
||||
return getFieldValue(DwhCessazioniOutDAO.DESCR_STATO_EVENTO);
|
||||
}
|
||||
public String getDESCR_STATO_ATTUALE() {
|
||||
return getFieldValue(DwhCessazioniOutDAO.DESCR_STATO_ATTUALE);
|
||||
}
|
||||
public String getSTATO_EVENTO() {
|
||||
return getFieldValue(DwhCessazioniOutDAO.STATO_EVENTO);
|
||||
}
|
||||
public String getSTATO_ATTUALE() {
|
||||
return getFieldValue(DwhCessazioniOutDAO.STATO_ATTUALE);
|
||||
}
|
||||
|
||||
public String getPagingKey() {
|
||||
return getID_PROG();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.ReportMap;
|
||||
import it.valueteam.dbcgo.common.Utils;
|
||||
import it.valueteam.dbcgo.dao.BaseDAO;
|
||||
import it.valueteam.dbcgo.dao.DaoUtils;
|
||||
import it.valueteam.dbcgo.dao.Filter;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
public class DwhCessazioniOutDAO extends AbstractReportDAO implements ReportDAOIF {
|
||||
|
||||
static Logger logger = Logger.getLogger(DwhCessazioniOutDAO.class);
|
||||
|
||||
private static final String TABLE_NAME = "MNP_DWH_CESS_OUT";
|
||||
private static final String ALIAS = "a";
|
||||
|
||||
public static final int FIELDCOUNT = 10;
|
||||
|
||||
public static final int ID_PROG=0;
|
||||
public static final int RICHIESTE=1;
|
||||
public static final int OPERATORE_RECIPIENT=2;
|
||||
public static final int DATA_EVENTO=3;
|
||||
public static final int SETTIMANA_EVENTO=4;
|
||||
public static final int MESE_EVENTO=5;
|
||||
public static final int DESCR_STATO_EVENTO=6;
|
||||
public static final int DESCR_STATO_ATTUALE=7;
|
||||
public static final int STATO_EVENTO=8;
|
||||
public static final int STATO_ATTUALE=9;
|
||||
|
||||
|
||||
public static String[] fieldsName = {
|
||||
"ID_PROG",
|
||||
"RICHIESTE",
|
||||
"OPERATORE_RECIPIENT",
|
||||
"DATA_EVENTO",
|
||||
"SETTIMANA_EVENTO",
|
||||
"MESE_EVENTO",
|
||||
"DESCR_STATO_EVENTO",
|
||||
"DESCR_STATO_ATTUALE",
|
||||
"STATO_EVENTO",
|
||||
"STATO_ATTUALE"
|
||||
};
|
||||
|
||||
private static final String FROM_CLAUSE = " FROM " + TABLE_NAME + " " +ALIAS;
|
||||
|
||||
private static final String STANDARD_SELECT_CLAUSE =
|
||||
"SELECT " +
|
||||
ALIAS +"." + fieldsName[ID_PROG] + "," +
|
||||
ALIAS +"." + fieldsName[RICHIESTE] + "," +
|
||||
ALIAS +"." + fieldsName[OPERATORE_RECIPIENT] + "," +
|
||||
ALIAS +"." + fieldsName[DATA_EVENTO] + "," +
|
||||
ALIAS +"." + fieldsName[SETTIMANA_EVENTO] + "," +
|
||||
ALIAS +"." + fieldsName[MESE_EVENTO] + "," +
|
||||
ALIAS +"." + fieldsName[DESCR_STATO_EVENTO] + "," +
|
||||
ALIAS +"." + fieldsName[DESCR_STATO_ATTUALE] + "," +
|
||||
ALIAS +"." + fieldsName[STATO_EVENTO] + "," +
|
||||
ALIAS +"." + fieldsName[STATO_ATTUALE];
|
||||
|
||||
private static final String ORDER_BY_CLAUSE = " ORDER BY " + fieldsName[ID_PROG] + "," + fieldsName[SETTIMANA_EVENTO];
|
||||
|
||||
private static final String SELECT_COUNT_CLAUSE = "SELECT COUNT("+ ALIAS + "." + fieldsName[ID_PROG] + ")";
|
||||
|
||||
public DwhCessazioniOutDAO() throws Exception {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ds
|
||||
*/
|
||||
public DwhCessazioniOutDAO(DataSource ds) {
|
||||
super(ds);
|
||||
}
|
||||
|
||||
public List loadReportItems(String id_report, Filter filter) throws Exception {
|
||||
|
||||
String query;
|
||||
query = getQueryCessazioniOutDati(filter);
|
||||
|
||||
logger.debug(query);
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
List l = new Vector();
|
||||
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
ResultSetMetaData rsmd = rs.getMetaData();
|
||||
while (rs.next()) {
|
||||
DwhCessazioniOut item = new DwhCessazioniOut();
|
||||
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
|
||||
int j = getFieldIndex(rsmd.getColumnName(i));
|
||||
if (j != -1) {
|
||||
String columType = rsmd.getColumnTypeName(i);
|
||||
if (columType.equalsIgnoreCase("DATE"))
|
||||
item.setFieldValue(j, Utils
|
||||
.getString((java.util.Date) rs.getDate(i)));
|
||||
else
|
||||
item.setFieldValue(j, rs.getString(i));
|
||||
}
|
||||
}
|
||||
l.add(item);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
} finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
private String getQueryCessazioniOutDati(Filter filter) {
|
||||
String query = STANDARD_SELECT_CLAUSE + "" + FROM_CLAUSE + " WHERE " + filter.getSQL() + ORDER_BY_CLAUSE;
|
||||
return query;
|
||||
}
|
||||
|
||||
private int getFieldIndex(String fieldName) {
|
||||
for (int i = 0; i < FIELDCOUNT; i++) {
|
||||
if (fieldsName[i].equals(fieldName))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int writeCSVReport(String id, Filter filter, OutputStream os) throws Exception {
|
||||
//init
|
||||
String query;
|
||||
List columnToExclude = new ArrayList();
|
||||
columnToExclude.add("ID_PROG");
|
||||
|
||||
if (ReportMap.MNP_TIM_CESSAZIONE_IN_OUT_DATI_OUT.equals(id)) {
|
||||
query = getQueryCessazioniOutDati(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
|
||||
logger.debug(query);
|
||||
|
||||
Connection conn = null;
|
||||
Statement st = null;
|
||||
ResultSet rs = null;
|
||||
int k = 0;
|
||||
|
||||
try {
|
||||
|
||||
//query
|
||||
conn = this.getConnection();
|
||||
st = conn.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
|
||||
rs = st.executeQuery(query);
|
||||
k = DaoUtils.writeCSV(rs, os, ReportMap.DELIMITER, true, columnToExclude);
|
||||
logger.debug("writed out " + k);
|
||||
}
|
||||
catch (SQLException e) {
|
||||
throw e;
|
||||
}
|
||||
finally {
|
||||
closeAll(rs, st, conn);
|
||||
}
|
||||
return k;
|
||||
}
|
||||
|
||||
public Date getLastRefresh() throws Exception {
|
||||
return getLastUpdate(TABLE_NAME);
|
||||
}
|
||||
|
||||
|
||||
private String getQueryCountCessazioniOutDati(Filter filter) {
|
||||
String query = SELECT_COUNT_CLAUSE + FROM_CLAUSE + " WHERE " + filter.getSQL();
|
||||
return query;
|
||||
}
|
||||
|
||||
|
||||
public long countReportItems(String id, Filter filter) throws Exception {
|
||||
|
||||
String query;
|
||||
|
||||
if (ReportMap.MNP_TIM_CESSAZIONE_IN_OUT_DATI_OUT.equals(id)) {
|
||||
query = getQueryCountCessazioniOutDati(filter);
|
||||
} else {
|
||||
logger.debug("Id Report non gestito: " + id);
|
||||
throw new Exception("Id Report non gestito: " + id);
|
||||
}
|
||||
logger.debug(query);
|
||||
|
||||
Connection conn = null;
|
||||
long n = 0;
|
||||
try {
|
||||
conn = this.getConnection();
|
||||
Statement st = conn.createStatement(
|
||||
ResultSet.TYPE_SCROLL_INSENSITIVE,
|
||||
ResultSet.CONCUR_READ_ONLY);
|
||||
ResultSet rs = st.executeQuery(query);
|
||||
while (rs.next()) {
|
||||
n = rs.getLong(1);
|
||||
}
|
||||
rs.close();
|
||||
st.close();
|
||||
} catch (SQLException e) {
|
||||
//query failed
|
||||
logger.debug(query);
|
||||
throw e;
|
||||
} finally {
|
||||
try {
|
||||
if (!conn.isClosed())
|
||||
conn.close();
|
||||
} catch (SQLException e) {
|
||||
conn = null;
|
||||
}
|
||||
}
|
||||
return n;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package it.valueteam.dbcgo.dao.report;
|
||||
|
||||
import it.valueteam.dbcgo.common.PagingObjectIF;
|
||||
import it.valueteam.dbcgo.dao.Entity;
|
||||
|
||||
/**
|
||||
* Bean che mappa il report MNP TIM DONOR DATI - read only
|
||||
*/
|
||||
public class DwhDonorDati extends Entity implements PagingObjectIF{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public DwhDonorDati() {
|
||||
this.fieldsValue= new String[DwhDonorDatiDAO.FIELDCOUNT];
|
||||
}
|
||||
|
||||
public String getID_PROG() {
|
||||
return getFieldValue(DwhDonorDatiDAO.ID_PROG);
|
||||
}
|
||||
|
||||
public String getCOUNT() {
|
||||
return getFieldValue(DwhDonorDatiDAO.COUNT);
|
||||
}
|
||||
|
||||
public String getCLIENTE() {
|
||||
return getFieldValue(DwhDonorDatiDAO.CLIENTE);
|
||||
}
|
||||
|
||||
public String getOT() {
|
||||
return getFieldValue(DwhDonorDatiDAO.OT);
|
||||
}
|
||||
|
||||
public String getCODICE_POP_PRP() {
|
||||
return getFieldValue(DwhDonorDatiDAO.CODICE_POP_PRP);
|
||||
}
|
||||
|
||||
public String getMARCAGGIO() {
|
||||
return getFieldValue(DwhDonorDatiDAO.MARCAGGIO);
|
||||
}
|
||||
|
||||
public String getSOTTOMARCAGGIO() {
|
||||
return getFieldValue(DwhDonorDatiDAO.SOTTOMARCAGGIO);
|
||||
}
|
||||
|
||||
public String getRECIPIENT() {
|
||||
return getFieldValue(DwhDonorDatiDAO.RECIPIENT);
|
||||
}
|
||||
|
||||
public String getDATA_EVENTO() {
|
||||
return getFieldValue(DwhDonorDatiDAO.DATA_EVENTO);
|
||||
}
|
||||
|
||||
public String getSETTIMANA_EVENTO() {
|
||||
return getFieldValue(DwhDonorDatiDAO.SETTIMANA_EVENTO);
|
||||
}
|
||||
|
||||
public String getMESE_EVENTO() {
|
||||
return getFieldValue(DwhDonorDatiDAO.MESE_EVENTO);
|
||||
}
|
||||
|
||||
public String getSTATO_EVENTO() {
|
||||
return getFieldValue(DwhDonorDatiDAO.STATO_EVENTO);
|
||||
}
|
||||
|
||||
public String getSTATO_ATTUALE() {
|
||||
return getFieldValue(DwhDonorDatiDAO.STATO_ATTUALE);
|
||||
}
|
||||
|
||||
public String getSTANDARD_HOC() {
|
||||
return getFieldValue(DwhDonorDatiDAO.STANDARD_HOC);
|
||||
}
|
||||
|
||||
public String getDONOR_EFFETTIVO() {
|
||||
return getFieldValue(DwhDonorDatiDAO.DONOR_EFFETTIVO);
|
||||
}
|
||||
|
||||
public String getRECIPIENT_EFFETTIVO() {
|
||||
return getFieldValue(DwhDonorDatiDAO.RECIPIENT_EFFETTIVO);
|
||||
}
|
||||
|
||||
public String getPagingKey() {
|
||||
return getID_PROG();
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user