First Commit from Source Code Reply

This commit is contained in:
vincenzofariello
2024-05-09 17:40:24 +02:00
parent 11e3b57c5b
commit 107a016cb9
35225 changed files with 1111346 additions and 1 deletions

View File

@@ -0,0 +1,119 @@
package it.valueteam;
import com.tim.now.wsdl.verificasistemanp.*;
import com.tim.now.wsdl.verificasistemanp.holders.RispostaTypeHolder;
import com.tim.now.wsdl.verificasistemanp.holders.TestataTypeHolder;
import it.valueteam.gnp.utility.DateUtils;
import it.valueteam.now.webservices.client.chechnp.VerificaSistemaNP_PortType;
import it.valueteam.now.webservices.client.chechnp.VerificaSistemaNP_Service_Impl;
import tim.infobus.data.TID;
import javax.xml.rpc.Stub;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class TestAggiungiGiorniLavorativi {
public static void main(String args[])
throws Exception {/*
GnpRientroConsip gnpRientroConsip = new GnpRientroConsip();
String line="3;NO;X;mtw;1-5024853702;063688;routing;;2011-09-11;ANIA SPA;F1B";
String[] stringArr=line.split(";");
//Tipo richiesta
if (0<stringArr.length)
gnpRientroConsip.setTipoRichiesta(stringArr[0]);
//GNR
if (1<stringArr.length)
gnpRientroConsip.setGnr(stringArr[1]);
//CRM
if (2<stringArr.length)
gnpRientroConsip.setCrm(stringArr[2]);
//Identificativo Donor
if (3<stringArr.length)
gnpRientroConsip.setCow2(stringArr[3]);
//Esigenza
if (4<stringArr.length)
gnpRientroConsip.setIdRichiesta(stringArr[4]);
//Directory Number
if (5<stringArr.length)
gnpRientroConsip.setDn(stringArr[5]);
//Routing Number
if (6<stringArr.length)
gnpRientroConsip.setRoutingNumber(stringArr[6]);
//Tipo linea
if (7<stringArr.length)
gnpRientroConsip.setTipoLinea(stringArr[7]);
//DAC
if (8<stringArr.length)
gnpRientroConsip.setDac(stringArr[8]);
//Nominativo
if (9<stringArr.length)
gnpRientroConsip.setNominativoCliente(stringArr[9]);
//Codice Segreto
if (10<stringArr.length)
gnpRientroConsip.setCow(stringArr[10]);
Date now=new Date();
SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//Date now2=DateUtils.aggiungiGiorniLavorativiTodateImpostaOra(now, 8,23,30,0);
System.out.println("now1="+sdf1.format(now)+" - now2="+sdf2.format(now)); */
new TestAggiungiGiorniLavorativi().test();
}
private void test() {
String aggiuntivi = "06234234234;222222;33333333;4444444";
String[] vettore = aggiuntivi.split(";");
int i = vettore.length;
}
private void testWS() {
String url = "http://localhost:9999/mockSOAPServiceBinding_CheckNP_DBCFX";
int timeOut = 30000;
String dn = "06223344";
try {
VerificaSistemaNP_Service_Impl service = new VerificaSistemaNP_Service_Impl();
VerificaSistemaNP_PortType endPoint = service.getVerificaSistemaNPSOAP();
((Stub) endPoint)._setProperty("javax.xml.rpc.service.endpoint.address", url);
((Stub) endPoint)._setProperty("weblogic.wsee.transport.connection.timeout", timeOut);
TestataTypeHolder testataTypeHolder = new TestataTypeHolder();
TestataType testataType = new TestataType();
String tid = new TID().toString();
testataType.setTransaction_Id(tid);
testataType.setTransaction_Date(Calendar.getInstance());
testataType.setSistema_Origine(Sistema_Origine.dbcfx);
testataTypeHolder.value = testataType;
RichiestaType richiestaType = new RichiestaType();
String[] dns = {"06111111","06222222","06333333"};
richiestaType.setDN(dns);
RispostaTypeHolder risposta = new RispostaTypeHolder();
TestataTypeHolder respTestataTypeHolder = new TestataTypeHolder();
endPoint.verificaSistemaGestioneNP(testataType, richiestaType, respTestataTypeHolder, risposta);
RispostaType resp = risposta.value;
System.out.println("resp [" + resp + "]");
System.out.println("RC [" + resp.getRC() + "]");
RC rc = resp.getRC();
//SistemaDiCompetenza sistComp = resp.getSistemaDiCompetenza();
//System.out.println("SistemaCompetenzaRisposta [" + sistComp + "]");
int rcInt = new Integer(rc.getValue());
System.out.println("Esito Risposta [" + rcInt + "]");
System.out.println(risposta);
} catch (Exception e) {
e.printStackTrace();
}
}
}

View File

@@ -0,0 +1,135 @@
package it.valueteam.gnp.batch.assenzarispostaolo;
import java.util.List;
import javax.transaction.UserTransaction;
import it.valueteam.crontab.processexecutor.ProcessIF;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteRec;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteRecDAO;
import it.valueteam.gnp.exception.StateTransitionNotPossibleException;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.manager.RequestManagerRec;
import it.valueteam.gnp.obj.DBSSMap;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.systemcontroller.formatcontroller.dbss.DBSSController;
import it.valueteam.gnp.utility.Resources;
import it.valueteam.gnp.utility.UserTransactionUtility;
public class SendKoForAssenzaRipostaOlo implements Loggable, ProcessIF {
private ProcessLogger log;
private final static String codiceProcesso = "BL";
public SendKoForAssenzaRipostaOlo() throws Exception {
try {
// inizializzazione log
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
} catch (Exception ex) {
System.out.println("Errore nell'inizializzazione di SendKoForAssenzaRipostaOlo");
throw ex;
}
}
@Override
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
@Override
public boolean requiredTX() {
return false;
}
@Override
public void execute(String[] args) throws Exception {
log.write("9999", "Start SendKoForAssenzaRipostaOlo");
try {
handleRichiesteFuoriSla();
handleRichiesteInBlackList();
} catch (Exception ex) {
log.write("9999", "Exception in execute " + ex.getMessage());
}
log.write("9999", "End SendKoForAssenzaRipostaOlo");
}
private void handleRichiesteFuoriSla() throws Exception {
log.write("9999", "Start handleRichiesteFuoriSla");
int sla = Integer.parseInt(Resources.getOLO_SLA_INVIO_KO() != null ? Resources.getOLO_SLA_INVIO_KO() : "0");
log.write("9999", "sla ottenuto "+sla);
GnpRichiesteRecDAO richiesteDao = new GnpRichiesteRecDAO();
List<GnpRichiesteRec> listRequestFuoriSLA = richiesteDao.getDbssOloSLAInvioKO(sla);
handleRequests(listRequestFuoriSLA, DBSSMap.OLO_NON_RAGGIUNGIBILE);
log.write("9999", "End handleRichiesteFuoriSla");
}
private void handleRichiesteInBlackList() throws Exception {
log.write("9999", "Start handleRichiesteInBlackList");
GnpRichiesteRecDAO richiesteDao = new GnpRichiesteRecDAO();
List<GnpRichiesteRec> listRequestBlackList = richiesteDao.getDbssOloBlackList();
handleRequests(listRequestBlackList, DBSSMap.OLO_IN_BLACK_LIST);
log.write("9999", "End handleRichiesteInBlackList");
}
private void handleRequests(List<GnpRichiesteRec> listRichiesteRec, String notificaDbss) throws Exception {
log.write("9999", "Start handleRequests");
UserTransaction uTX = null;
if (listRichiesteRec != null) {
log.write("9999", "recuperate " + listRichiesteRec.size() + " Richieste");
for (GnpRichiesteRec richiestaRec : listRichiesteRec) {
try {
uTX = UserTransactionUtility.beginUserTransaction();
invioAndAvanzamentoStato(richiestaRec, notificaDbss);
UserTransactionUtility.endUserTransaction(uTX, true);
} catch(Exception ex) {
handleException(uTX, richiestaRec, ex);
}
}
log.write("9999", "Completato invio richieste");
} else {
log.write("9999", "Nessuna Richiesta presente");
}
log.write("9999", "End handleRequests");
}
private void invioAndAvanzamentoStato(GnpRichiesteRec richiestaRec, String notificaDbss)
throws StateTransitionNotPossibleException, Exception {
log.write("9999", "Start invioAndAvanzamentoStato per " + richiestaRec.getIdRichiesta());
richiestaRec.setDaInviare(0L);
RequestManagerRec.avanzaStatoInAccettataKO(richiestaRec, log);
log.write("9999", "SendKoForAssenzaRipostaOlo - Invio della notifica a DBSS della richiesta con id " + richiestaRec.getIdRichiesta());
DBSSController dbssController = DBSSController.getInstance();
dbssController.notificaDbss(richiestaRec, DBSSMap.NOTIFICA_ACCETTAZIONE_KO, notificaDbss);
log.write("9999", "End invioAndAvanzamentoStato");
}
private void handleException(UserTransaction uTX, GnpRichiesteRec richiestaRec, Exception ex)
throws Exception {
// Se l'avanzamento di stato di una richiesta va in eccezione si passa a quella successiva
log.write("9999", "Exception in gestione idrichiesta" + richiestaRec.getIdRichiesta()
+" exeption "+ex.getMessage());
UserTransactionUtility.endUserTransaction(uTX, false);
}
}

View File

@@ -0,0 +1,238 @@
package it.valueteam.gnp.batch.whitelistcb;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.utility.Resources;
import java.io.File;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
import it.valueteam.gnp.dao.db.hb.GnpVerificaCsWhitelist;
import it.valueteam.crontab.processexecutor.ProcessIF;
public class WhiteListCbReaderAndGen implements Loggable, ProcessIF{
private ProcessLogger log;
private final static String codiceProcesso = "MP";
private String separator = ";";
public WhiteListCbReaderAndGen() throws Exception {
try {
initLog();
} catch (Exception ex) {
System.out.println("Errore nell'inizializzazione di WhiteListCbReaderAndGen");
throw ex;
}
}
private void initLog() throws Exception {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
}
public void execute(String[] args) throws Exception {
log.write("9999", "Start WhiteListCbReaderAndGen");
try {
readFileAndGetList();
}catch(Exception ex) {
log.write("9999", "Exception in execute "+ex.getMessage());
}
log.write("9999", "End WhiteListCbReaderAndGen");
}
private void readFileAndGetList() throws Exception {
log.write("9999", "Start readFileAndGetList");
List<String> listFileName = getListFileName(Resources.getWHITE_LIST_CB_PATH());
readFiles(listFileName);
log.write("9999", "End readFileAndGetList");
}
private List<String> getListFileName(String folderName) throws Exception {
log.write("9999", "Start getFiles for folder "+folderName);
List<String> listFileName = new ArrayList<String>();
try {
File folder = new File(folderName);
File[] listOfFiles = folder.listFiles();
for (File file : listOfFiles) {
if (file.isFile()) {
log.write("9999", "file presente "+file.getName());
listFileName.add(file.getName());
}
}
}catch(Exception ex) {
log.write("9999", "Excetpion in getListFileName " +ex.getMessage());
throw ex;
}
log.write("9999", "END getFiles");
return listFileName;
}
private void readFiles(List<String> listFileName) throws Exception {
log.write("9999", "Start readFiles");
for(String fileName : listFileName) {
List<GnpVerificaCsWhitelist> listForFile = readFileAndGetList(fileName);
generateCompleteFile(listForFile, fileName);
}
log.write("9999", "End readFiles");
}
private void generateCompleteFile(List<GnpVerificaCsWhitelist> listForFile, String fileNameElab) throws Exception {
log.write("9999", "Start generateCompleteFile");
try {
File file = createEmptyFile(fileNameElab);
PrintWriter pw = new PrintWriter(file);
StringBuilder sb = new StringBuilder();
addHeader(sb);
for(GnpVerificaCsWhitelist gnpVerificaCsWhitelist : listForFile) {
log.write("9999", "inserimento nuova riga per "+gnpVerificaCsWhitelist.getNumeroTelefono());
sb.append(setString(gnpVerificaCsWhitelist.getNumeroTelefono()));
sb.append(";");
sb.append(setString(gnpVerificaCsWhitelist.getCodiceSegreto()));
sb.append(";");
sb.append(setString(gnpVerificaCsWhitelist.getFlagVerificaCs()));
sb.append(";");
sb.append('\n');
}
pw.write(sb.toString());
log.write("9999", "generazione file avvenuta con successo");
pw.close();
} catch (Exception e) {
log.write("9999", "Exception ex "+e.getMessage());
throw e;
}
log.write("9999", "END generateCompleteFile");
}
private void addHeader(StringBuilder sb) {
sb.append(Resources.getWHITE_LIST_FILE_HEADER_OUT());
sb.append('\n');
log.write("9999", "header aggiunto correttametne");
}
private File createEmptyFile(String fileNameElab) {
log.write("9999", "Start createFile");
String filePath = Resources.getWHITE_LIST_CB_PATH_OUT();
String fileName = getOutFileName(fileNameElab);
log.write("9999", "creaziopme file "+filePath + fileName);
return new File(filePath + fileName);
}
private String getOutFileName(String fileNameElab) {
String partFileName = fileNameElab.split("\\.")[0];
return partFileName += ".dat";
}
private List<GnpVerificaCsWhitelist> readFileAndGetList(String fileName) throws Exception {
log.write("9999", "Start readFileAndGetList");
List<GnpVerificaCsWhitelist> listForFile = new ArrayList<GnpVerificaCsWhitelist>();
try {
log.write("9999", "file da elaborare "+Resources.getWHITE_LIST_CB_PATH()+fileName);
File wlFile = new File(Resources.getWHITE_LIST_CB_PATH()+fileName);
Scanner reader = new Scanner(wlFile);
int row=0;
int firstRowHeader= 0;
while (reader.hasNextLine()) {
if(row == firstRowHeader) {
reader.nextLine();
}else {
GnpVerificaCsWhitelist gnpVerificaCsWhitelist = getDataFromLine(reader.nextLine());
listForFile.add(gnpVerificaCsWhitelist);
}
row++;
}
reader.close();
backupFile(wlFile,fileName);
} catch (Exception e) {
log.write("9999", "exception in readFileAndGetList "+e.getMessage());
throw e;
}
return listForFile;
}
private void backupFile(File wlFile, String fileName) {
log.write("9999", "Start backup file");
wlFile.renameTo(new File(Resources.getWHITE_LIST_CB_BACKUP_PATH()+"backup_"+fileName));
log.write("9999", "Backup effettuato "+Resources.getWHITE_LIST_CB_BACKUP_PATH()+fileName);
}
private GnpVerificaCsWhitelist getDataFromLine(String line) {
log.write("9999", "start getDataFromLine line= "+line);
String[] parts = line.split(separator);
GnpVerificaCsWhitelist gnpVerificaCsWhitelist = new GnpVerificaCsWhitelist();
gnpVerificaCsWhitelist.setNumeroTelefono(parts[0]);
gnpVerificaCsWhitelist.setCodiceSegreto(parts[1]);
gnpVerificaCsWhitelist.setCodiceFiscalePartitaIva(parts[2]);
gnpVerificaCsWhitelist.setSistComp(parts[3]);
gnpVerificaCsWhitelist.setFlagVerificaCs(parts[4]);
log.write("9999", "Created obj gnpVerificaCsWhitelist "+gnpVerificaCsWhitelist.toString());
log.write("9999", "End getDataFromLine");
return gnpVerificaCsWhitelist;
}
@Override
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
// Setta stringa vuota invece che null
private String setString(String elem) {
return elem != null ? elem : "";
}
@Override
public boolean requiredTX() {
return false;
}
}

View File

@@ -0,0 +1,514 @@
package it.valueteam.gnp.controller;
import it.valueteam.gnp.dao.db.hb.GnpDoppioDonatingOloBridge;
import it.valueteam.gnp.dao.db.hb.GnpDoppioDonatingOloBridgeDAO;
import it.valueteam.gnp.dao.db.hb.GnpOloRichiesteIn;
import it.valueteam.gnp.dao.db.hb.GnpPitagoraA375In;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteRec;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteRecDAO;
import it.valueteam.gnp.dao.db.hb.crm.AbstractGnpCrmInRec;
import it.valueteam.gnp.exception.StateTransitionNotPossibleException;
import it.valueteam.gnp.jms.MessageHandler;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.manager.RequestDoppioDonatingManager;
import it.valueteam.gnp.manager.RequestManagerRec;
import it.valueteam.gnp.obj.ApplicationCostants;
import it.valueteam.gnp.obj.CRMMap;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.obj.StatoRichiestaDoppioDonating;
import it.valueteam.gnp.obj.StatoRichiestaRec;
import it.valueteam.gnp.obj.jms.NotificationMessage;
import it.valueteam.gnp.obj.jms.NotificationMessageIF;
import it.valueteam.gnp.obj.jms.UniqueIdNotificationMessage;
import it.valueteam.gnp.systemcontroller.ControllerFactory;
import it.valueteam.gnp.systemcontroller.SystemController;
import it.valueteam.gnp.systemcontroller.SystemControllerIF;
import it.valueteam.gnp.systemcontroller.crm.SistemaCrmIF;
import it.valueteam.gnp.systemcontroller.formatcontroller.doppiodonating.DoppioDonatingFormatController;
import it.valueteam.gnp.systemcontroller.formatcontroller.pitagora.WSPitagoraFormatController;
import it.valueteam.gnp.systemcontroller.pitagora.WSPitagoraController;
import it.valueteam.gnp.utility.Func;
import it.valueteam.gnp.utility.Resources;
/**
* <p>
* Title: DoppioDonatingController
* Description: kit X5 2009: gestisce le richieste di tipo doppio donating
* Copyright: Copyright (c) 2009
* Company: Value team
* </p>
*
* @author Danilo Del Fio
* @version 1.0
* @version 2.0 20180717 corretta gestione richiesta duale null
*/
public class DoppioDonatingController extends SystemController implements Loggable {
protected ProcessLogger log;
protected String codiceProcesso = "YB";
protected final static String versione = "1.0.0";
private GnpDoppioDonatingOloBridgeDAO richiesteDDDAO;
private static DoppioDonatingController onlyInstance;
private final static String TIPO_SERVIZIO_FONIA = "F";
protected DoppioDonatingController() throws Exception {
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
richiesteDDDAO= new GnpDoppioDonatingOloBridgeDAO();
} catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
/**
* Utilizzato per ottenere l'istanza del controller
* @throws Exception
* @return DoppioDonatingController
*/
public static DoppioDonatingController getInstance() throws Exception {
if (onlyInstance == null) {
synchronized (DoppioDonatingController.class) {
if (onlyInstance == null)
onlyInstance = new DoppioDonatingController();
}
}
return onlyInstance;
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
public void handleMessage(NotificationMessage messaggio) throws Exception {
int notificationtype = messaggio.getNotificationType();
// 0004 N - INIZIO TRATTAMENTO MESSAGGIO
log.write("0004", this.getVersione() + "TIPO_NOTIFICA = ["+ messaggio.getNotificationType() + "]");
try
{
switch (notificationtype) {
case NotificationMessageIF.NotificationType_DOPPIO_DONATING_OUT:
handleOutgoingMessages(messaggio);
break;
default:
log.write("9999", "NOTIFICATION TYPE SCONOSCIUTO" + Func.getFieldDescription(messaggio));
break;
}
// Log 0006 (N) = 'FINE TRATTAMENTO MESSAGGIO'
log.write("0006", "TIPO_NOTIFICA = [" + messaggio.getNotificationType() + "]");
} catch (Exception ex) {
log.write("0007", "TIPO_NOTIFICA = [" + messaggio.getNotificationType() + "] -" +ex.toString()+" - tracciato:"+Func.getFieldDescription(messaggio));
ex.printStackTrace();
throw ex;
} catch (Throwable th) {
th.printStackTrace();
// *******************************************************************************************
log.write("0007", "TIPO_NOTIFICA = [" + messaggio.getNotificationType() + "] -" +th.toString()+" - tracciato:"+Func.getFieldDescription(messaggio));
throw new Exception(th.toString()); // in ogni caso faccio
// tornare il msg in coda
// ********************************************************************************************
}
}
/**
* Il metodo inserisce in coda un messaggio di notifica doppio donating
* @param gestioneRec GnpRichiesteRec
*/
public void notificaRichiestaDoppioDonating(GnpRichiesteRec richiestaRec) throws Exception {
NotificationMessage messaggioOut = null;
messaggioOut= creaNotificationMessageDoppioDonatingOut(richiestaRec.getIdRichiesta(),richiestaRec.getProcesso());
if(messaggioOut!=null) {
inserisciMessaggioInCoda(messaggioOut);
}
}
public void elaboraRispostaOLO(GnpDoppioDonatingOloBridge richiestaDoppioDonating, GnpOloRichiesteIn oloRichiestaIn) throws Exception {
try
{
boolean changedState = false; // Flag che indica che la richiesta ha cambiato stato
if (oloRichiestaIn.getTipoComunicazione().intValue() == ApplicationCostants.OLO_TIPO_COMUNICAZIONE_VER_FORMALI) {
if (oloRichiestaIn.getStatoRichiesta().intValue() == ApplicationCostants.OLO_STATO_RICHIESTA_KO) {
int codiceCausale = Integer.parseInt((oloRichiestaIn.getCodiceMotivoRifiuto()));
gestisciKoOLO(oloRichiestaIn.getTipoComunicazione().intValue(),codiceCausale, richiestaDoppioDonating);
} else {
RequestDoppioDonatingManager.avanzaStatoInAccettata(richiestaDoppioDonating,oloRichiestaIn.getCodiceSessione(), log);
}
changedState = true;
}
else if (oloRichiestaIn.getTipoComunicazione().intValue() == ApplicationCostants.OLO_TIPO_COMUNICAZIONE_VER_GESTIONALI) {
if (oloRichiestaIn.getStatoRichiesta().intValue() == ApplicationCostants.OLO_STATO_RICHIESTA_KO) {
int codiceCausale = Integer.parseInt((oloRichiestaIn.getCodiceMotivoRifiuto()));
gestisciKoOLO(oloRichiestaIn.getTipoComunicazione().intValue(), codiceCausale,richiestaDoppioDonating);
} else {
RequestDoppioDonatingManager.avanzaStatoInValidata(richiestaDoppioDonating, log);
}
changedState = true;
} else if (oloRichiestaIn.getTipoComunicazione().intValue() == ApplicationCostants.OLO_TIPO_COMUNICAZIONE_MUTATA_VOLONTA) {
// aggiorno la richiesta e la salvo
updateMutataVolonta(richiestaDoppioDonating);
log.write("9999", "ACQUISITA TIPO COMUNICAZIONE MUTATA VOLONTA' PER ID_RICHIESTA : " + richiestaDoppioDonating.getUniqueId());
} else {
log.write("9999", "TIPO COMUNICAZIONE:" + oloRichiestaIn.getTipoComunicazione().intValue()
+ " NON SUPPORTATO PER LA RICHIESTA CON ID_ESIGENZA: " + oloRichiestaIn.getCodiceOrdineRecipient());
}
if(changedState)
modificaRichiestaBusinessPerOLOIn(richiestaDoppioDonating, oloRichiestaIn);
}
catch (StateTransitionNotPossibleException e) {
log.write("9999", "RICHIESTA DI TRANSIZIONE DI STATO INCONSISTENTE SU ID_RICHIESTA=" + richiestaDoppioDonating.getUniqueId());
throw e;
}
}
private void updateMutataVolonta(GnpDoppioDonatingOloBridge richiestaDoppioDonating) {
GnpRichiesteRecDAO daoBusiness = new GnpRichiesteRecDAO();
GnpRichiesteRec richiestaRec = daoBusiness.findById(richiestaDoppioDonating.getIdRichiesta());
richiestaRec.setMutataVolonta(new Long(1));
daoBusiness.merge(richiestaRec);
}
public void verificaA375(GnpRichiesteRec richiestaRec,GnpPitagoraA375In pitagoraA375In, boolean isSpeciale, boolean isInbound,boolean isFlagDichiarazioneChecked) throws Exception{
// verifico la tipologia del processo che stiamo gestendo
if (pitagoraA375In.getTipoProcesso().equals(WSPitagoraFormatController.TIPO_PROCESSO_RIENTRO)) {
// FONIA
if(pitagoraA375In.getStato().equals(WSPitagoraController.ESITO_OK)) { // ESITO = OK
// FONIA OK !!!
WSPitagoraController.getInstance().gestisciRichiestaDaInviareAlWS(richiestaRec);
} else {// ESITO = KO
if (pitagoraA375In.getCodiceKo().equals(WSPitagoraController.ESITO_KO_A375)) { // esito KO = A1
if (isSpeciale || (isInbound && isFlagDichiarazioneChecked)) {
GnpRichiesteRecDAO richRecDAO = new GnpRichiesteRecDAO();
richiestaRec.setVerificataA375(WSPitagoraFormatController.VERIFICATA_A375);
richRecDAO.merge(richiestaRec);
// inserisco nella richiesta i valori che identificano una richiesta dati
// verificare il tipo_processo e tipo_atterraggio
WSPitagoraController.getInstance().gestisciRichiestaDaInviareAlWS(richiestaRec);
} else {
RequestManagerRec.avanzaStatoInVerificataKO(richiestaRec, WSPitagoraController.ESITO_KO_A375, log);
}
} else { // esito KO <> A1
RequestManagerRec.avanzaStatoInRifiutataPitagora(richiestaRec, pitagoraA375In.getCodiceKo(), pitagoraA375In.getDescrizioneKo(), true, CRMMap.NOTIFICA_RIFIUTATAPITAGORA_A375, log);
}
}
} else {
// DATI
if(pitagoraA375In.getStato().equals(WSPitagoraController.ESITO_OK)) { // ESITO = OK
// DATI OK !!!
if(richiestaRec.getVerificataA375().equals(WSPitagoraFormatController.VERIFICATA_A375)) {
// INVIO NOTIFICA A CRM CON TIPO_EVENTO=VALIDAZIONE_ANTITRUST ED ESITO=OK
SistemaCrmIF crmController = ControllerFactory.getSistemaCrmFromPiattaformaProvenienza(richiestaRec.getPiattaformaProvenienza());
crmController.notificaCRM(richiestaRec.getIdRichiesta(), CRMMap.NOTIFICA_VALIDATAPITAGORA_A375);
}
RequestManagerRec.avanzaStatoInVerificataOK(richiestaRec, WSPitagoraController.ESITO_OK,true, log);
} else {// ESITO = KO
if (pitagoraA375In.getCodiceKo().equals(WSPitagoraController.ESITO_KO_A375)) { // esito KO = A1
if (isSpeciale || (isInbound && isFlagDichiarazioneChecked)) {
GnpRichiesteRecDAO richRecDAO = new GnpRichiesteRecDAO();
richiestaRec.setVerificataA375(WSPitagoraFormatController.VERIFICATA_A375);
richRecDAO.merge(richiestaRec);
// INVIO NOTIFICA A CRM CON TIPO_EVENTO=VALIDAZIONE_ANTITRUST ED ESITO=OK
SistemaCrmIF crmController = ControllerFactory.getSistemaCrmFromPiattaformaProvenienza(richiestaRec.getPiattaformaProvenienza());
crmController.notificaCRM(richiestaRec.getIdRichiesta(), CRMMap.NOTIFICA_VALIDATAPITAGORA_A375);
} else {
RequestManagerRec.avanzaStatoInVerificataKO(richiestaRec, WSPitagoraController.ESITO_KO_A375, log);
// INVIO NOTIFICA A CRM CON TIPO_EVENTO=VALIDAZIONE_ANTITRUST, ESITO=KO e CAUSALE=A1
SistemaCrmIF crmController = ControllerFactory.getSistemaCrmFromPiattaformaProvenienza(richiestaRec.getPiattaformaProvenienza());
crmController.notificaCRM(richiestaRec.getIdRichiesta(), CRMMap.NOTIFICA_RIFIUTATAPITAGORA_A375);
}
}
}
}
}
private void gestisciKoOLO(int tipoCom, int codiceCausale,GnpDoppioDonatingOloBridge richiestaDoppioDonating) throws Exception{
switch(tipoCom){
case ApplicationCostants.OLO_TIPO_COMUNICAZIONE_VER_FORMALI:
if(codiceCausale==ApplicationCostants.KO_SUPERMENTO_SOGLIA_VER_FORMALI){
RequestDoppioDonatingManager.avanzaStatoInDaReinviare(richiestaDoppioDonating,codiceCausale, log);
}else{
RequestDoppioDonatingManager.avanzaStatoInAccettataKO(richiestaDoppioDonating, codiceCausale,log);
}
break;
//ST 2018-BU-71554 Ottimizzazione gestione KO Fase 2
/*
* Cambiare eventualmente gestione risottomissione nel caso di richiesta
* appartenente al CRMB. In questo caso avanzare la richiesta direttamente in rifiutataOLO
*/
case ApplicationCostants.OLO_TIPO_COMUNICAZIONE_VER_GESTIONALI:
if(codiceCausale==ApplicationCostants.KO_TRASLOCO_VER_GESTIONALI){
int numKoTrasloco = richiestaDoppioDonating.getNumKoTraslocoOlo() == null ? 0 : richiestaDoppioDonating.getNumKoTraslocoOlo().intValue()+1;
if(numKoTrasloco<ApplicationCostants.MAX_KO_TRASLOCO_OLO){
RequestDoppioDonatingManager.avanzaStatoInDaReinviare(richiestaDoppioDonating,codiceCausale, log);
}else{
log.write("9999", "RAGGIUNTO NUMERO MASSIMO DI KO PER RICHIESTA DOPPIO DONATING CON CODICE :"+ApplicationCostants.KO_TRASLOCO_VER_GESTIONALI+", ID_RICHIESTA : "+richiestaDoppioDonating.getUniqueId());
RequestDoppioDonatingManager.avanzaStatoInRifiutata(richiestaDoppioDonating, codiceCausale,log);
}
}else{
RequestDoppioDonatingManager.avanzaStatoInRifiutata(richiestaDoppioDonating, codiceCausale, log);
}
break;
default:
throw new Exception("Tipo Comunicazione sconosciuto durante la gestione del KO da OLO PER RICHIESTA DOPPIO DONATING");
}
}
/**
* Determina e applica le modifiche alla richiesta di business all'arrivo della notifica da OLO
*
* @param richiestaDD
* @param richiestaIn
* @version 2.0 20180717 corretta gestione richiesta duale null
*/
private void modificaRichiestaBusinessPerOLOIn(GnpDoppioDonatingOloBridge richiestaDD, GnpOloRichiesteIn richiestaIn)
throws Exception
{
GnpDoppioDonatingOloBridgeDAO dao = new GnpDoppioDonatingOloBridgeDAO();
GnpDoppioDonatingOloBridge richDuale = dao.findRichiestaDuale(richiestaDD);
GnpRichiesteRecDAO daoBusiness = new GnpRichiesteRecDAO();
GnpRichiesteRec richBusiness = daoBusiness.findById(richiestaDD.getIdRichiesta());
boolean richOlo1 = richiestaDD.getTipoServizio().equals(TIPO_SERVIZIO_FONIA);
// version 2.0 20180717 BEGIN
Long stato_OLO1 = richOlo1 ? richiestaDD.getStato() : ( null == richDuale ? null : richDuale.getStato() );
//Long stato_OLO1 = richOlo1 ? richiestaDD.getStato() : richDuale.getStato();
Long stato_OLO2 = richOlo1 ? ( null == richDuale ? null : richDuale.getStato() ) : richiestaDD.getStato() ;
//Long stato_OLO2 = !richOlo1 ? richiestaDD.getStato() : (richDuale != null ? richDuale.getStato() : null);
// version 2.0 20180717 END
int codiceCausaleKoOLO = 0;
Long statoRichBusiness = StatoRichiestaDoppioDonating.checkTransizioneRichiestaBase(stato_OLO1, stato_OLO2, richBusiness.getStato(), richOlo1);
if(statoRichBusiness != null)
{
switch(statoRichBusiness.intValue())
{
case StatoRichiestaRec.ACCETTATA:
// Avverti che non deve notificare a OLO!
RequestManagerRec.avanzaStatoInAccettata(richBusiness, richiestaIn.getCodiceSessione(), !richOlo1, false, log);
break;
case StatoRichiestaRec.INVIOOLO:
RequestManagerRec.avanzaStatoInInvioOlo(richBusiness, log);
break;
case StatoRichiestaRec.ACCETTATAKO:
codiceCausaleKoOLO = Integer.parseInt((richiestaIn.getCodiceMotivoRifiuto()));
// Avverti che non deve notificare a OLO!
RequestManagerRec.avanzaStatoInAccettataKO(richBusiness, codiceCausaleKoOLO, false, log);
break;
case StatoRichiestaRec.RIFIUTATA_OLO:
codiceCausaleKoOLO = Integer.parseInt((richiestaIn.getCodiceMotivoRifiuto()));
// Avverti che non deve notificare a OLO!
RequestManagerRec.avanzaStatoInRifiutataOlo(richBusiness, codiceCausaleKoOLO, false, log);
break;
}
}
switch(richiestaDD.getStato().intValue())
{
case StatoRichiestaDoppioDonating.ACCETTATA:
// Imposta codice sessione
if(richOlo1) {
richBusiness.setCodiceSessioneOlo(richiestaIn.getCodiceSessione());
} else {
richBusiness.setCodiceSessioneOlo2(richiestaIn.getCodiceSessione());
}
break;
case StatoRichiestaDoppioDonating.DA_REINVIARE:
// Se si tratta di un KO per trasloco...
if(richiestaIn.getTipoComunicazione().intValue() == ApplicationCostants.OLO_TIPO_COMUNICAZIONE_VER_GESTIONALI)
{
codiceCausaleKoOLO = Integer.parseInt((richiestaIn.getCodiceMotivoRifiuto()));
if(richOlo1) {
richBusiness.setCodiceRifiutoOloValidazione(new Long(codiceCausaleKoOLO));
} else {
richBusiness.setCodiceRifiutoOlo2Validaz(new Long(codiceCausaleKoOLO));
}
}
else
{
// altrimenti solo il codice rifiuto OLO
codiceCausaleKoOLO = Integer.parseInt((richiestaIn.getCodiceMotivoRifiuto()));
if(richOlo1) {
richBusiness.setCodiceRifiutoOloAccett(new Long(codiceCausaleKoOLO));
} else {
richBusiness.setCodiceRifiutoOlo2Accett(new Long(codiceCausaleKoOLO));
}
}
break;
case StatoRichiestaDoppioDonating.ACCETTATAKO:
codiceCausaleKoOLO = Integer.parseInt((richiestaIn.getCodiceMotivoRifiuto()));
if(richOlo1) {
richBusiness.setCodiceRifiutoOloAccett(new Long(codiceCausaleKoOLO));
} else {
richBusiness.setCodiceRifiutoOlo2Accett(new Long(codiceCausaleKoOLO));
}
break;
case StatoRichiestaDoppioDonating.RIFIUTATA:
codiceCausaleKoOLO = Integer.parseInt((richiestaIn.getCodiceMotivoRifiuto()));
if(richOlo1) {
richBusiness.setCodiceRifiutoOloValidazione(new Long(codiceCausaleKoOLO));
} else {
richBusiness.setCodiceRifiutoOlo2Validaz(new Long(codiceCausaleKoOLO));
}
break;
}
}
private void handleOutgoingMessages(NotificationMessage msg) throws Exception {
//recupero la richiesta di doppio donating dalla tabella di business
UniqueIdNotificationMessage messaggio = (UniqueIdNotificationMessage)msg;
GnpRichiesteRecDAO richiesteDao= new GnpRichiesteRecDAO();
GnpRichiesteRec richiestaRec= richiesteDao.findById(messaggio.getUnique_id());
DoppioDonatingFormatController formatController = new DoppioDonatingFormatController();
// salvo sicuramente la prima richiesta indirizzata all'olo 1
GnpDoppioDonatingOloBridge richDD= formatController.createDoubleDonatingRequest(richiestaRec, true);
richiesteDDDAO.save(richDD);
// verifico che i due COW siano diversi
if(!richiestaRec.getCow().equals(richiestaRec.getCow2())) {
//il flag per la creazione della richiesta da salvare, serve per definire se si tratta
//della richiesta da inviare ad OLO1 (true) o OLO2 (false)
richDD= formatController.createDoubleDonatingRequest(richiestaRec, false);
richiesteDDDAO.save(richDD);
}
RequestManagerRec.avanzaStatoInInvioOlo(richiestaRec, log);
}
protected String getVersione() {
return versione;
}
@Override
protected int getSystemControllerProvider() {
return SystemControllerIF.SystemProvider_DOPPIO_DONATING;
}
/**
* Metodo che inserisce in coda un messagio deve essere sempre chiamato in
* ****TRANSAZIONE*****
*
* @throws Exception
*/
protected void inserisciMessaggioInCoda(NotificationMessage messaggio) throws Exception {
MessageHandler messageH = null;
messageH = MessageHandler.getInstance();
messageH.insertQueue(messaggio);
}
/**
* Crea il NotificationMessage da inserire nella coda di uscita
*
* @param uniqueId String
* @return NotificationMessage
*/
protected NotificationMessage creaNotificationMessageDoppioDonatingIn(Long uniqueId, String tipoServizio) {
UniqueIdNotificationMessage messaggio = new UniqueIdNotificationMessage();
messaggio.setUnique_id(uniqueId);
messaggio.setNotificationType(NotificationMessageIF.NotificationType_DOPPIO_DONATING_IN);
// to do verificare il tipo processo se da inserire
//DA VERIFICARE ANCHE SE TIPO SERVIZIO NEL NOSTRO CASO COINCIDE COL TIPO PROCESSO
messaggio.setProcessType(tipoServizio);
messaggio.setSystemProvider(NotificationMessageIF.SystemProvider_DOPPIO_DONATING);
return messaggio;
}
/**
* Crea il NotificationMessage da inserire nella coda di uscita
*
* @param uniqueId String
* @return NotificationMessage
*/
protected NotificationMessage creaNotificationMessageDoppioDonatingOut(Long uniqueId, String tipoServizio) {
UniqueIdNotificationMessage messaggio = new UniqueIdNotificationMessage();
messaggio.setUnique_id(uniqueId);
messaggio.setNotificationType(NotificationMessageIF.NotificationType_DOPPIO_DONATING_OUT);
// to do verificare il tipo processo se da inserire
//DA VERIFICARE ANCHE SE TIPO SERVIZIO NEL NOSTRO CASO COINCIDE COL TIPO PROCESSO
messaggio.setProcessType(tipoServizio);
messaggio.setSystemProvider(NotificationMessageIF.SystemProvider_DOPPIO_DONATING);
return messaggio;
}
public void gestisciDisdetta(GnpRichiesteRec richiestaRec, String tipoDisdetta, String tipoEvento) throws Exception {
// Se la disdetta e' di FONIA va fatto l'avanzamento di stato della richiesta di business e delle singole richieste
if ("F".equals(tipoDisdetta)) {
GnpDoppioDonatingOloBridge ddFonia = richiesteDDDAO.findRichiestaFonia(richiestaRec.getIdRichiesta());
if (ddFonia != null) {
RequestDoppioDonatingManager.avanzaStatoInDisdetta(ddFonia, log);
}
GnpDoppioDonatingOloBridge ddDati = richiesteDDDAO.findRichiestaDuale(ddFonia);
if (ddDati != null) {
RequestDoppioDonatingManager.avanzaStatoInDisdetta(ddDati, log);
}
RequestManagerRec.avanzaStatoInDisdetta(richiestaRec, tipoEvento);
} else {
// Se la disdetta e' di DATI la richiesta di business non subisce avanzamenti di stato, ma solamente
// quella duale
GnpDoppioDonatingOloBridge richiestaDD = richiesteDDDAO.findRichiestaDati(richiestaRec.getIdRichiesta());
if (richiestaDD != null) {
RequestDoppioDonatingManager.avanzaStatoInDisdetta(richiestaDD, log);
// In questo caso il codice sessione 2 va azzerato per non inviarlo a Pitagora
richiestaRec.setCodiceSessioneOlo2("");
}
}
}
public void gestisciEmissione(GnpRichiesteRec richiestaRec)
throws Exception
{
// Se l'emissione arriva prima della Fase III deve essere inviata disdetta a OLO2
switch(richiestaRec.getStato().intValue())
{
case StatoRichiestaRec.INVIOOLO:
case StatoRichiestaRec.ACCETTATA:
case StatoRichiestaRec.VALIDATING:
GnpDoppioDonatingOloBridge ddDati = richiesteDDDAO.findRichiestaDati(richiestaRec.getIdRichiesta());
if(ddDati != null)
RequestDoppioDonatingManager.avanzaStatoInDisdetta(ddDati, log);
break;
}
}
}

View File

@@ -0,0 +1,158 @@
package it.valueteam.gnp.controller;
import it.valueteam.crontab.processexecutor.ProcessIF;
import it.valueteam.gnp.dao.db.hb.*;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.manager.RequestManagerCSNPg103;
import it.valueteam.gnp.manager.RequestManagerDonNatOlo103;
import it.valueteam.gnp.obj.*;
import it.valueteam.gnp.systemcontroller.ControllerFactory;
import it.valueteam.gnp.systemcontroller.crm.SistemaCrmIF;
import it.valueteam.gnp.utility.Resources;
import it.valueteam.gnp.utility.UserTransactionUtility;
import javax.transaction.UserTransaction;
import java.util.ArrayList;
import java.util.List;
public class RequestControllerCsNpg103 implements Loggable, ProcessIF {
protected ProcessLogger log;
protected String codiceProcesso = "ZX";
protected final static String versione = "1.0.0";
protected final static String PARAM_TIPO_COMM_5 = "TC5";
public RequestControllerCsNpg103() throws Exception{
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
} catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
@Override
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerRec.versione);
if ((args==null) || (args.length==0))
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
else {
if (args[0].equalsIgnoreCase(PARAM_TIPO_COMM_5)) {
checkTipoComm5inKO();
}
else {
log.write("9999 "," Parametro non riconosciuto: " + args[0]);
throw new UnsupportedOperationException("Parametro di esecuzione non riconosciuto ");
}
}
//0002 N - PROCESSO TERMINATO CORRETTAMENTE
log.write("0002","");
}
catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : "+ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
public boolean requiredTX() {
return false;
}
// 152248 - 227248
/**
* checkTipoComm5 in KO
* Effettua il controllo se ci sono KO in data odierna per
* tutte le richieste legate ad IdCorrelazione andato in KO
* e scarta tutte le richieste del medesimo pacchetto
* (con stesso IdCorrelazione)
*/
private void checkTipoComm5inKO() throws Exception {
UserTransaction uTX = null;
GnpRichiesteCsNpg103DAO daoD103 = new GnpRichiesteCsNpg103DAO();
GnpFenpRichiesteOutDAO daoFenpOut = new GnpFenpRichiesteOutDAO();
List richiesteinKOoggi = daoFenpOut.getRichiesteInKoOggi();
List<GnpFenpRichiesteOut> distinctValues = new ArrayList<GnpFenpRichiesteOut>();
GnpRichiesteCsNpg103 richiestaCs = null;
if (richiesteinKOoggi!= null && !richiesteinKOoggi.isEmpty()) {
for (Object o : richiesteinKOoggi) {
GnpFenpRichiesteOut rich = (GnpFenpRichiesteOut) o;
if (!duplicatedElement(distinctValues, rich)) {
distinctValues.add(rich);
}
}
if (!distinctValues.isEmpty()) {
log.write("9999", "ID_CORRELAZIONE IN ERRORE OGGI:" + distinctValues.size());
for (GnpFenpRichiesteOut rich : distinctValues) {
try {
String idCorrelazione = rich.getIdCorrelazione();
log.write("9999", "ID_CORRELAZIONE IN ERRORE OGGI:" + idCorrelazione);
List richiesteDaScartare = daoD103.getRichiesteInOKOggi(idCorrelazione);
if (richiesteDaScartare != null && !richiesteDaScartare.isEmpty()) {
for (Object o : richiesteDaScartare) {
richiestaCs = (GnpRichiesteCsNpg103) o;
//ogni singola richiesta e' inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
if (richiestaCs.getProcesso().equals(ProcessMapper.proc_CS_NPg103)) {
RequestManagerCSNPg103.avanzaStatoInRifiutata(richiestaCs, log, ApplicationCostants.PROCESSO_DONOR.FENP_OUT_COM5.COD_MOTIVO_28);
} else {
RequestManagerDonNatOlo103.avanzaStatoInRifiutata(richiestaCs, log, ApplicationCostants.PROCESSO_DONOR.FENP_OUT_COM5.COD_MOTIVO_28);
}
SistemaCrmIF crmController = ControllerFactory.getSistemaCrmFromPiattaformaProvenienza(CRMMap.PIATTAFORMA_B);
crmController.notificaCRM(richiestaCs, new GnpFenpRichiesteIn(), CRMMap.NOTIFICA_ANNULLAMENTO);
UserTransactionUtility.endUserTransaction(uTX, true);
}
}
} catch (Exception ex) {
ex.printStackTrace();
//rollback della tx corrente
if(uTX != null) {
UserTransactionUtility.endUserTransaction(uTX, false);
}
if(richiestaCs != null) {
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: "
+ richiestaCs.getIdRichiesta() + " - " + ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA " + richiestaCs.getIdRichiesta());
}
}
}
}
}
}
private boolean duplicatedElement(List<GnpFenpRichiesteOut> distinctValues, GnpFenpRichiesteOut rich) {
for(GnpFenpRichiesteOut d : distinctValues) {
if(rich.getIdCorrelazione().equals(d.getIdCorrelazione()) && rich.getIdRichiesta().equals(d.getIdRichiesta())) {
return true;
}
}
return false;
}
}

View File

@@ -0,0 +1,160 @@
package it.valueteam.gnp.controller;
import java.util.Date;
import java.util.List;
import javax.naming.NamingException;
import javax.transaction.UserTransaction;
import it.valueteam.crontab.processexecutor.*;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteDonNatOlo;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteDonNatOloDAO;
import it.valueteam.gnp.dao.db.hb.GnpScartiVerificaCs;
import it.valueteam.gnp.dao.db.hb.GnpScartiVerificaCsDAO;
import it.valueteam.gnp.log.*;
import it.valueteam.gnp.manager.RequestManagerDonNatOlo;
import it.valueteam.gnp.obj.*;
import it.valueteam.gnp.utility.*;
/**
* <p>Title: RequestControllerDonNatOlo</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2011</p>
* <p>Company: NCI</p>
* @author B.C.
* @version 1.0
*/
public class RequestControllerDonNatOlo implements Loggable, ProcessIF {
protected ProcessLogger log;
protected String codiceProcesso = "ZH";
protected final static String versione = "1.0.0";
protected final static String PARAM_DATA_SILENZIO_ASSENSO = "s";
public static final Long ESITO_VERIFICA_CS=new Long(3);
public static final String ESITO_VERIFICA_CS_KO="VERIFICA_CODICE_SEGRETO_SILENZIO ASSENSO_CRM";
public RequestControllerDonNatOlo() throws Exception {
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
}
catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
/**
* requiredTX
*
* @return boolean
*/
public boolean requiredTX() {
return false;
}
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerRec.versione);
if ((args==null) || (args.length==0))
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
else {
if (args[0].equalsIgnoreCase(RequestControllerDonNatOlo.PARAM_DATA_SILENZIO_ASSENSO)) {
checkSilenzioAssenso();
}
else {
log.write("9999 "," Paramentro non riconosciuto: " + args[0]);
throw new UnsupportedOperationException("Parametro di esecuzione non riconosciuto ");
}
}
//0002 N - PROCESSO TERMINATO CORRETTAMENTE
log.write("0002","");
}
catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : "+ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
/**
* checkSilenzioAssenso
* Effettua il controllo se data silenzio assenso è uguale alla data odierna per
* tutte le richieste in stato ATTESAVERIFICA o ACQUISITA
* ed esegue l'avanzamento di stato in ESPLETATA
*
*/
private void checkSilenzioAssenso() throws NamingException, Exception {
UserTransaction uTX = null;
GnpRichiesteDonNatOloDAO donNatOloDAO = new GnpRichiesteDonNatOloDAO();
List silenzioAssenso = donNatOloDAO.getRichiesteSilenzioAssenso();
if (silenzioAssenso!= null && silenzioAssenso.size()!= 0){
log.write("9999","RICHIESTE DONOR NATIVI OLO DA ELABORARE PER SILENZIO ASSENSO:"+silenzioAssenso.size());
for (int i = 0; i < silenzioAssenso.size(); i++) {
GnpRichiesteDonNatOlo rich = null;
try {
rich = (GnpRichiesteDonNatOlo) silenzioAssenso.get(i);
//ogni singola richiesta è inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
RequestManagerDonNatOlo.avanzaStatoInEspletata(rich,log);
buildScartiVerificaCsDonorNatOlo(rich,ESITO_VERIFICA_CS_KO,"TIMEOUT CRM",log);
UserTransactionUtility.endUserTransaction(uTX, true);
}
catch (Exception ex) {
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + rich.getIdRichiesta()+" - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+rich.getIdRichiesta()+" - "+ex.toString());
}
}
}
else
log.write("9999","NESSUNA RICHIESTA DONOR DA ELABORARE");
}
private static void buildScartiVerificaCsDonorNatOlo(GnpRichiesteDonNatOlo richiesta,String tipoAnomalia,String descrizioneAnomalia,ProcessLogger log) {
log.write("9999","START buildScartiVerificaCs DN: " + richiesta.getDn()+"Idrichiesta: "+richiesta.getIdRichiesta());
GnpScartiVerificaCsDAO scartiVerificaCsDao=new GnpScartiVerificaCsDAO();
GnpScartiVerificaCs scartiVerificaCs=new GnpScartiVerificaCs();
scartiVerificaCs.setIdRichiesta(richiesta.getIdRichiesta());
scartiVerificaCs.setDn(richiesta.getDn());
scartiVerificaCs.setTipoAnomalia(tipoAnomalia);
scartiVerificaCs.setDescrizioneAnomalia(descrizioneAnomalia);
scartiVerificaCs.setTipoComunicazione(ESITO_VERIFICA_CS);
scartiVerificaCs.setCodiceSegreto(richiesta.getCodiceSegreto());
scartiVerificaCs.setDataInserimento(new Date());
scartiVerificaCsDao.merge(scartiVerificaCs);
log.write("9999","END buildScartiVerificaCs DN: " + richiesta.getDn()+"Idrichiesta: "+richiesta.getIdRichiesta());
}
}

View File

@@ -0,0 +1,226 @@
package it.valueteam.gnp.controller;
import java.util.*;
import javax.transaction.*;
import javax.naming.*;
import it.valueteam.crontab.processexecutor.*;
import it.valueteam.gnp.log.*;
import it.valueteam.gnp.obj.*;
import it.valueteam.gnp.utility.*;
import it.valueteam.gnp.dao.db.hb.*;
import it.valueteam.gnp.manager.*;
/**
* <p>Title: RequestControllerDonor</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2009</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
*/
public class RequestControllerDonor implements Loggable, ProcessIF {
protected ProcessLogger log;
protected String codiceProcesso = "CB";
protected final static String versione = "1.0.0";
private final static String PARAM_CHECK_FINE_WAIT_OLO = "f";
private final static String PARAM_CHECK_CHIUSURA_RICHIESTA_MIGRAZIONE = "m";
public RequestControllerDonor() throws Exception {
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
}
catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
/**
* requiredTX
*
* @return boolean
*/
public boolean requiredTX() {
return false;
}
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerDonor.versione);
if ((args==null) || (args.length==0))
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
else {
if (args[0].equalsIgnoreCase(RequestControllerDonor.PARAM_CHECK_FINE_WAIT_OLO)) {
checkFineWaitOlo();
} else if (args[0].equalsIgnoreCase(RequestControllerDonor.PARAM_CHECK_CHIUSURA_RICHIESTA_MIGRAZIONE)){
checkChiusuraRichiestaMigrazione();
checkChiusuraRichiestaMigrazione82();
}
else {
log.write("9999 "," Paramentro non riconosciuto: " + args[0]);
throw new UnsupportedOperationException("Parametro di esecuzione non riconosciuto ");
}
}
//0002 N - PROCESSO TERMINATO CORRETTAMENTE
log.write("0002","");
}
catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : "+ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
/**
* CeckFineDataWaitOLO
* Effettua il controllo se waitOLO è uguale alla data odierna per
* tutte le rcihieste in stato INVIATA e VALIDATAOLO
* ed esegue l'avanzamento di stato
*
*/
private void checkFineWaitOlo() throws NamingException, Exception {
UserTransaction uTX = null;
GnpRichiesteDonorDAO daoRichDonor = new GnpRichiesteDonorDAO();
List fineWaitOlo = daoRichDonor.getRichiesteFineWaitScaduto();
if (fineWaitOlo!= null && fineWaitOlo.size()!= 0){
log.write("9999","RICHIESTE DONOR FINE WAIT SCADUTO DA ELABORARE:"+fineWaitOlo.size());
for (int i = 0; i < fineWaitOlo.size(); i++) {
GnpRichiesteDonor gnpRichiesteDonor = null;
try {
gnpRichiesteDonor = (GnpRichiesteDonor) fineWaitOlo.get(i);
//ogni singola richiesta è inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
RequestManagerDonor.avanzaStatoInAccettata(gnpRichiesteDonor,log);
//TUTTE LE RICHIESTE PROCESSATE PER SILENZIO ASSENSO VENGONO NOTIFICATE COME EVENTO ANOMALO C6 DI-MARIA
buildScartiVerificaCs(gnpRichiesteDonor,"RICHIESTA ELABORATA PER FINE WAIT","Richiesta processata per silenzio assenso",log);
UserTransactionUtility.endUserTransaction(uTX, true);
}
catch (Exception ex) {
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + gnpRichiesteDonor.getIdRichiesta()+" - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+gnpRichiesteDonor.getIdRichiesta());
}
}
}
else
log.write("9999","NESSUNA RICHIESTA DONOR DA ELABORARE");
}
private static void buildScartiVerificaCs(GnpRichiesteDonor richiestaDon,String tipoAnomalia,String descrizioneAnomalia,ProcessLogger log) {
log.write("9999","START buildScartiVerificaCs DN: " + richiestaDon.getDn()+"Idrichiesta: "+richiestaDon.getIdRichiesta());
GnpScartiVerificaCsDAO scartiVerificaCsDao=new GnpScartiVerificaCsDAO();
GnpScartiVerificaCs scartiVerificaCs=new GnpScartiVerificaCs();
scartiVerificaCs.setIdRichiesta(richiestaDon.getIdRichiesta());
scartiVerificaCs.setDn(richiestaDon.getDn());
scartiVerificaCs.setTipoAnomalia(tipoAnomalia);
scartiVerificaCs.setDescrizioneAnomalia(descrizioneAnomalia);
scartiVerificaCs.setCodiceSegreto(richiestaDon.getCowDonating());
scartiVerificaCs.setDataInserimento(new Date());
scartiVerificaCsDao.merge(scartiVerificaCs);
log.write("9999","END buildScartiVerificaCs DN: " + richiestaDon.getDn()+"Idrichiesta: "+richiestaDon.getIdRichiesta());
}
/**
* CheckChiusuraRichiestaMigrazione
* Esegue il passaggio di stato di tutte le richieste
* con stato attivo e data_scadenza precedente alla
* data odierna
*/
private void checkChiusuraRichiestaMigrazione() throws NamingException, Exception {
UserTransaction uTX = null;
GnpRichiesteDonorDAO daoRichDonor = new GnpRichiesteDonorDAO();
List richiesteAttive = daoRichDonor.getRichiesteScaduteConStatoAttivo();
if (richiesteAttive!= null && richiesteAttive.size()!= 0){
log.write("9999","RICHIESTE ATTIVE SCADUTE :"+richiesteAttive.size());
for (int i = 0; i < richiesteAttive.size(); i++) {
GnpRichiesteDonor gnpRichiesteDonor = null;
try {
gnpRichiesteDonor = (GnpRichiesteDonor) richiesteAttive.get(i);
//ogni singola richiesta è inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
RequestManagerDonor.passaggioStatoScaduta(gnpRichiesteDonor,log);
UserTransactionUtility.endUserTransaction(uTX, true);
}
catch (Exception ex) {
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante la chiusura migrazione per la richiesta: " + gnpRichiesteDonor.getIdRichiesta()+ " - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+gnpRichiesteDonor.getIdRichiesta());
}
}
}
else
log.write("9999","NESSUNA RICHIESTA DONOR DA ELABORARE");
}
private void checkChiusuraRichiestaMigrazione82() throws NamingException, Exception {
UserTransaction uTX = null;
GnpRichiesteDonor82DAO daoRichDonor = new GnpRichiesteDonor82DAO();
List richiesteAttive = daoRichDonor.getRichiesteScaduteConStatoAttivo();
if (richiesteAttive!= null && richiesteAttive.size()!= 0){
log.write("9999","RICHIESTE ATTIVE SCADUTE :"+richiesteAttive.size());
for (int i = 0; i < richiesteAttive.size(); i++) {
GnpRichiesteDonor82 gnpRichiesteDonor = null;
try {
gnpRichiesteDonor = (GnpRichiesteDonor82) richiesteAttive.get(i);
//ogni singola richiesta è inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
RequestManagerDonor82.passaggioStatoScaduta(gnpRichiesteDonor,log);
UserTransactionUtility.endUserTransaction(uTX, true);
}
catch (Exception ex) {
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante la chiusura migrazione per la richiesta: " + gnpRichiesteDonor.getIdRichiesta()+ " - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+gnpRichiesteDonor.getIdRichiesta());
}
}
}
else
log.write("9999","NESSUNA RICHIESTA DONOR DA ELABORARE");
}
}

View File

@@ -0,0 +1,86 @@
package it.valueteam.gnp.controller;
import it.valueteam.crontab.processexecutor.ProcessIF;
import it.valueteam.gnp.dao.db.hb.*;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.manager.RequestManagerCSNPg103;
import it.valueteam.gnp.manager.RequestManagerDonNatOlo103;
import it.valueteam.gnp.manager.RequestManagerNPg103;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.obj.ProcessMapper;
import it.valueteam.gnp.utility.Resources;
import it.valueteam.gnp.utility.UserTransactionUtility;
import javax.naming.NamingException;
import javax.transaction.UserTransaction;
import java.util.Date;
import java.util.List;
public class RequestControllerNngDon implements Loggable, ProcessIF {
protected ProcessLogger log;
protected String codiceProcesso = "ZF";
protected final static String versione = "1.0.0";
protected final static String PARAM_DATA_SILENZIO_ASSENSO = "s";
protected final static String PARAM_DATA_SILENZIO_ASSENSO_CS = "sCS";
public RequestControllerNngDon() throws Exception{
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
} catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
@Override
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerRec.versione);
if ((args==null) || (args.length==0))
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
else {
if (args[0].equalsIgnoreCase(PARAM_DATA_SILENZIO_ASSENSO)) {
} else if (args[0].equalsIgnoreCase(PARAM_DATA_SILENZIO_ASSENSO_CS)) {
} else {
log.write("9999 "," Parametro non riconosciuto: " + args[0]);
throw new UnsupportedOperationException("Parametro di esecuzione non riconosciuto ");
}
}
//0002 N - PROCESSO TERMINATO CORRETTAMENTE
log.write("0002","");
}
catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : "+ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
public boolean requiredTX() {
return false;
}
}

View File

@@ -0,0 +1,75 @@
package it.valueteam.gnp.controller;
import it.valueteam.crontab.processexecutor.ProcessIF;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.utility.Resources;
public class RequestControllerNngRec implements Loggable, ProcessIF {
protected ProcessLogger log;
protected String codiceProcesso = "ZF";
protected final static String versione = "1.0.0";
protected final static String PARAM_DATA_SILENZIO_ASSENSO = "s";
protected final static String PARAM_DATA_SILENZIO_ASSENSO_CS = "sCS";
public RequestControllerNngRec() throws Exception{
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
} catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
@Override
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerRec.versione);
if ((args==null) || (args.length==0))
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
else {
if (args[0].equalsIgnoreCase(PARAM_DATA_SILENZIO_ASSENSO)) {
} else if (args[0].equalsIgnoreCase(PARAM_DATA_SILENZIO_ASSENSO_CS)) {
} else {
log.write("9999 "," Parametro non riconosciuto: " + args[0]);
throw new UnsupportedOperationException("Parametro di esecuzione non riconosciuto ");
}
}
//0002 N - PROCESSO TERMINATO CORRETTAMENTE
log.write("0002","");
}
catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : "+ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
public boolean requiredTX() {
return false;
}
}

View File

@@ -0,0 +1,183 @@
package it.valueteam.gnp.controller;
import it.valueteam.crontab.processexecutor.ProcessIF;
import it.valueteam.gnp.dao.db.hb.*;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.manager.*;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.obj.ProcessMapper;
import it.valueteam.gnp.utility.Resources;
import it.valueteam.gnp.utility.UserTransactionUtility;
import javax.naming.NamingException;
import javax.transaction.UserTransaction;
import java.util.Date;
import java.util.List;
public class RequestControllerNpg103 implements Loggable, ProcessIF {
protected ProcessLogger log;
protected String codiceProcesso = "ZF";
protected final static String versione = "1.0.0";
protected final static String PARAM_DATA_SILENZIO_ASSENSO = "s";
protected final static String PARAM_DATA_SILENZIO_ASSENSO_CS = "sCS";
public static final String ESITO_SILENZIO_ASSENSO_VERIFICA_CS="ESITO VERIFICA CS";
public RequestControllerNpg103() throws Exception{
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
} catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
@Override
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerRec.versione);
if ((args==null) || (args.length==0))
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
else {
if (args[0].equalsIgnoreCase(PARAM_DATA_SILENZIO_ASSENSO)) {
checkSilenzioAssenso();
} else if (args[0].equalsIgnoreCase(PARAM_DATA_SILENZIO_ASSENSO_CS)) {
checkSilenzioAssensoCsNpg103();
} else {
log.write("9999 "," Parametro non riconosciuto: " + args[0]);
throw new UnsupportedOperationException("Parametro di esecuzione non riconosciuto ");
}
}
//0002 N - PROCESSO TERMINATO CORRETTAMENTE
log.write("0002","");
}
catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : "+ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
public boolean requiredTX() {
return false;
}
// 152248 checkSilenzioAssenso completata!
/**
* checkSilenzioAssenso
* Effettua il controllo se data silenzio assenso e' uguale alla data odierna per
* tutte le rcihieste in stato INVIATA_FENP e VERIFICATA_FENP
* ed esegue l'avanzamento di stato in ACCETTATA
*
*/
private void checkSilenzioAssenso() throws NamingException, Exception {
UserTransaction uTX = null;
GnpRichiesteNpg103DAO daoD103 = new GnpRichiesteNpg103DAO();
List silenzioAssenso = daoD103.getRichiesteSilenzioAssenso();
if (silenzioAssenso!= null && !silenzioAssenso.isEmpty()) {
log.write("9999", "RICHIESTE D103 DA ELABORARE PER SILENZIO ASSENSO:" + silenzioAssenso.size());
for (int i = 0; i < silenzioAssenso.size(); i++) {
GnpRichiesteNpg103 richD103 = null;
try {
richD103 = (GnpRichiesteNpg103) silenzioAssenso.get(i);
//ogni singola richiesta e' inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
RequestManagerNPg103.avanzaStatoInAccettata(new Date(),richD103,log);
UserTransactionUtility.endUserTransaction(uTX, true);
} catch (Exception ex) {
ex.printStackTrace();
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + richD103.getIdRichiesta()+" - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+richD103.getIdRichiesta());
}
}
}
}
//152248 - 227248 ma serve?
private void checkSilenzioAssensoCsNpg103() throws Exception {
UserTransaction uTX = null;
GnpRichiesteCsNpg103DAO daoCsNpg103 = new GnpRichiesteCsNpg103DAO();
List silenzioAssenso = daoCsNpg103.getRichiesteSilenzioAssenso();
if (silenzioAssenso!= null && !silenzioAssenso.isEmpty()){
log.write("9999","RICHIESTE CS-NPg103 DA ELABORARE PER SILENZIO ASSENSO:"+silenzioAssenso.size());
for (int i = 0; i < silenzioAssenso.size(); i++) {
GnpRichiesteCsNpg103 richCsNpg103 = null;
try {
richCsNpg103 = (GnpRichiesteCsNpg103) silenzioAssenso.get(i);
//ogni singola richiesta e' inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
if (richCsNpg103.getProcesso().equals(ProcessMapper.proc_CS_NPg103)){
RequestManagerCSNPg103.avanzaStatoInEspletata(richCsNpg103, log);
} else {
RequestManagerDonNatOlo103.avanzaStatoInEspletata(richCsNpg103, log);
}
buildScartiVerificaCsNpg103(richCsNpg103,ESITO_SILENZIO_ASSENSO_VERIFICA_CS,"TIMEOUT DI RISPOSTA VERIFICA CS",log);
UserTransactionUtility.endUserTransaction(uTX, true);
}
catch (Exception ex) {
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + richCsNpg103.getIdRichiesta()+" - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+richCsNpg103.getIdRichiesta());
}
}
}
else
log.write("9999","NESSUNA RICHIESTA DONOR DA ELABORARE");
}
private static void buildScartiVerificaCsNpg103(GnpRichiesteCsNpg103 richiestaCs,String tipoAnomalia,String descrizioneAnomalia,ProcessLogger log) {
log.write("9999","START buildScartiVerificaCs DN: " + richiestaCs.getDn()+"Idrichiesta: "+richiestaCs.getIdRichiesta());
GnpScartiVerificaCsDAO scartiVerificaCsDao=new GnpScartiVerificaCsDAO();
GnpScartiVerificaCs scartiVerificaCs=new GnpScartiVerificaCs();
scartiVerificaCs.setIdRichiesta(richiestaCs.getIdRichiesta());
scartiVerificaCs.setDn(richiestaCs.getDn());
scartiVerificaCs.setTipoAnomalia(tipoAnomalia);
scartiVerificaCs.setDescrizioneAnomalia(descrizioneAnomalia);
scartiVerificaCs.setCodiceSegreto(richiestaCs.getCodiceSegreto());
scartiVerificaCs.setDataInserimento(new Date());
scartiVerificaCsDao.merge(scartiVerificaCs);
log.write("9999","END buildScartiVerificaCs DN: " + richiestaCs.getDn()+"Idrichiesta: "+richiestaCs.getIdRichiesta());
}
}

View File

@@ -0,0 +1,220 @@
package it.valueteam.gnp.controller;
import java.util.Date;
import java.util.List;
import javax.naming.NamingException;
import javax.transaction.UserTransaction;
import it.valueteam.crontab.processexecutor.*;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteCsNpg35;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteCsNpg35DAO;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteNpg35;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteNpg35DAO;
import it.valueteam.gnp.dao.db.hb.GnpScartiVerificaCs;
import it.valueteam.gnp.dao.db.hb.GnpScartiVerificaCsDAO;
import it.valueteam.gnp.log.*;
import it.valueteam.gnp.manager.RequestManagerCSNPg35;
import it.valueteam.gnp.manager.RequestManagerNPg35;
import it.valueteam.gnp.obj.*;
import it.valueteam.gnp.utility.*;
/**
* <p>Title: RequestControllerRec</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
*/
public class RequestControllerNpg35 implements Loggable, ProcessIF {
protected ProcessLogger log;
protected String codiceProcesso = "ZD";
protected final static String versione = "1.0.0";
protected final static String PARAM_DATA_SILENZIO_ASSENSO = "s";
protected final static String PARAM_DATA_SILENZIO_ASSENSO_CS = "sCS";
public static final String ESITO_SILENSIO_ASSENSO_VERIFICA_CS="ESITO VERIFICA CS";
public RequestControllerNpg35() throws Exception {
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
}
catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
/**
* requiredTX
*
* @return boolean
*/
public boolean requiredTX() {
return false;
}
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerRec.versione);
if ((args==null) || (args.length==0))
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
else {
if (args[0].equalsIgnoreCase(RequestControllerNpg35.PARAM_DATA_SILENZIO_ASSENSO)) {
checkSilenzioAssenso();
}
else if (args[0].equalsIgnoreCase(RequestControllerNpg35.PARAM_DATA_SILENZIO_ASSENSO_CS)) {
checkSilenzioAssensoCsNpg35();
}
else {
log.write("9999 "," Paramentro non riconosciuto: " + args[0]);
throw new UnsupportedOperationException("Parametro di esecuzione non riconosciuto ");
}
}
//0002 N - PROCESSO TERMINATO CORRETTAMENTE
log.write("0002","");
}
catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : "+ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
/**
* checkSilenzioAssenso
* Effettua il controllo se data silenzio assenso e' uguale alla data odierna per
* tutte le rcihieste in stato INVIATA_FENP e VERIFICATA_FENP
* ed esegue l'avanzamento di stato in ACCETTATA
*
*/
private void checkSilenzioAssensoCsNpg35() throws NamingException, Exception {
UserTransaction uTX = null;
GnpRichiesteCsNpg35DAO daoCsNpg35 = new GnpRichiesteCsNpg35DAO();
String timeout=Resources.getTIMEOUT_SILENZIO_ASSENSO_NPG35();
//Analisi Doppia Fatturazione - Cluster A08A09 (MDC) verifica codice segreto piattaforma errata Portabilite'  Del.35 - aperta segnalazione DBCFX_SM_478.
//Passaggio parametro di timeout
List silenzioAssenso = daoCsNpg35.getRichiesteSilenzioAssenso(timeout);
if (silenzioAssenso!= null && silenzioAssenso.size()!= 0){
log.write("9999","RICHIESTE CS-NPg35 DA ELABORARE PER SILENZIO ASSENSO:"+silenzioAssenso.size());
for (int i = 0; i < silenzioAssenso.size(); i++) {
GnpRichiesteCsNpg35 richCsNpg35 = null;
try {
richCsNpg35 = (GnpRichiesteCsNpg35) silenzioAssenso.get(i);
//ogni singola richiesta e' inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
/*
* PROBLEMA DOPPIA COMMERCIALIZZAZIONE
* non passare la richiesta in espletata,ma effettuare un ulteriore verifica con questa logica:
* Se ho già invocato entrambi i CRM, riprovo su quello che non mi ha risposto
* Se è ancora il primo, passo al secondo
*
*
*/
RequestManagerCSNPg35.avanzaStatoInEspletata(richCsNpg35, log);
buildScartiVerificaCsNpg35(richCsNpg35,ESITO_SILENSIO_ASSENSO_VERIFICA_CS,"TIMEOUT DI RISPOSTA VERIFICA CS",log);
UserTransactionUtility.endUserTransaction(uTX, true);
}
catch (Exception ex) {
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + richCsNpg35.getIdRichiesta()+" - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+richCsNpg35.getIdRichiesta());
}
}
}
else
log.write("9999","NESSUNA RICHIESTA DONOR DA ELABORARE");
}
private static void buildScartiVerificaCsNpg35(GnpRichiesteCsNpg35 richiestaCs,String tipoAnomalia,String descrizioneAnomalia,ProcessLogger log) {
log.write("9999","START buildScartiVerificaCs DN: " + richiestaCs.getDn()+"Idrichiesta: "+richiestaCs.getIdRichiesta());
GnpScartiVerificaCsDAO scartiVerificaCsDao=new GnpScartiVerificaCsDAO();
GnpScartiVerificaCs scartiVerificaCs=new GnpScartiVerificaCs();
scartiVerificaCs.setIdRichiesta(richiestaCs.getIdRichiesta());
scartiVerificaCs.setDn(richiestaCs.getDn());
scartiVerificaCs.setTipoAnomalia(tipoAnomalia);
scartiVerificaCs.setDescrizioneAnomalia(descrizioneAnomalia);
scartiVerificaCs.setCodiceSegreto(richiestaCs.getCodiceSegreto());
scartiVerificaCs.setDataInserimento(new Date());
scartiVerificaCsDao.merge(scartiVerificaCs);
log.write("9999","END buildScartiVerificaCs DN: " + richiestaCs.getDn()+"Idrichiesta: "+richiestaCs.getIdRichiesta());
}
/**
* checkSilenzioAssenso
* Effettua il controllo se data silenzio assenso e' uguale alla data odierna per
* tutte le rcihieste in stato INVIATA_FENP e VERIFICATA_FENP
* ed esegue l'avanzamento di stato in ACCETTATA
*
*/
private void checkSilenzioAssenso() throws NamingException, Exception {
UserTransaction uTX = null;
GnpRichiesteNpg35DAO daoNpg35 = new GnpRichiesteNpg35DAO();
List silenzioAssenso = daoNpg35.getRichiesteSilenzioAssenso();
log.write("9999", "Inizia check silenzio assenso");
if (silenzioAssenso!= null && silenzioAssenso.size()!= 0){
log.write("9999","RICHIESTE NPg35 DA ELABORARE PER SILENZIO ASSENSO:"+silenzioAssenso.size());
for (int i = 0; i < silenzioAssenso.size(); i++) {
GnpRichiesteNpg35 richNpg35 = null;
try {
richNpg35 = (GnpRichiesteNpg35) silenzioAssenso.get(i);
//ogni singola richiesta e' inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
RequestManagerNPg35.avanzaStatoInAccettata(new Date(),richNpg35,log);
UserTransactionUtility.endUserTransaction(uTX, true);
}
catch (Exception ex) {
ex.printStackTrace();
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + richNpg35.getIdRichiesta()+" - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+richNpg35.getIdRichiesta());
}
}
}
else
log.write("9999","NESSUNA RICHIESTA DONOR DA ELABORARE");
}
}

View File

@@ -0,0 +1,112 @@
package it.valueteam.gnp.controller;
import it.valueteam.crontab.processexecutor.ProcessIF;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteOlo103mn;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteOlo103mnDAO;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.manager.RequestManagerOlo103MN;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.utility.Resources;
import it.valueteam.gnp.utility.UserTransactionUtility;
import javax.naming.NamingException;
import javax.transaction.UserTransaction;
import java.util.List;
public class RequestControllerOlo103MN implements Loggable, ProcessIF {
protected ProcessLogger log;
protected String codiceProcesso = "ZG";
protected final static String versione = "1.0.0";
protected final static String PARAM_DATA_SILENZIO_ASSENSO = "s";
public RequestControllerOlo103MN() throws Exception {
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
}
catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
/**
* requiredTX
*
* @return boolean
*/
public boolean requiredTX() {
return false;
}
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerRec.versione);
if ((args==null) || (args.length==0)){
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
}
else {
if (args[0].equalsIgnoreCase(RequestControllerNpg103.PARAM_DATA_SILENZIO_ASSENSO)) {
checkSilenzioAssenso();
}
}
} catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : "+ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
/**
* checkSilenzioAssenso
* Effettua il controllo se data silenzio assenso è uguale alla data odierna per
* tutte le rcihieste in stato INVIATA_FENP e VERIFICATA_FENP
* ed esegue l'avanzamento di stato in ACCETTATA
*
*/
private void checkSilenzioAssenso() throws NamingException, Exception {
UserTransaction uTX = null;
GnpRichiesteOlo103mnDAO olo103Dao=new GnpRichiesteOlo103mnDAO();
List silenzioAssenso = olo103Dao.getRichiesteSilenzioAssenso();
for (int i = 0; i < silenzioAssenso.size(); i++) {
if (silenzioAssenso!= null && silenzioAssenso.size()!= 0){
log.write("9999","RICHIESTE OLONPg103MN DA ELABORARE PER SILENZIO ASSENSO:"+silenzioAssenso.size());
GnpRichiesteOlo103mn olo103Mn = null;
try {
olo103Mn = (GnpRichiesteOlo103mn) silenzioAssenso.get(i);
//ogni singola richiesta è inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
RequestManagerOlo103MN.avanzaStatoInAccettata(olo103Mn,log);
UserTransactionUtility.endUserTransaction(uTX, true);
}
catch (Exception ex) {
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + olo103Mn.getIdRichiesta()+" - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+olo103Mn.getIdRichiesta());
}
}
}
}
}

View File

@@ -0,0 +1,115 @@
package it.valueteam.gnp.controller;
import java.util.List;
import javax.naming.NamingException;
import javax.transaction.UserTransaction;
import it.valueteam.crontab.processexecutor.ProcessIF;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteNpg35;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteOlo35mn;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteOlo35mnDAO;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.manager.RequestManagerNPg35;
import it.valueteam.gnp.manager.RequestManagerOlo35MN;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.utility.Resources;
import it.valueteam.gnp.utility.UserTransactionUtility;
public class RequestControllerOlo35MN implements Loggable, ProcessIF {
protected ProcessLogger log;
protected String codiceProcesso = "ZM";
protected final static String versione = "1.0.0";
protected final static String PARAM_DATA_SILENZIO_ASSENSO = "s";
public RequestControllerOlo35MN() throws Exception {
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
}
catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
/**
* requiredTX
*
* @return boolean
*/
public boolean requiredTX() {
return false;
}
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerRec.versione);
if ((args==null) || (args.length==0)){
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
}
else {
if (args[0].equalsIgnoreCase(RequestControllerNpg35.PARAM_DATA_SILENZIO_ASSENSO)) {
checkSilenzioAssenso();
}
}
} catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : "+ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
/**
* checkSilenzioAssenso
* Effettua il controllo se data silenzio assenso è uguale alla data odierna per
* tutte le rcihieste in stato INVIATA_FENP e VERIFICATA_FENP
* ed esegue l'avanzamento di stato in ACCETTATA
*
*/
private void checkSilenzioAssenso() throws NamingException, Exception {
UserTransaction uTX = null;
GnpRichiesteOlo35mnDAO olo35Dao=new GnpRichiesteOlo35mnDAO();
List silenzioAssenso = olo35Dao.getRichiesteSilenzioAssenso();
for (int i = 0; i < silenzioAssenso.size(); i++) {
if (silenzioAssenso!= null && silenzioAssenso.size()!= 0){
log.write("9999","RICHIESTE OLONPg35MN DA ELABORARE PER SILENZIO ASSENSO:"+silenzioAssenso.size());
GnpRichiesteOlo35mn olo35Mn = null;
try {
olo35Mn = (GnpRichiesteOlo35mn) silenzioAssenso.get(i);
//ogni singola richiesta è inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
RequestManagerOlo35MN.avanzaStatoInAccettata(olo35Mn,log);
UserTransactionUtility.endUserTransaction(uTX, true);
}
catch (Exception ex) {
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + olo35Mn.getIdRichiesta()+" - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+olo35Mn.getIdRichiesta());
}
}
}
}
}

View File

@@ -0,0 +1,218 @@
package it.valueteam.gnp.controller;
import java.util.*;
import javax.transaction.*;
import javax.naming.*;
import it.valueteam.crontab.processexecutor.*;
import it.valueteam.gnp.log.*;
import it.valueteam.gnp.obj.*;
import it.valueteam.gnp.utility.*;
import it.valueteam.gnp.dao.RichiestaRecipientLoader;
import it.valueteam.gnp.dao.db.hb.*;
import it.valueteam.gnp.exception.StateTransitionNotPossibleException;
import it.valueteam.gnp.manager.*;
/**
* <p>Title: RequestControllerRec</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: </p>
* @author unascribed
* @version 1.0
*/
public class RequestControllerRec implements Loggable, ProcessIF {
protected ProcessLogger log;
protected String codiceProcesso = "CA";
protected final static String versione = "1.0.0";
protected final static String PARAM_CHECK_DATA_WAIT_OLO = "c";
public RequestControllerRec() throws Exception {
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
}
catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
/**
* requiredTX
*
* @return boolean
*/
public boolean requiredTX() {
return false;
}
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerRec.versione);
if ((args==null) || (args.length==0))
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
else {
//ANALISI DFW
if (args[0].equalsIgnoreCase(RequestControllerRec.PARAM_CHECK_DATA_WAIT_OLO)) {
checkFineDataWaitOLOStandardRequest();
checkFineDataWaitOLOMultilineaRequest();
}
else {
log.write("9999 "," Paramentro non riconosciuto: " + args[0]);
throw new UnsupportedOperationException("Parametro di esecuzione non riconosciuto ");
}
}
//0002 N - PROCESSO TERMINATO CORRETTAMENTE
log.write("0002","");
}
catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : "+ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
/**
* CeckFineDataWaitOLO
* Effettua il controllo se waitOLO è uguale alla data odierna per
* tutte le rcihieste in stato INVIATA e VALIDATAOLO
* ed esegue l'avanzamento di stato
*
*/
private void checkFineDataWaitOLOStandardRequest() throws NamingException, Exception {
UserTransaction uTX = null;
List listaWaitOlo = RichiestaRecipientLoader.getRequestFineWaitOLOStandard();
if (listaWaitOlo!= null && listaWaitOlo.size()!= 0){
log.write("9999","RICHIESTE STANDARD DA ELABORARE:"+listaWaitOlo.size());
for (int i = 0; i < listaWaitOlo.size(); i++) {
GnpRichiesteRec gnpRichiesteRec = null;
try {
gnpRichiesteRec = (GnpRichiesteRec) listaWaitOlo.get(i);
//ogni singola richiesta è inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
//sfilo la richiesta dal pacchetto multilinea facendola diventare una richiesta standard
//perchè alla data di fine wait del pacchetto l'olo non ha ancora risposto con l'accettazione
//oppure perchè sono ancora in attesa reinvio
RequestManagerRec.avanzaStatoInValidating(gnpRichiesteRec, log);
UserTransactionUtility.endUserTransaction(uTX, true);
}catch(StateTransitionNotPossibleException stex){
UserTransactionUtility.endUserTransaction(uTX, false);
}
catch (Exception ex) {
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + gnpRichiesteRec.getIdRichiesta()+" - "+ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA "+gnpRichiesteRec.getIdRichiesta());
}
}
}
else
log.write("9999","NESSUNA RICHIESTA DA ELABORARE");
}
/**
* CaricaListaWaitOlo
*
* @return List
*/
private void aggiornaPacchettoMultilinea(String codiceCorrelazione) throws Exception{
List richieste=null;
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
List states = new ArrayList();
states.add(new Long(StatoRichiestaRec.ATTESAREINVIO));
states.add(new Long(StatoRichiestaRec.INVIATA));
richieste = RichiestaRecipientLoader.getRequestByCriteria(states, codiceCorrelazione, true);
for(int i=0; i<richieste.size(); i++){
GnpRichiesteRec rec = (GnpRichiesteRec)richieste.get(i);
rec.setPrjMlMs(new Long(0));
dao.merge(rec);
log.write("9999", "LA RICHIESTA ID_RICHIESTA: " +rec.getIdRichiesta()+" " +
"E' STATA SFILATA DAL PACCHETTO MULTILINEA CON CODICE CORRELAZIONE :" +rec.getCodCorrelazione());
}
}
private void checkFineDataWaitOLOMultilineaRequest() throws NamingException, Exception {
UserTransaction uTX = null;
Map waitOloMap = RichiestaRecipientLoader.getRequestFineWaitOLOMultilinea();
log.write("9999","PACCHETTI MULTILINEA DA ELABORARE :"+waitOloMap.size());
if (waitOloMap!= null && waitOloMap.size()> 0){
List multilineaRichiesteRec = null;
Set multilineaKeySet = waitOloMap.keySet();
Iterator iter = multilineaKeySet.iterator();
GnpMlineaMsede gnpMlineaMsedeDto = null;
while(iter.hasNext()) {
try{
uTX = UserTransactionUtility.beginUserTransaction();
gnpMlineaMsedeDto = (GnpMlineaMsede)iter.next();
log.write("9999", "ESEGUO L'AVANZAMENTO DI STATO IN VALIDATING PER LE RICHIESTE DEL PACCHETTO MULTILINEA : " +
"" + gnpMlineaMsedeDto.getIdCorrelazione());
multilineaRichiesteRec = (List)waitOloMap.get(gnpMlineaMsedeDto);
for(int i =0; i<multilineaRichiesteRec.size(); i++){
GnpRichiesteRec richiesteRec=(GnpRichiesteRec)multilineaRichiesteRec.get(i);
RequestManagerRec.avanzaStatoInValidating(richiesteRec, log);
}
//sfilo dal pacchetto multilinea le richieste che sono rimaste indietro
aggiornaPacchettoMultilinea(gnpMlineaMsedeDto.getIdCorrelazione());
UserTransactionUtility.endUserTransaction(uTX, true);
log.write("9999", "AVANZAMENTO DI STATO IN VALIDATING PER LE RICHIESTE DEL PACCHETTO MULTILINEA : " +
"" + gnpMlineaMsedeDto.getIdCorrelazione() + " ESEGUITO CON SUCCESSO");
}catch(StateTransitionNotPossibleException stex){
UserTransactionUtility.endUserTransaction(uTX, false);
log.write("9999", "AVANZAMENTO DI STATO IN VALIDATING PER LE RICHIESTE DEL PACCHETTO MULTILINEA : " +
"" + gnpMlineaMsedeDto.getIdCorrelazione() + " NON ESEGUITO !!");
}catch(Exception ex){
//rollback della tx corrente
UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "ERRORE DURANTE GLI AVANZAMENTI DI STATO DELLE RICHIESTE DEL PACHETTO MULTILINEA " +
": " + gnpMlineaMsedeDto.getIdCorrelazione()+ " - "
+ex.toString());
}
}
}else{
log.write("9999","NESSUN PACCHETTO MULTILINEA DA ELABORARE");
}
}
}

View File

@@ -0,0 +1,105 @@
package it.valueteam.gnp.controller;
import it.valueteam.crontab.processexecutor.ProcessIF;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteVoip103;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteVoip103DAO;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteVoip103;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.manager.RequestManagerVOIP103;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.utility.Resources;
import it.valueteam.gnp.utility.UserTransactionUtility;
import javax.transaction.UserTransaction;
import java.util.List;
public class RequestControllerVoip103 implements Loggable, ProcessIF {
protected final static String versione = "1.0.0";
protected final static String PARAM_DATA_SILENZIO_ASSENSO = "s";
protected ProcessLogger log;
protected String codiceProcesso = "ZS";
public RequestControllerVoip103() throws Exception {
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
} catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
@Override
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerVoip103.versione);
if ((args == null) || (args.length == 0)) {
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
} else {
if (args[0].equalsIgnoreCase(RequestControllerVoip103.PARAM_DATA_SILENZIO_ASSENSO)) {
checkSilenzioAssenso();
}
}
} catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : " + ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
/**
* checkSilenzioAssenso
* Effettua il controllo se data silenzio assenso e' uguale alla data odierna per
* tutte le richieste in stato INVIATA_FENP e VERIFICATA_FENP
* ed esegue l'avanzamento di stato in ACCETTATA
*/
private void checkSilenzioAssenso() throws Exception{
UserTransaction uTX = null;
GnpRichiesteVoip103DAO voip103Dao = new GnpRichiesteVoip103DAO();
List<GnpRichiesteVoip103> silenzioAssenso = voip103Dao.getRichiesteSilenzioAssenso();
for (GnpRichiesteVoip103 gnpRichiesteVoip103 : silenzioAssenso) {
log.write("9999", "RICHIESTE VOIP103 DA ELABORARE PER SILENZIO ASSENSO:" + silenzioAssenso.size());
try {
//ogni singola richiesta e' inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
// refresh object to current transaction
voip103Dao.getSession().update(gnpRichiesteVoip103);
RequestManagerVOIP103.avanzaStatoInAccettata(gnpRichiesteVoip103, log);
UserTransactionUtility.endUserTransaction(uTX, true);
} catch (Exception ex) {
//rollback della tx corrente
if (uTX != null) UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + gnpRichiesteVoip103.getIdRichiesta() + " - " + ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA " + gnpRichiesteVoip103.getIdRichiesta());
}
}
}
@Override
public boolean requiredTX() {
return false;
}
@Override
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
}

View File

@@ -0,0 +1,106 @@
package it.valueteam.gnp.controller;
import it.valueteam.crontab.processexecutor.ProcessIF;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteVoip35;
import it.valueteam.gnp.dao.db.hb.GnpRichiesteVoip35DAO;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.manager.RequestManagerVOIP35;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.utility.Resources;
import it.valueteam.gnp.utility.UserTransactionUtility;
import javax.transaction.UserTransaction;
import java.util.List;
public class RequestControllerVoip35 implements Loggable, ProcessIF {
protected final static String versione = "1.0.0";
protected final static String PARAM_DATA_SILENZIO_ASSENSO = "s";
protected ProcessLogger log;
protected String codiceProcesso = "ZP";
public RequestControllerVoip35() throws Exception {
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
} catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
public LogInfo getLogInfo() throws Exception {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
/**
* requiredTX
*
* @return boolean
*/
public boolean requiredTX() {
return false;
}
public void execute(String[] args) throws Exception {
try {
//0001 N - INIZIO PROCESSO
log.write("0001", " versione " + RequestControllerVoip35.versione);
if ((args == null) || (args.length == 0)) {
throw new UnsupportedOperationException("Introdurre parametro di esecuzione ");
} else {
if (args[0].equalsIgnoreCase(RequestControllerVoip35.PARAM_DATA_SILENZIO_ASSENSO)) {
checkSilenzioAssenso();
}
}
} catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
log.write("9999", "ECCEZIONE RILEVATA : " + ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
/**
* checkSilenzioAssenso
* Effettua il controllo se data silenzio assenso e' uguale alla data odierna per
* tutte le richieste in stato INVIATA_FENP e VERIFICATA_FENP
* ed esegue l'avanzamento di stato in ACCETTATA
*/
private void checkSilenzioAssenso() throws Exception {
UserTransaction uTX = null;
GnpRichiesteVoip35DAO voip35Dao = new GnpRichiesteVoip35DAO();
List<GnpRichiesteVoip35> silenzioAssenso = voip35Dao.getRichiesteSilenzioAssenso();
for (GnpRichiesteVoip35 gnpRichiesteVoip35 : silenzioAssenso) {
log.write("9999", "RICHIESTE VOIP35 DA ELABORARE PER SILENZIO ASSENSO:" + silenzioAssenso.size());
try {
//ogni singola richiesta e' inserita in tx
uTX = UserTransactionUtility.beginUserTransaction();
// refresh object to current transaction
voip35Dao.getSession().update(gnpRichiesteVoip35);
RequestManagerVOIP35.avanzaStatoInAccettata(gnpRichiesteVoip35, log);
UserTransactionUtility.endUserTransaction(uTX, true);
} catch (Exception ex) {
//rollback della tx corrente
if (uTX != null) UserTransactionUtility.endUserTransaction(uTX, false);
ex.printStackTrace();
log.write("9999", "Errore durante l'avanzamento di stato per la richiesta: " + gnpRichiesteVoip35.getIdRichiesta() + " - " + ex.toString());
//0010 C - ERRORE DURANTE L''ELABORAZIONE:
log.write("0010", " RICHIESTA " + gnpRichiesteVoip35.getIdRichiesta());
}
}
}
}

View File

@@ -0,0 +1,508 @@
/**
*
*/
package it.valueteam.gnp.dao;
import it.valueteam.gnp.dao.db.hb.*;
import it.valueteam.gnp.helper.MultiLineaHelper;
import it.valueteam.gnp.obj.ApplicationCostants;
import it.valueteam.gnp.obj.ProcessMapper;
import it.valueteam.gnp.obj.StatoRichiestaDoppioDonating;
import it.valueteam.gnp.obj.StatoRichiestaRec;
import it.valueteam.gnp.utility.DateUtils;
import it.valueteam.gnp.utility.Resources;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
/**
* Description: La classe consente di ricercare un insieme di richieste da
* DB secondo parametri definiti.
* @author pocciac
*
*/
public class RichiestaRecipientLoader {
private RichiestaRecipientLoader() {};
/**
* Ritorna la lista dei DTO secondo i parametri passati
* @param states
* @param daInviare
* @param cow
* @return
*/
public static List getRequestByCriteria(List states, Long daInviare, String cow ) {
List dtoList = null;
//creo la lista dei criteri di ricerca
ArrayList criterion = new ArrayList();
criterion.add(Restrictions.in(GnpRichiesteRecDAO.HIB_PROP_STATO, states));
criterion.add(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE, daInviare));
criterion.add(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_COW, cow));
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
dtoList = dao.findByCriteria(criterion);
return dtoList;
}
/**
* Ritorna la lista dei DTO secondo i parametri passati
* @param states
* @param daInviare
* @param cow
* @return
*/
public static List getRequestByCriteria(List states, String codiceCorrelazione, boolean isPrjMlMs ) {
List dtoList = null;
//creo la lista dei criteri di ricerca
ArrayList criterion = new ArrayList();
criterion.add(Restrictions.in(GnpRichiesteRecDAO.HIB_PROP_STATO, states));
criterion.add(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_COD_CORRELAZIONE, codiceCorrelazione));
criterion.add(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(isPrjMlMs ? 1 : 0)));
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
dtoList = dao.findByCriteria(criterion);
return dtoList;
}
/**
* Ritorna la lista dei DTO secondo i parametri passati
* @param states
* @param daInviare
* @param cow
* @return
* @throws Exception
*/
public static List getRequestFineWaitOLOStandard() throws Exception {
List dtoList = null;
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
//creo la lista dei criteri di ricerca
ArrayList criterion = new ArrayList();
boolean activeA375 = Resources.isActiveValidazionePitagoraA375();
// Criterio 1. Tutte le richieste in stato ACCETTATA con DFW scaduta e non multilinea/multisede
Criterion standardRequestCrit1 = Restrictions.and(
Restrictions.and(
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO,new Long(StatoRichiestaRec.ACCETTATA)),
Restrictions.lt(GnpRichiesteRecDAO.HIB_PROP_DWF, DateUtils.troncaOra(new Date()))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(0)));
Criterion standardRequestCrit2 = null;
if(activeA375)
{
// Criterio 2. Tutte le richieste in stato VALIDATA_OLO con VERIFICATA_A375 = 1 e non multilinea/multisede
standardRequestCrit2 = Restrictions.and(
Restrictions.and(
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO, new Long(StatoRichiestaRec.VALIDATA_OLO)),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(0))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_VALIDATA_A375, "1"));
}
else
{
// Criterio 2. Tutte le richieste in stato VALIDATA_OLO e non multilinea/multisede
standardRequestCrit2 = Restrictions.and(
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO, new Long(StatoRichiestaRec.VALIDATA_OLO)),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(0)));
}
// Criterio 3. Tutte le richieste in stato VALIDATA_OLO con VERIFICATA_A375 = 0 (o NULL), con DFW scaduta e non multilinea/multisede
Criterion standardRequestCrit3 = Restrictions.and(
Restrictions.and(
Restrictions.and(
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO,new Long(StatoRichiestaRec.VALIDATA_OLO)),
Restrictions.lt(GnpRichiesteRecDAO.HIB_PROP_DWF, DateUtils.troncaOra(new Date()))),
Restrictions.or(
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_VALIDATA_A375, "0"),
Restrictions.isNull(GnpRichiesteRecDAO.HIB_PROP_VALIDATA_A375))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(0)));
Criterion totalCrit = Restrictions.or(Restrictions.or(standardRequestCrit1, standardRequestCrit2), standardRequestCrit3);
criterion.add(totalCrit);
dtoList = dao.findByCriteria(criterion);
return dtoList;
}
public static List getStandardRequestToSendOLO() throws Exception{
List resultList = null;
List processList = new ArrayList();
processList.add(ProcessMapper.proc_RIENTRO_ADSL);
processList.add(ProcessMapper.proc_RIENTRO_FONIA);
processList.add(ProcessMapper.proc_RIENTRO_NAKED);
List processListAgg = new ArrayList();
processListAgg.add(ProcessMapper.proc_RIENTRO_FONIA);
processListAgg.add(ProcessMapper.proc_RIENTRO_NAKED);
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
//creo la lista dei criteri di ricerca
ArrayList criterion = new ArrayList();
boolean activeA375 = Resources.isActiveValidazionePitagoraA375();
Criterion acquisiteCrit = null;
Criterion acquisiteCritNoAgg = null;
Criterion attesaReinvioCrit = null;
if( activeA375 )
{
acquisiteCrit = Restrictions.and(Restrictions.and(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO,
//MR 10X07 new Long(StatoRichiestaRec.VERIFICATAOK)),
new Long(StatoRichiestaRec.VERIFICATAOK_DEFINITIVO)),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE,
new Long(ApplicationCostants.REQUEST_DA_INVIARE))),
Restrictions.in(GnpRichiesteRecDAO.HIB_PROP_PROCESSO, processListAgg));
acquisiteCritNoAgg = Restrictions.and(Restrictions.and(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO,
new Long(StatoRichiestaRec.VERIFICATAOK)),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE,
new Long(ApplicationCostants.REQUEST_DA_INVIARE))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PROCESSO, ProcessMapper.proc_RIENTRO_ADSL));
// Se è attiva la gestione della delibera A375 le multilinea/multisede vanno come le standard
attesaReinvioCrit = Restrictions.and(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE,
new Long(ApplicationCostants.REQUEST_DA_INVIARE)),
Restrictions.and(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO,
new Long(StatoRichiestaRec.ATTESAREINVIO)),
Restrictions.le(GnpRichiesteRecDAO.HIB_PROP_DATA_REINVIO_OLO,
DateUtils.troncaOra(new java.util.Date()))));
}
else
{
acquisiteCrit = Restrictions.and(Restrictions.and(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO,
//MR 10X07 new Long(StatoRichiestaRec.VERIFICATAOK)),
new Long(StatoRichiestaRec.VERIFICATAOK_DEFINITIVO)),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE,
new Long(ApplicationCostants.REQUEST_DA_INVIARE))),
Restrictions.in(GnpRichiesteRecDAO.HIB_PROP_PROCESSO, processListAgg));
acquisiteCritNoAgg = Restrictions.and(Restrictions.and(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO,
new Long(StatoRichiestaRec.VERIFICATAOK)),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE,
new Long(ApplicationCostants.REQUEST_DA_INVIARE))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PROCESSO, ProcessMapper.proc_RIENTRO_ADSL));
attesaReinvioCrit = Restrictions.and(Restrictions.and(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE,
new Long(ApplicationCostants.REQUEST_DA_INVIARE)),
Restrictions.and(Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO,
new Long(StatoRichiestaRec.ATTESAREINVIO)),
Restrictions.le(GnpRichiesteRecDAO.HIB_PROP_DATA_REINVIO_OLO,
DateUtils.troncaOra(new java.util.Date())))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(0)));
}
Criterion totalCrit = null;
totalCrit = Restrictions.or(Restrictions.or(acquisiteCrit, attesaReinvioCrit), acquisiteCritNoAgg);
criterion.add(totalCrit);
resultList = dao.findByCriteria(criterion);
//posso fare direttamente addAll perchè hibernate eventualmente non trovi
// nessuna richiesta crea una List vuota ma istanziata
// resultList.addAll(richiesteDaInviareOloMultilinea);
//ordino per data ricezione richiesta
Collections.sort(resultList, new DataRicezioneComparator());
return resultList;
}
public static List getRichiesteDoppioDonatingToSendOLO() throws Exception{
List resultList = null;
List<String> processList = new ArrayList<String>();
GnpDoppioDonatingOloBridgeDAO dao = new GnpDoppioDonatingOloBridgeDAO();
processList.add(ProcessMapper.proc_RIENTRO_DOPPIO_DONATING);
//creo la lista dei criteri di ricerca
ArrayList<Criterion> criterion = new ArrayList<Criterion>();
Criterion acquisiteCrit = null;
acquisiteCrit =Restrictions.or(
Restrictions.and(
Restrictions.eq(GnpDoppioDonatingOloBridgeDAO.HIB_PROP_STATO, new Long(StatoRichiestaDoppioDonating.DA_INVIARE)),
Restrictions.eq(GnpDoppioDonatingOloBridgeDAO.HIB_PROP_DA_INVIARE, new Long(ApplicationCostants.REQUEST_DOPPIO_DONATING_DA_INVIARE))),
Restrictions.and(
Restrictions.and(
Restrictions.eq(GnpDoppioDonatingOloBridgeDAO.HIB_PROP_STATO,new Long(StatoRichiestaDoppioDonating.DA_REINVIARE)),
Restrictions.eq(GnpDoppioDonatingOloBridgeDAO.HIB_PROP_DA_INVIARE, new Long(ApplicationCostants.REQUEST_DOPPIO_DONATING_DA_INVIARE))),
Restrictions.le(GnpDoppioDonatingOloBridgeDAO.HIB_PROP_DATA_REINVIO_OLO,DateUtils.troncaOra(new java.util.Date()))));
criterion.add(acquisiteCrit);
resultList = dao.findByCriteria(criterion);
Collections.sort(resultList, new DataRicezioneComparatorDD());
return resultList;
}
public static List getStandardRequestToSendPitagoraReg(boolean isActiveBlackListManage) throws Exception{
List resultList = null;
ArrayList criterion = new ArrayList();
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
Criterion totalCrit = null;
boolean flagA375 = Resources.isActiveValidazionePitagoraA375();
// Per i processi blacklist e NPg lo stato di partenza da considerare cambia a seconda che
// sia attiva o meno la gestione della delibera A375
Long statoPartenzaBKL_NPG = flagA375 ? new Long(StatoRichiestaRec.VERIFICATAOK) : new Long(StatoRichiestaRec.ACQUISITA);
Long statoPartenzaNPG = flagA375 ? new Long(StatoRichiestaRec.VERIFICATAOK_DEFINITIVO) : new Long(StatoRichiestaRec.ACQUISITA);
Criterion criterionValidatingStandard = Restrictions.and(Restrictions.and(Restrictions.and(Restrictions.and(
Restrictions.in(GnpRichiesteRecDAO.HIB_PROP_PROCESSO, new String[]{ProcessMapper.proc_RIENTRO_FONIA,
ProcessMapper.proc_RIENTRO_FONIA_BKL,
ProcessMapper.proc_RIENTRO_NPg,
ProcessMapper.proc_RIENTRO_DOPPIO_DONATING,
ProcessMapper.proc_RIENTRO_DOPPIO_DONATING_BKL}),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO, new Long(StatoRichiestaRec.VALIDATING))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE, new Long(ApplicationCostants.REQUEST_DA_INVIARE))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(0))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_FLAG_VERTICALIZZATO, "N"));
Criterion acquisiteBlackListStandard = Restrictions.and(Restrictions.and(Restrictions.and(Restrictions.and(
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PROCESSO, ProcessMapper.proc_RIENTRO_DOPPIO_DONATING_BKL),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO, statoPartenzaBKL_NPG)),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE, new Long(ApplicationCostants.REQUEST_DA_INVIARE))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(0))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_FLAG_VERTICALIZZATO, "N"));
Criterion acquisiteNPg = Restrictions.and(Restrictions.and(Restrictions.and(
Restrictions.in(GnpRichiesteRecDAO.HIB_PROP_PROCESSO,
new String[]{ProcessMapper.proc_RIENTRO_FONIA_BKL, ProcessMapper.proc_RIENTRO_NPg}),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO, statoPartenzaNPG)),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE, new Long(ApplicationCostants.REQUEST_DA_INVIARE))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_FLAG_VERTICALIZZATO, "N"));
Criterion acquisiteNPg_StopPitagora = Restrictions.and(Restrictions.and(Restrictions.and(
Restrictions.in(GnpRichiesteRecDAO.HIB_PROP_PROCESSO, new String[]{ProcessMapper.proc_RIENTRO_FONIA_BKL, ProcessMapper.proc_RIENTRO_NPg}),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO, statoPartenzaNPG)
),
Restrictions.and(
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE, new Long(ApplicationCostants.REQUEST_DA_INVIARE)),
Restrictions.isNull(GnpRichiesteRecDAO.HIB_PROP_STOP_NPG))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_FLAG_VERTICALIZZATO, "N"));
if(isActiveBlackListManage){
if(Resources.isActivePitagoraRegolatiorioNpg()){
totalCrit = Restrictions.or(Restrictions.or(criterionValidatingStandard, acquisiteBlackListStandard),acquisiteNPg);
}
else {
totalCrit = Restrictions.or(Restrictions.or(criterionValidatingStandard, acquisiteBlackListStandard),acquisiteNPg_StopPitagora);
}
}else{
if(Resources.isActivePitagoraRegolatiorioNpg()){
totalCrit = Restrictions.or(criterionValidatingStandard,acquisiteNPg);
}
else {
totalCrit = Restrictions.or(criterionValidatingStandard,acquisiteNPg_StopPitagora);
}
}
criterion.add(totalCrit);
resultList = dao.findByCriteria(criterion);
return resultList;
}
public static List getStandardRequestToSendPitagoraXdsl(boolean isActiveBlackListManage) throws Exception{
List resultList = null;
ArrayList criterion = new ArrayList();
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
Criterion totalCrit = null;
boolean flagA375 = Resources.isActiveValidazionePitagoraA375();
// Per i processi blacklist lo stato di partenza da considerare cambia a seconda che
// sia attiva o meno la gestione della delibera A375
Long statoPartenzaBKL = new Long(StatoRichiestaRec.VERIFICATAOK);
Criterion criterionValidating = Restrictions.and( Restrictions.and(Restrictions.and(Restrictions.and(
Restrictions.in(GnpRichiesteRecDAO.HIB_PROP_PROCESSO,
new String[]{ProcessMapper.proc_RIENTRO_ADSL,
ProcessMapper.proc_RIENTRO_ADSL_BKL,
ProcessMapper.proc_RIENTRO_NAKED,
ProcessMapper.proc_RIENTRO_NAKED_BKL}),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO, new Long(StatoRichiestaRec.VALIDATING))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE, new Long(ApplicationCostants.REQUEST_DA_INVIARE))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(0))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_FLAG_VERTICALIZZATO, "N"));
Criterion acquisiteBlackListStandard = Restrictions.and(Restrictions.and(Restrictions.and(Restrictions.and(
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PROCESSO, ProcessMapper.proc_RIENTRO_ADSL_BKL),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO, statoPartenzaBKL)),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE, new Long(ApplicationCostants.REQUEST_DA_INVIARE))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(0))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_FLAG_VERTICALIZZATO, "N"));
Criterion acquisiteBlackListAggStandard = Restrictions.and(Restrictions.and(Restrictions.and(Restrictions.and(
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PROCESSO, ProcessMapper.proc_RIENTRO_NAKED_BKL),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_STATO, new Long(StatoRichiestaRec.VERIFICATAOK_DEFINITIVO))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_DAINVIARE, new Long(ApplicationCostants.REQUEST_DA_INVIARE))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_PRJ_ML_MS, new Long(0))),
Restrictions.eq(GnpRichiesteRecDAO.HIB_PROP_FLAG_VERTICALIZZATO, "N"));
if(isActiveBlackListManage){
totalCrit = Restrictions.or(Restrictions.or(criterionValidating, acquisiteBlackListStandard), acquisiteBlackListAggStandard);
}else{
totalCrit = criterionValidating;
}
criterion.add(totalCrit);
resultList = dao.findByCriteria(criterion);
return resultList;
}
public static Map getMultilineaRequestToSend(List gnpMLineaMSedeDaInviare, int stato) throws Exception{
Map map = new HashMap();
List resultList = null;
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
for(int i=0; i<gnpMLineaMSedeDaInviare.size(); i++){
GnpMlineaMsede mLineaMsedeDto = (GnpMlineaMsede)gnpMLineaMSedeDaInviare.get(i);
resultList = dao.getRichiesteDaInviareMultilinea(((GnpMlineaMsede)mLineaMsedeDto).getIdCorrelazione(),stato);
if(resultList!=null && resultList.size()>0){
map.put(mLineaMsedeDto, resultList);
}
}
return map;
}
public static Map getMultilineaRequestToSendNPG35(List<GnpMlineaMsedeNPG35> gnpMLineaMSedeDaInviare, int stato) throws Exception{
Map map = new HashMap();
List<GnpRichiesteNpg35> resultList = null;
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
for(int i=0; i<gnpMLineaMSedeDaInviare.size(); i++){
GnpMlineaMsedeNPG35 mLineaMsedeDto = gnpMLineaMSedeDaInviare.get(i);
// List of type GnpRichiesteNpg35
resultList = dao.getRichiesteDaInviareMultilineaNPG35(mLineaMsedeDto.getIdCorrelazione(),stato);
if(resultList!=null && resultList.size()>0){
map.put(mLineaMsedeDto, resultList);
}
}
return map;
}
public static Map getMultilineaRequestToSendNPG103(List<GnpMlineaMsedeNPG35> gnpMLineaMSedeDaInviare, int stato) throws Exception{
Map map = new HashMap();
List<GnpRichiesteNpg103> resultList = null;
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
for(int i=0; i<gnpMLineaMSedeDaInviare.size(); i++){
GnpMlineaMsedeNPG35 mLineaMsedeDto = gnpMLineaMSedeDaInviare.get(i);
// List of type GnpRichiesteNpg103
resultList = dao.getRichiesteDaInviareMultilineaNPG103(mLineaMsedeDto.getIdCorrelazione(),stato);
if(resultList!=null && resultList.size()>0){
map.put(mLineaMsedeDto, resultList);
}
}
return map;
}
// public static Map getMultilineaRequestToSendPitagora(String processo, int stato, List gnpMLineaMSedeDaInviare) throws Exception{
// List resultList = null;
// GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
// Map map = new HashMap();
// for(int i=0; i<gnpMLineaMSedeDaInviare.size(); i++){
// GnpMlineaMsede mLineaMsedeDto = (GnpMlineaMsede)gnpMLineaMSedeDaInviare.get(i);
// resultList = dao.getRichiesteDaInviarePitagoraMultilinea(processo , stato , mLineaMsedeDto.getIdCorrelazione());
// if(resultList!=null && resultList.size()>0){
// map.put(mLineaMsedeDto, resultList);
// }
// }
// return map;
// }
public static Map getMultilineaRequestToSendPitagora(boolean isBlackList, List gnpMLineaMSedeDaInviare) throws Exception{
List resultList = null;
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
Map map = new HashMap();
for(int i=0; i<gnpMLineaMSedeDaInviare.size(); i++){
GnpMlineaMsede mLineaMsedeDto = (GnpMlineaMsede)gnpMLineaMSedeDaInviare.get(i);
if(isBlackList){
resultList = dao.getRichiesteDaInviarePitagoraMultilineaBkl(mLineaMsedeDto.getIdCorrelazione());
}else{
resultList = dao.getRichiesteDaInviarePitagoraMultilineaStandard(mLineaMsedeDto.getIdCorrelazione());
}
if(resultList!=null && resultList.size()>0){
map.put(mLineaMsedeDto, resultList);
}
}
return map;
}
/**
* Ritorna la lista dei DTO secondo i parametri passati
* @param states
* @param daInviare
* @param cow
* @return
* @throws Exception
*/
public static Map getRequestFineWaitOLOMultilinea() throws Exception {
List resultList = null;
GnpRichiesteRecDAO dao = new GnpRichiesteRecDAO();
MultiLineaHelper helper = new MultiLineaHelper();
List gnpMsedeMlineaList = helper.getMultilineaDtoFineWaitOLO();
Map map = new HashMap();
for(int i=0; i<gnpMsedeMlineaList.size(); i++){
GnpMlineaMsede mLineaMsedeDto = (GnpMlineaMsede)gnpMsedeMlineaList.get(i);
resultList = dao.getRichiesteFineWaitOLOMultilinea(mLineaMsedeDto.getIdCorrelazione());
if(resultList!=null && resultList.size()>0){
map.put(mLineaMsedeDto, resultList);
}
}
return map;
}
}
class DataRicezioneComparator implements Comparator{
public int compare(Object arg0, Object arg1) {
GnpRichiesteRec richiesta1 = (GnpRichiesteRec) arg0;
GnpRichiesteRec richiesta2 = (GnpRichiesteRec) arg1;
if(richiesta1.getDataRicezioneRichiesta().after(richiesta2.getDataRicezioneRichiesta())){
return 1;
}else if (richiesta1.getDataRicezioneRichiesta().before(richiesta2.getDataRicezioneRichiesta())){
return -1;
}else
return 0;
}
}
/* Per Doppio Donating */
class DataRicezioneComparatorDD implements Comparator{
public int compare(Object arg0, Object arg1) {
GnpDoppioDonatingOloBridge richiesta1 = (GnpDoppioDonatingOloBridge) arg0;
GnpDoppioDonatingOloBridge richiesta2 = (GnpDoppioDonatingOloBridge) arg1;
if(richiesta1.getDataCreazione().after(richiesta2.getDataCreazione())){
return 1;
}else if (richiesta1.getDataCreazione().before(richiesta2.getDataCreazione())){
return -1;
}else
return 0;
}
}

View File

@@ -0,0 +1,133 @@
package it.valueteam.gnp.dao.db;
/**
* <p>Title: Progetto Gateway OLO MNP</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2002</p>
* <p>Company: </p>
* @author Marco Palmini
* @version 1.0
*/
//import java
import java.sql.*;
import javax.naming.*;
import javax.sql.*;
import it.valueteam.gnp.utility.Resources;
public abstract class BaseDAO {
protected DataSource ds;
protected InitialContext ctx;
protected String DATASOURCE = Resources.getDatasource();
/**
* Inizializza il data source
* @throws Exception
*/
protected void initDB() throws Exception{
try
{
ctx = new InitialContext();
ds = (DataSource)ctx.lookup(DATASOURCE);
}
catch (Exception ex)
{
ex.printStackTrace();
throw ex;
}
finally
{
try
{
ctx.close();
}
catch (Exception ex) {}
}
}
/**
* Metodo per ottenere le connessioni dal DB
* Se non è disponibile una connessione ritorna null
*/
public Connection getConnection() throws Exception{
Connection conn = null;
try
{
if (ds==null) initDB();
conn = ds.getConnection();
}
catch (Exception ex)
{
ex.printStackTrace();
throw ex;
}
finally
{
try
{
if( conn != null ) conn.setAutoCommit(false);
}
catch (Exception ex)
{
ex.printStackTrace();
throw ex;
}
}
// se non riesce ad ottenere una connessione per tre volte torna null
return conn;
}
/**
* Metodo per la chiusura del ResultSet,dello Statement e della Connection
* tale metodo non lancia eccezzioni
* @param rs
* @param stmt
* @param c
*/
public 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) {}
}
// ******************************************************
// *****UTILITA' PER PAGINAZIONE ************************
// ******************************************************
protected int getRow_page_limit(int page, int row_per_page) throws Exception {
if(page<=0) page=1;
int skipRecords = row_per_page*(page-1);
int row_page_limit = skipRecords + row_per_page;
return row_page_limit;
}
protected int getMaxPage(int totRow, int rows_per_page) {
int pages = -1;
try {
pages = totRow/rows_per_page;
int resto = totRow%rows_per_page;
if(resto!=0) pages++;
if(pages==0) pages = 1;
}
catch (Exception ex) {
}
return pages;
}
}

View File

@@ -0,0 +1,193 @@
package it.valueteam.gnp.dao.db;
import it.valueteam.gnp.obj.dao.AnagraficaLog;
import it.valueteam.gnp.obj.dao.AnagraficaProcesso;
import java.sql.*;
import java.util.*;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: Siemens</p>
* @author Ambra Parati
* @version 1.0
*/
public class ProcessLoggerDAO extends BaseDAO{
//Query per ricavare tutti i log relativi ad un processo
// String sql_getAnagraficaLog = "SELECT AL.CODICE_LOG, " +
// "AL.SEVERITA, " +
// "AL.DESCRIZIONE, " +
// "PL.LOG_ON " +
// "FROM MNP_ANAGRAFICA_LOG AL, " +
// "MNP_PROCESSO_LOG PL " +
// "WHERE AL.CODICE_LOG=PL.CODICE_LOG " +
// "AND PL.CODICE_PROCESSO=? ";
//C.P: 20 luglio 2007
//carico di default i comini e il 9999
String sql_getAnagraficaLog = ""+
"SELECT AL.CODICE_LOG,AL.SEVERITA, AL.DESCRIZIONE, PL.LOG_ON "+
"FROM GNP_ANAGRAFICA_LOG AL, GNP_PROCESSO_LOG PL "+
"WHERE AL.CODICE_LOG=PL.CODICE_LOG "+
"AND PL.CODICE_PROCESSO=? "+
"and AL.CODICE_LOG not like '00%' and AL.CODICE_LOG not like '9999' "+
"union "+
"SELECT AL.CODICE_LOG, AL.SEVERITA, AL.DESCRIZIONE, 1 as LOG_ON "+
"FROM GNP_ANAGRAFICA_LOG AL "+
"WHERE AL.CODICE_LOG like '00%' or AL.CODICE_LOG like '9999'";
//Query per ricavare tutte le info di un log tramite il suo codice
String sql_getAnagraficaLog1 = "SELECT AL.CODICE_LOG, " +
"AL.SEVERITA, " +
"AL.DESCRIZIONE, " +
"PL.LOG_ON " +
"FROM GNP_ANAGRAFICA_LOG AL, " +
"GNP_PROCESSO_LOG PL " +
"WHERE AL.CODICE_LOG=PL.CODICE_LOG " +
"AND PL.CODICE_LOG=? ";
//Query per ricavare tutte le info di un processo tramite il suo nome
String sql_getAnagraficaProcesso = "SELECT CODICE_PROCESSO, " +
"NOME_PROCESSO " +
"FROM GNP_ANAGRAFICA_PROCESSO " +
"WHERE NOME_PROCESSO=? ";
/**
* Ricava l'elenco dei log associati al processo
* @param CODICE_PROCESSO Codice del processo di cui devo ricavare i log
* @return AnagraficaLog[] - Elenco delle informazioni relative al messaggio
* @throws SQLException,Exception
*/
public AnagraficaLog[] getAnagraficaLog_proc(String CODICE_PROCESSO) throws SQLException,Exception{
AnagraficaLog[] anagLogSeq = null;
AnagraficaLog anagLog = null;
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
Vector v = new Vector();
try {
conn = getConnection();
pstmt = conn.prepareStatement(sql_getAnagraficaLog);
pstmt.setString(1,CODICE_PROCESSO);
rs = pstmt.executeQuery();
while (rs.next()) {
anagLog = new AnagraficaLog();
anagLog.setCODICE_LOG(rs.getString("CODICE_LOG"));
anagLog.setSEVERITA(rs.getString("SEVERITA"));
anagLog.setDESCRIZIONE(rs.getString("DESCRIZIONE"));
anagLog.setLOG_ON(rs.getInt("LOG_ON"));
v.addElement(anagLog);
}
if(v.size() > 0){
anagLogSeq = new AnagraficaLog[v.size()];
anagLogSeq = (AnagraficaLog[])v.toArray(anagLogSeq);
}
}
catch (SQLException sex) {
anagLogSeq = null;
throw sex;
}
catch (Exception ex) {
anagLogSeq = null;
throw ex;
}
finally {
closeAll(rs,pstmt,conn);
}
return anagLogSeq;
}
/**
* Restituisce le informazioni sul messaggio di log individuato dal codice passato
* @param CODICE_LOG Codice del messaggio
* @return AnagraficaLog - Informazioni relative al messaggio
* @throws SQLException
* @throws Exception
*/
public AnagraficaLog getAnagraficaLog_log(String CODICE_LOG) throws SQLException,Exception{
int i = 0;
AnagraficaLog anagLog = null;
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = getConnection();
pstmt = conn.prepareStatement(sql_getAnagraficaLog1);
pstmt.setString(1,CODICE_LOG);
rs = pstmt.executeQuery();
if(rs.next()) {
anagLog = new AnagraficaLog();
anagLog.setCODICE_LOG(rs.getString("CODICE_LOG"));
anagLog.setSEVERITA(rs.getString("SEVERITA"));
anagLog.setDESCRIZIONE(rs.getString("DESCRIZIONE"));
anagLog.setLOG_ON(rs.getInt("LOG_ON"));
}
}
catch (SQLException sex) {
sex.printStackTrace();
anagLog = null;
throw sex;
}
catch (Exception ex) {
ex.printStackTrace();
anagLog = null;
throw ex;
}
finally{
closeAll(rs,pstmt,conn);
}
return anagLog;
}
/**
* Restituisce le informazioni sul processo individuato dal nome passato
* @param NOME_PROCESSO Nome del processo
* @return AnagraficaProcesso - Informazioni relative al processo
* @throws SQLException
* @throws Exception
*/
public AnagraficaProcesso getAnagraficaProcesso_nome(String NOME_PROCESSO) throws SQLException,Exception{
int i = 0;
AnagraficaProcesso anagProcesso = null;
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = getConnection();
pstmt = conn.prepareStatement(sql_getAnagraficaProcesso);
pstmt.setString(1,NOME_PROCESSO);
rs = pstmt.executeQuery();
if(rs.next()) {
anagProcesso = new AnagraficaProcesso();
anagProcesso.setCODICE_PROCESSO(rs.getString("CODICE_PROCESSO"));
anagProcesso.setNOME_PROCESSO(rs.getString("NOME_PROCESSO"));
}
}
catch (SQLException sex) {
sex.printStackTrace();
anagProcesso = null;
throw sex;
}
catch (Exception ex) {
ex.printStackTrace();
anagProcesso = null;
throw ex;
}
finally{
closeAll(rs,pstmt,conn);
}
return anagProcesso;
}
}

View File

@@ -0,0 +1,768 @@
package it.valueteam.gnp.dao.db;
/**
* <p>Title: MNP</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author Marco Palmini
* @version 1.0
*/
import it.valueteam.gnp.utility.DateUtils;
import it.valueteam.gnp.utility.UserTransactionUtility;
import javax.transaction.UserTransaction;
import java.sql.*;
import java.util.ArrayList;
import java.util.Date;
public class UtilityDao extends BaseDAO {
public final static String JMS_UNIQUE_ID_PREFIX = "A";
public final static String RICH_REC_ID_BASE = "00000000000000000";
private static final String sqlSelect_UniqueId =
"SELECT SEQ_UNIQUE_ID.NEXTVAL FROM DUAL";
private static final String sqlSelect_NextRichiestaDonor =
"SELECT SEQ_RICHIESTA_DONOR.NEXTVAL FROM DUAL";
private static final String sql_seq_rec_rich_attiv =
"select seq_rec_rich_attiv.nextval from dual";
private static final String sql_seq_idfile =
"select seq_idfile.nextval from dual";
//private static final String sql_olo_extractor =
// "select distinct(cow) from gnp_olo_richieste_out "+
// "where da_processare=1";
private static final String sql_olo_extractor =
" select distinct p.cow_fase_iii " +
" from gnp_olo_richieste_out r, gnp_anag_olo_param p " +
" where r.DA_PROCESSARE=1 " +
" and p.COD_OLO=r.cow ";
private static final String sql_seq_sms_operation_code =
"select SEQ_SMS_OPERATION_CODE.nextval from dual";
private static final String sql_seq_codiceOrdineRecOLO =
"select seq_cod_ord_rec_olo.nextval from dual";
/**
* Torna lo idfile dalla sequence corrispondente
* @author: Elena
*
* @return
* @throws SQLException
* @throws Exception
*
*/
public long getIdFile() throws SQLException, Exception {
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
c = getConnection();
pstmt = c.prepareStatement(sql_seq_idfile);
rs = pstmt.executeQuery();
if ((rs == null) || (!rs.next())) {
throw new Exception("Impossibile ottenere il sequence IdFile");
} else {
return rs.getLong("NEXTVAL");
}
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
/**
* Torna l'elenco di tutti gli OLO per cui esistono dei record da spedire
* @author: Elena
*
* @return
* @throws SQLException
* @throws Exception
*
*/
public ArrayList getCodiciOLOFromOloRichiesteOut() throws SQLException, Exception {
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
ArrayList olo = new ArrayList();
try {
c = getConnection();
pstmt = c.prepareStatement(sql_olo_extractor);
rs = pstmt.executeQuery();
if ((rs == null)) {
throw new Exception("Impossibile ottenere l'elenco degli operatori coinvolti nel processo");
} else {
while (rs.next()){
olo.add(rs.getString(1));
}
}
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
return olo;
}
/**
* Torna l'elenco di tutti gli OLO per cui esistono dei record da spedire
* @author: alescar
*
* @return
* @throws SQLException
* @throws Exception
*
*/
public ArrayList getCodiciOLOFromOloRichiesteDonorOut(boolean isSabato) throws SQLException, Exception {
// TO DO VERIFICARE SQL
//String sql_olo_donor_extractor =
// "select distinct(codice_operatore_recipient) from gnp_olo_richieste_donor_out "+
// "where da_inviare=1";
String sql_olo_donor_extractor;
if (isSabato){
// QUERY DIVERSA IL SABATO!
sql_olo_donor_extractor =
" select distinct p.cow_fase_iii " +
" from gnp_olo_richieste_donor_out r, gnp_anag_olo_param p " +
" where r.da_inviare=1 and r.tipo_comunicazione = 3 " +
" and p.COD_OLO=r.codice_operatore_recipient ";
}
else {
sql_olo_donor_extractor =
" select distinct p.cow_fase_iii " +
" from gnp_olo_richieste_donor_out r, gnp_anag_olo_param p " +
" where r.da_inviare=1 " +
" and p.COD_OLO=r.codice_operatore_recipient ";
}
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
ArrayList olo = new ArrayList();
try {
c = getConnection();
pstmt = c.prepareStatement(sql_olo_donor_extractor);
rs = pstmt.executeQuery();
if ((rs == null)) {
throw new Exception("Impossibile ottenere l'elenco degli operatori coinvolti nel processo donor");
} else {
while (rs.next()){
olo.add(rs.getString(1));
}
}
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
return olo;
}
/**
* Torna l'elenco di tutti gli OLO abilitati alla ricezione flussi DBP
* @author: alescar
*
* @return
* @throws SQLException
* @throws Exception
*
*/
/**
* Ritorna true/false se il DN <20> in presente nella tabella delle multiline o meno
* @author: pp
*
* @return
* @throws SQLException
* @throws Exception
*
*/
public boolean isDnMultilinea(String dn) throws SQLException, Exception {
String query = " select count(*) CNT from gnp_wa_del_52_asset_bu_mlinea where numero_telefono=? ";
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
String cnt = "";
boolean result = true;
try {
c = getConnection();
pstmt = c.prepareStatement(query);
pstmt.setString(1,dn);
rs = pstmt.executeQuery();
while (rs.next()){
cnt = rs.getString("CNT");
}
if (cnt.equalsIgnoreCase("0")) {
result = false;
}
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
return result;
}
public ArrayList getCodiciOloAttiviDBP() throws SQLException, Exception {
String sql_olo_dbp =
" select distinct p.cow_fase_iii " +
" from gnp_anag_olo a, gnp_anag_olo_param p " +
" where p.cod_olo = a.COD_OLO " +
" and a.FLAG_DBP=1 and a.FLAG_ATTIVO=1 " ;
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
ArrayList olo = new ArrayList();
try {
c = getConnection();
pstmt = c.prepareStatement(sql_olo_dbp);
rs = pstmt.executeQuery();
if ((rs == null)) {
throw new Exception("Impossibile ottenere l'elenco degli operatori coinvolti nel processo DBP");
} else {
while (rs.next()){
olo.add(rs.getString(1));
}
}
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
return olo;
}
/**
* Torna lo UNIQUE ID dalla sequence
* @return
* @throws SQLException
* @throws Exception
*/
public String getUniqueId() throws SQLException, Exception {
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
long id = -1;
try {
c = getConnection();
pstmt = c.prepareStatement(sqlSelect_UniqueId);
rs = pstmt.executeQuery();
if ((rs == null) || (!rs.next())) {
throw new Exception("Impossibile ottenere il sequence UniqueId");
} else {
id = rs.getLong("NEXTVAL");
}
return JMS_UNIQUE_ID_PREFIX + id;
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
/**
* Torna lo UNIQUE ID dalla sequence
* @return
* @throws SQLException
* @throws Exception
*/
public String getIdRichiestaRec() throws SQLException, Exception {
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
long id = -1;
String progRichiesta = null;
try {
c = getConnection();
pstmt = c.prepareStatement(sql_seq_rec_rich_attiv);
rs = pstmt.executeQuery();
if ((rs == null) || (!rs.next())) {
throw new SQLException(
"Impossibile ottenere il sequence seq_rec_rich_attiv");
} else {
id = rs.getLong("NEXTVAL");
}
progRichiesta = "00000000000000000" + id;
progRichiesta = progRichiesta.substring(
(progRichiesta.length() - RICH_REC_ID_BASE.length()),
progRichiesta.length());
return progRichiesta;
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
/**
* Torna lo SmsOperationCode dalla sequence corrispondente
* @author: Carlo
*
* @return
* @throws SQLException
* @throws Exception
*
*/
public long getSmsOperationCode() throws SQLException, Exception {
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
c = getConnection();
pstmt = c.prepareStatement(sql_seq_sms_operation_code);
rs = pstmt.executeQuery();
if ((rs == null) || (!rs.next())) {
throw new Exception("Impossibile ottenere il sequence SmsOperationCode");
} else {
return rs.getLong("NEXTVAL");
}
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
public long getProgressivoCodiceOrdineRecOLO() throws SQLException, Exception {
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
c = getConnection();
pstmt = c.prepareStatement(sql_seq_codiceOrdineRecOLO);
rs = pstmt.executeQuery();
if ((rs == null) || (!rs.next())) {
throw new Exception("Impossibile ottenere il sequence IdFile");
} else {
return rs.getLong("NEXTVAL");
}
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
public int getNextIdFileOloDbp() throws SQLException, Exception {
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql_NextIdFileOloDbp =
"SELECT NVL(MAX(IDFILE),0) AS NEXTID FROM GNP_DBP_OUT WHERE TRUNC(DATA_CREAZIONE)=TRUNC(SYSDATE)";
try {
c = getConnection();
pstmt = c.prepareStatement(sql_NextIdFileOloDbp);
rs = pstmt.executeQuery();
if ((rs == null) || (!rs.next())) {
throw new Exception("UtilityDao().getNextIdFileOloDbp(): Impossibile ottenere il seguente identificativo per file OLO DBP");
} else {
int actualValue=rs.getInt("NEXTID");
return (actualValue+1);
}
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
/**
* Torna lo UNIQUE ID dalla sequence SEQ_RICHIESTA_DONOR (Long)
* @return
* @throws SQLException
* @throws Exception
*/
public Long getNextIdRichiestaDonor() throws SQLException, Exception {
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
long id = -1;
try {
c = getConnection();
pstmt = c.prepareStatement(sqlSelect_NextRichiestaDonor);
rs = pstmt.executeQuery();
if ((rs == null) || (!rs.next())) {
throw new Exception("Impossibile ottenere il sequence SEQ_RICHIESTA_DONOR");
} else {
id = rs.getLong("NEXTVAL");
}
return new Long(id);
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
public int updDacNPg35(Long idRichiesta, java.util.Date dac) throws SQLException, Exception
{
String sqlUpdDAC = " UPDATE GNP_RICHIESTE_NPG35 " +
" SET DAC = TO_DATE(?,'dd/MM/yyyy HH24:mi:ss') " +
" WHERE ID_RICHIESTA = ?";
return updateDacNpg(sqlUpdDAC, idRichiesta, dac);
}
public int updDacNPg103(Long idRichiesta, java.util.Date dac) throws SQLException, Exception
{
String sqlUpdDAC = " UPDATE GNP_RICHIESTE_NPG103 " +
" SET DAC = TO_DATE(?,'dd/MM/yyyy HH24:mi:ss') " +
" WHERE ID_RICHIESTA = ?";
return updateDacNpg(sqlUpdDAC, idRichiesta, dac);
}
private int updateDacNpg(String sqlUpdDAC, Long idRichiesta, java.util.Date dac) throws SQLException, Exception {
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
int ris = -1;
try
{
c = getConnection();
pstmt = c.prepareStatement(sqlUpdDAC);
pstmt.setString(1,DateUtils.toStringHour(dac));
pstmt.setLong(2,idRichiesta);
ris = pstmt.executeUpdate();
return ris;
}
catch(SQLException sqle)
{
sqle.printStackTrace();
throw sqle;
}
catch(Exception e)
{
e.printStackTrace();
throw e;
}
finally
{
closeAll(rs, pstmt, c);
}
}
public int updateGNPGORecipient(String codiceOrdine, String nomeFileFenp, String idEsigenza, String tipoCom) throws Exception {
UserTransaction uTX;
String sqlQuery = " UPDATE GNPGO.GNPGO_NNG_RECIPIENT " +
" SET NOME_FILE_FENP = '" + nomeFileFenp +"'," +
" CODICE_ORDINE = '" + codiceOrdine + "'" +
" WHERE ID_ESIGENZA = '" + idEsigenza + "'" +
" AND TIPO_COMUNICAZIONE = '" + tipoCom + "'" ;
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
int ris = -1;
uTX = UserTransactionUtility.beginUserTransaction();
try
{
c = getConnection();
pstmt = c.prepareStatement(sqlQuery);
ris = pstmt.executeUpdate();
UserTransactionUtility.endUserTransaction(uTX, true);
return ris;
} catch (SQLException sqle) {
UserTransactionUtility.endUserTransaction(uTX, false);
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
UserTransactionUtility.endUserTransaction(uTX, false);
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
public int updateGNPGODonating(String codiceOrdine, String nomeFileFenp, String tipoCom) throws Exception {
UserTransaction uTX;
String sqlQuery = " UPDATE GNPGO.GNPGO_NNG_DONATING " +
" SET NOME_FILE_FENP = '" + nomeFileFenp +"'" +
" WHERE CODICE_ORDINE = '" + codiceOrdine + "'" +
" AND TIPO_COMUNICAZIONE = '" + tipoCom + "'" ;
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
int ris = -1;
uTX = UserTransactionUtility.beginUserTransaction();
try
{
c = getConnection();
pstmt = c.prepareStatement(sqlQuery);
ris = pstmt.executeUpdate();
UserTransactionUtility.endUserTransaction(uTX, true);
return ris;
} catch (SQLException sqle) {
UserTransactionUtility.endUserTransaction(uTX, false);
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
UserTransactionUtility.endUserTransaction(uTX, false);
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
/**
* 2018_C08 DBCFX_SM_452 gestione OLOVoip35Out riciclo sul rollback di invio #100
* ORA-01438: value larger than specified precision allowed for this column
* [GNP_RICHIESTE_VOIP35_LISTADN].[NUM_INVII_FENP] = NUMBER(2,0)
* QUI NO-OP impedire A MONTE
*/
public int updVoip35ListaDn(String nomeFile, java.util.Date dataInvioFenp, Long idRichiesta, String numTel, boolean flagGNR) throws Exception {
String sqlUpd;
// Se GNR, FENP risponde su un RADICALE quindi l'update va fatto utilizzando il radicale
if (flagGNR) {
sqlUpd = " UPDATE GNP_RICHIESTE_VOIP35_LISTADN " +
" SET NUM_INVII_FENP = NUM_INVII_FENP +1, " +
" NOME_FILE_FENP = ?, " +
" DATA_INVIO_FENP = TO_DATE(?,'dd/MM/yyyy HH24:mi:ss') " +
" WHERE ID_RICHIESTA = ? " +
" AND RADICALE = ? ";
} else {
sqlUpd = " UPDATE GNP_RICHIESTE_VOIP35_LISTADN " +
" SET NUM_INVII_FENP = NUM_INVII_FENP +1, " +
" NOME_FILE_FENP = ?, " +
" DATA_INVIO_FENP = TO_DATE(?,'dd/MM/yyyy HH24:mi:ss') " +
" WHERE ID_RICHIESTA = ? " +
" AND NUM_TEL = ? ";
}
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
int ris = -1;
try {
c = getConnection();
pstmt = c.prepareStatement(sqlUpd);
pstmt.setString(1, nomeFile);
pstmt.setString(2, DateUtils.toStringHour(dataInvioFenp));
pstmt.setLong(3, idRichiesta);
pstmt.setString(4, numTel);
ris = pstmt.executeUpdate();
return ris;
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
public int updVoip35ListaDn(java.util.Date dataInvioCrm, Long idRichiesta) throws Exception {
String sqlUpd =
" UPDATE GNP_RICHIESTE_VOIP35_LISTADN " +
" SET DATA_INVIO_CRM = TO_DATE(?,'dd/MM/yyyy HH24:mi:ss') " +
" WHERE ID_RICHIESTA = ? ";
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
int ris = -1;
try {
c = getConnection();
pstmt = c.prepareStatement(sqlUpd);
pstmt.setString(1, DateUtils.toStringHour(dataInvioCrm));
pstmt.setLong(2, idRichiesta);
ris = pstmt.executeUpdate();
return ris;
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
public int updVoip103ListaDn(java.util.Date dataInvioCrm, Long idRichiesta) throws Exception {
String sqlUpd =
" UPDATE GNP_RICHIESTE_VOIP103_LISTADN " +
" SET DATA_INVIO_CRM = TO_DATE(?,'dd/MM/yyyy HH24:mi:ss') " +
" WHERE ID_RICHIESTA = ? ";
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
int ris = -1;
try {
c = getConnection();
pstmt = c.prepareStatement(sqlUpd);
pstmt.setString(1, DateUtils.toStringHour(dataInvioCrm));
pstmt.setLong(2, idRichiesta);
ris = pstmt.executeUpdate();
return ris;
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
public int updVoip35ListaDnEsitoFenp(Long idRichiesta, String numTel, String esitoFenp, Long codiceRifiutoFenp) throws Exception {
String sqlUpd =
" UPDATE GNP_RICHIESTE_VOIP35_LISTADN " +
" SET ESITO_FENP = ?, " +
" CODICE_MOTIVO_RIFIUTO_FENP = ? " +
" WHERE ID_RICHIESTA = ? " +
" AND NUM_TEL = ? ";
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
int ris = -1;
try {
c = getConnection();
pstmt = c.prepareStatement(sqlUpd);
pstmt.setString(1, esitoFenp);
pstmt.setLong(2, codiceRifiutoFenp);
pstmt.setLong(3, idRichiesta);
pstmt.setString(4, numTel);
ris = pstmt.executeUpdate();
return ris;
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
// 152248 - 227248 del 103
public int updVoip103ListaDn(String nomeFile, Date dataInvioFenp, Long idRichiesta, String numTel, boolean flagGNR) throws Exception {
String sqlUpd;
// Se GNR, FENP risponde su un RADICALE quindi l'update va fatto utilizzando il radicale
if (flagGNR) {
sqlUpd = " UPDATE GNP_RICHIESTE_VOIP103_LISTADN " +
" SET NUM_INVII_FENP = NUM_INVII_FENP +1, " +
" NOME_FILE_FENP = ?, " +
" DATA_INVIO_FENP = TO_DATE(?,'dd/MM/yyyy HH24:mi:ss') " +
" WHERE ID_RICHIESTA = ? " +
" AND RADICALE = ? ";
} else {
sqlUpd = " UPDATE GNP_RICHIESTE_VOIP103_LISTADN " +
" SET NUM_INVII_FENP = NUM_INVII_FENP +1, " +
" NOME_FILE_FENP = ?, " +
" DATA_INVIO_FENP = TO_DATE(?,'dd/MM/yyyy HH24:mi:ss') " +
" WHERE ID_RICHIESTA = ? " +
" AND NUM_TEL = ? ";
}
Connection c = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
int ris = -1;
try {
c = getConnection();
pstmt = c.prepareStatement(sqlUpd);
pstmt.setString(1, nomeFile);
pstmt.setString(2, DateUtils.toStringHour(dataInvioFenp));
pstmt.setLong(3, idRichiesta);
pstmt.setString(4, numTel);
ris = pstmt.executeUpdate();
return ris;
} catch (SQLException sqle) {
sqle.printStackTrace();
throw sqle;
} catch (Exception e) {
e.printStackTrace();
throw e;
} finally {
closeAll(rs, pstmt, c);
}
}
}

View File

@@ -0,0 +1,64 @@
package it.valueteam.gnp.dao.db.hb;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
/**
* Data access object (DAO) for domain model
* @author MyEclipse Persistence Tools
*/
public class BaseHibernateDAO implements IBaseHibernateDAO {
private static final SessionFactory sessionFactory;
public static final int HB_BATCH_NUMBER_PROCESSING = 50;
static {
try {
// Create the SessionFactory from hibernate.cfg.xml
sessionFactory = new Configuration().configure().buildSessionFactory();
} catch (Throwable ex) {
// Make sure you log the exception, as it might be swallowed
System.err.println("Initial SessionFactory creation failed." + ex);
throw new ExceptionInInitializerError(ex);
}
}
public Session getSession() {
try {
Session s = sessionFactory.getCurrentSession();
// System.out.println("getCurrentSession");
return s;
}
catch (org.hibernate.HibernateException e) {
// System.out.println("openSession");
return HibernateSessionFactory.getSession();
//return sessionFactory.openSession();
}
}
/**
* Chiude la connessione
* da richiamare in tutti le select
*/
public void closeSession() {
HibernateSessionFactory.closeSession();
}
/**
* esegue le query su DB senza aspettare la commit JTA
*/
public void flush() {
getSession().flush();
}
public void flushAndClear() {
getSession().flush();
getSession().clear();
}
}

View File

@@ -0,0 +1,23 @@
<?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-dic-2009 11.37.25 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpAnagCanaleVendita" table="GNP_ANAG_CANALE_VENDITA">
<id name="codice" type="string">
<column name="CODICE" length="5" />
<generator class="assigned" />
</id>
<property name="descrizione" type="string">
<column name="DESCRIZIONE" length="50" />
</property>
<property name="inbound" type="string">
<column name="INBOUND" length="1" not-null="true">
<comment>1 = INBOUND 0 = OUTBOUND</comment>
</column>
</property>
<property name="ecommerce" type="string">
<column name="ECOMMERCE" length="1" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,67 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 4-dic-2009 11.37.26 by Hibernate Tools 3.2.0.CR1
/**
* GnpAnagCanaleVendita generated by hbm2java
*/
public class GnpAnagCanaleVendita implements java.io.Serializable {
private String codice;
private String descrizione;
private String inbound;
private String ecommerce;
public GnpAnagCanaleVendita() {
}
public GnpAnagCanaleVendita(String codice, String inbound, String ecommerce) {
this.codice = codice;
this.inbound = inbound;
this.ecommerce = ecommerce;
}
public GnpAnagCanaleVendita(String codice, String descrizione, String inbound, String ecommerce) {
this.codice = codice;
this.descrizione = descrizione;
this.inbound = inbound;
this.ecommerce = ecommerce;
}
public String getCodice() {
return this.codice;
}
public void setCodice(String codice) {
this.codice = codice;
}
public String getDescrizione() {
return this.descrizione;
}
public void setDescrizione(String descrizione) {
this.descrizione = descrizione;
}
public String getInbound() {
return this.inbound;
}
public void setInbound(String inbound) {
this.inbound = inbound;
}
public String getEcommerce() {
return this.ecommerce;
}
public void setEcommerce(String ecommerce) {
this.ecommerce = ecommerce;
}
}

View File

@@ -0,0 +1,186 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 19-set-2008 11.01.07 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpAnagCanaleVendita.
* @see .GnpAnagCanaleVendita
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpAnagCanaleVenditaDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpAnagCanaleVenditaDAO.class);
public void save(GnpAnagCanaleVendita transientInstance) {
log.debug("saving GnpAnagCanaleVendita instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpAnagCanaleVendita instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpAnagCanaleVendita model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpAnagCanaleVendita ");
try {
String queryString = " from GnpAnagCanaleVendita";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpAnagCanaleVendita instance) {
log.debug("attaching dirty GnpAnagCanaleVendita instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpAnagCanaleVendita instance) {
log.debug("attaching clean GnpAnagCanaleVendita instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpAnagCanaleVendita persistentInstance) {
log.debug("deleting GnpAnagCanaleVendita instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpAnagCanaleVendita merge(GnpAnagCanaleVendita detachedInstance) {
log.debug("merging GnpAnagCanaleVendita instance");
try {
GnpAnagCanaleVendita result = (GnpAnagCanaleVendita) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpAnagCanaleVendita instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagCanaleVendita");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpAnagCanaleVendita findById( java.lang.String id) {
log.debug("getting GnpAnagCanaleVendita instance with id: " + id);
try {
GnpAnagCanaleVendita instance = (GnpAnagCanaleVendita) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpAnagCanaleVendita", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpAnagCanaleVendita instance) {
log.debug("finding GnpAnagCanaleVendita instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagCanaleVendita")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,18 @@
<?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 2-dic-2009 12.45.20 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpAnagCowLineaTelecom" table="GNP_ANAG_COW_LINEA_TELECOM">
<id name="linea" type="string">
<column name="LINEA" length="20" />
<generator class="assigned"></generator>
</id>
<property name="cowOld" type="string">
<column name="COW_OLD" length="3" not-null="true" />
</property>
<property name="cowNew" type="string">
<column name="COW_NEW" length="3" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,44 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 2-dic-2009 12.45.21 by Hibernate Tools 3.2.0.CR1
/**
* GnpAnagCowLineaTelecom generated by hbm2java
*/
public class GnpAnagCowLineaTelecom implements java.io.Serializable {
private String linea;
private String cowNew;
private String cowOld;
public GnpAnagCowLineaTelecom() {
}
public String getLinea() {
return linea;
}
public void setLinea(String linea) {
this.linea = linea;
}
public String getCowNew() {
return cowNew;
}
public void setCowNew(String cowNew) {
this.cowNew = cowNew;
}
public String getCowOld() {
return cowOld;
}
public void setCowOld(String cowOld) {
this.cowOld = cowOld;
}
}

View File

@@ -0,0 +1,221 @@
package it.valueteam.gnp.dao.db.hb;
import java.util.Iterator;
// Generated 2-dic-2009 12.43.28 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.LockMode;
/**
* DAO object for domain model class GnpAnagCowLineaTelecom.
* @see .GnpAnagCowLineaTelecom
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Disjunction;
import org.hibernate.criterion.Example;
import org.hibernate.criterion.Restrictions;
public class GnpAnagCowLineaTelecomDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpAnagCowLineaTelecomDAO.class);
public static final String COLL_COW_OLD = "cowOld";
public static final String COLL_LINEA = "linea";
public void save(GnpAnagCowLineaTelecom transientInstance) {
log.debug("saving GnpAnagCowLineaTelecom instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpAnagCowLineaTelecom instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpAnagCowLineaTelecom model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpAnagCowLineaTelecom ");
try {
String queryString = " from GnpAnagCowLineaTelecom";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpAnagCowLineaTelecom instance) {
log.debug("attaching dirty GnpAnagCowLineaTelecom instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpAnagCowLineaTelecom instance) {
log.debug("attaching clean GnpAnagCowLineaTelecom instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpAnagCowLineaTelecom persistentInstance) {
log.debug("deleting GnpAnagCowLineaTelecom instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpAnagCowLineaTelecom merge(GnpAnagCowLineaTelecom detachedInstance) {
log.debug("merging GnpAnagCowTelecom instance");
try {
GnpAnagCowLineaTelecom result = (GnpAnagCowLineaTelecom) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpAnagCowLineaTelecom instance by criteria");
try {
Criteria crit = getSession().createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagCowLineaTelecom");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpAnagCowLineaTelecom findById( java.lang.String id) {
log.debug("getting GnpAnagCowLineaTelecom instance with id: " + id);
try {
GnpAnagCowLineaTelecom instance = (GnpAnagCowLineaTelecom) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpAnagCowLineaTelecom", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpAnagCowLineaTelecom instance) {
log.debug("finding GnpAnagCowLineaTelecom instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagCowLineaTelecom")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
public GnpAnagCowLineaTelecom findByDnAndCowOld(String dn, String cowOld) throws Exception {
GnpAnagCowLineaTelecom res=null;
try {
Criteria crit = getSession().createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagCowLineaTelecom");
crit.add(Restrictions.eq(COLL_LINEA, dn));
crit.add(Restrictions.eq(COLL_COW_OLD, cowOld));
List<GnpAnagCowLineaTelecom> results = crit.list();
if(results!=null && results.size()>1) {
log.error("Risultato maggiore di 1 in findByDnAndCowOld");
throw new Exception("Risultato maggiore di 1 in findByDnAndCowOld");
}
if (results != null && results.size() > 0) {
res=results.get(0);
}
} catch (RuntimeException e) {
log.error("findTipoCommKO failed", e);
throw e;
} finally {
closeSession();
}
log.debug("findByDnAndCowOld with DN ["+dn+"]"+"AND COW["+cowOld+"]");
return res;
}
}

View File

@@ -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 2-dic-2009 12.45.20 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpAnagCowTelecom" table="GNP_ANAG_COW_TELECOM">
<id name="cow" type="string">
<column name="COW" length="3" />
<generator class="assigned"></generator>
</id>
<property name="crmCompetenza" type="string">
<column name="CRM_COMPETENZA" length="1" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,43 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 2-dic-2009 12.45.21 by Hibernate Tools 3.2.0.CR1
/**
* GnpAnagCowTelecom generated by hbm2java
*/
public class GnpAnagCowTelecom implements java.io.Serializable {
private String cow;
private String crmCompetenza;
public GnpAnagCowTelecom() {
}
public GnpAnagCowTelecom(String cow, String crmCompetenza) {
this.cow = cow;
this.crmCompetenza = crmCompetenza;
}
public String getCow() {
return this.cow;
}
public void setCow(String cow) {
this.cow = cow;
}
public String getCrmCompetenza() {
return this.crmCompetenza;
}
public void setCrmCompetenza(String crmCompetenza) {
this.crmCompetenza = crmCompetenza;
}
}

View File

@@ -0,0 +1,186 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 2-dic-2009 12.43.28 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpAnagCowTelecom.
* @see .GnpAnagCowTelecom
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpAnagCowTelecomDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpAnagCowTelecomDAO.class);
public void save(GnpAnagCowTelecom transientInstance) {
log.debug("saving GnpAnagCowTelecom instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpAnagCowTelecom instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpAnagCowTelecom model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpAnagCowTelecom ");
try {
String queryString = " from GnpAnagCowTelecom";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpAnagCowTelecom instance) {
log.debug("attaching dirty GnpAnagCowTelecom instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpAnagCowTelecom instance) {
log.debug("attaching clean GnpAnagCowTelecom instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpAnagCowTelecom persistentInstance) {
log.debug("deleting GnpAnagCowTelecom instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpAnagCowTelecom merge(GnpAnagCowTelecom detachedInstance) {
log.debug("merging GnpAnagCowTelecom instance");
try {
GnpAnagCowTelecom result = (GnpAnagCowTelecom) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpAnagCowTelecom instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagCowTelecom");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpAnagCowTelecom findById( java.lang.String id) {
log.debug("getting GnpAnagCowTelecom instance with id: " + id);
try {
GnpAnagCowTelecom instance = (GnpAnagCowTelecom) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpAnagCowTelecom", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpAnagCowTelecom instance) {
log.debug("finding GnpAnagCowTelecom instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagCowTelecom")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,18 @@
<?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-set-2008 10.59.12 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpAnagMarcaggio" table="GNP_ANAG_MARCAGGIO">
<id name="codice" type="string">
<column name="CODICE" length="2" />
<generator class="assigned"></generator>
</id>
<property name="descrizione" type="string">
<column name="DESCRIZIONE" length="50" />
</property>
<property name="raggruppamento" type="string">
<column name="RAGGRUPPAMENTO" length="50" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,57 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 19-set-2008 10.59.13 by Hibernate Tools 3.2.0.CR1
/**
* GnpAnagMarcaggio generated by hbm2java
*/
public class GnpAnagMarcaggio implements java.io.Serializable {
private String codice;
private String descrizione;
private String raggruppamento;
public GnpAnagMarcaggio() {
}
public GnpAnagMarcaggio(String codice) {
this.codice = codice;
}
public GnpAnagMarcaggio(String codice, String descrizione, String raggruppamento) {
this.codice = codice;
this.descrizione = descrizione;
this.raggruppamento = raggruppamento;
}
public String getCodice() {
return this.codice;
}
public void setCodice(String codice) {
this.codice = codice;
}
public String getDescrizione() {
return this.descrizione;
}
public void setDescrizione(String descrizione) {
this.descrizione = descrizione;
}
public String getRaggruppamento() {
return this.raggruppamento;
}
public void setRaggruppamento(String raggruppamento) {
this.raggruppamento = raggruppamento;
}
}

View File

@@ -0,0 +1,186 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 19-set-2008 11.01.07 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpAnagMarcaggio.
* @see .GnpAnagMarcaggio
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpAnagMarcaggioDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpAnagMarcaggioDAO.class);
public void save(GnpAnagMarcaggio transientInstance) {
log.debug("saving GnpAnagMarcaggio instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpAnagMarcaggio instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpAnagMarcaggio model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpAnagMarcaggio ");
try {
String queryString = " from GnpAnagMarcaggio";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpAnagMarcaggio instance) {
log.debug("attaching dirty GnpAnagMarcaggio instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpAnagMarcaggio instance) {
log.debug("attaching clean GnpAnagMarcaggio instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpAnagMarcaggio persistentInstance) {
log.debug("deleting GnpAnagMarcaggio instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpAnagMarcaggio merge(GnpAnagMarcaggio detachedInstance) {
log.debug("merging GnpAnagMarcaggio instance");
try {
GnpAnagMarcaggio result = (GnpAnagMarcaggio) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpAnagMarcaggio instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagMarcaggio");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpAnagMarcaggio findById( java.lang.String id) {
log.debug("getting GnpAnagMarcaggio instance with id: " + id);
try {
GnpAnagMarcaggio instance = (GnpAnagMarcaggio) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpAnagMarcaggio", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpAnagMarcaggio instance) {
log.debug("finding GnpAnagMarcaggio instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagMarcaggio")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpAnagOlo" table="GNP_ANAG_OLO">
<id name="codOlo" type="java.lang.String">
<column name="COD_OLO" length="3" />
<generator class="assigned" />
</id>
<property name="descOlo" type="java.lang.String">
<column name="DESC_OLO" not-null="true" />
</property>
<property name="flagAttivo" type="java.lang.Long">
<column name="FLAG_ATTIVO" precision="1" scale="0" not-null="true" />
</property>
<property name="flagDbp" type="java.lang.Long">
<column name="FLAG_DBP" precision="1" scale="0" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,63 @@
package it.valueteam.gnp.dao.db.hb;
/**
* GnpAnagOlo generated by MyEclipse Persistence Tools
*/
public class GnpAnagOlo implements java.io.Serializable {
// Fields
private String codOlo;
private String descOlo;
private Long flagAttivo;
private Long flagDbp;
// Constructors
/** default constructor */
public GnpAnagOlo() {
}
/** full constructor */
public GnpAnagOlo(String codOlo, String descOlo, Long flagAttivo, Long flagDbp) {
this.codOlo = codOlo;
this.descOlo = descOlo;
this.flagAttivo = flagAttivo;
this.flagDbp = flagDbp;
}
// Property accessors
public String getCodOlo() {
return this.codOlo;
}
public void setCodOlo(String codOlo) {
this.codOlo = codOlo;
}
public String getDescOlo() {
return this.descOlo;
}
public void setDescOlo(String descOlo) {
this.descOlo = descOlo;
}
public Long getFlagAttivo() {
return this.flagAttivo;
}
public void setFlagAttivo(Long flagAttivo) {
this.flagAttivo = flagAttivo;
}
public Long getFlagDbp() {
return this.flagDbp;
}
public void setFlagDbp(Long flagDbp) {
this.flagDbp = flagDbp;
}
}

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpAnagOloCausaleRifiuto" table="GNP_ANAG_OLO_CAUSALE_RIFIUTO" >
<id name="codice" type="java.lang.Long">
<column name="CODICE" precision="2" scale="0" />
<generator class="assigned" />
</id>
<many-to-one name="gnpAnagOloTipoCom" class="it.valueteam.gnp.dao.db.hb.GnpAnagOloTipoCom" fetch="select" lazy="false">
<column name="CODICE_TIPO_COM" precision="2" scale="0" not-null="true" />
</many-to-one>
<property name="descrizione" type="java.lang.String">
<column name="DESCRIZIONE" length="100" not-null="true" />
</property>
<set name="gnpAnagOloCodMotivoRifs" inverse="true" table="GNP_ANAG_OLO_CAUSALE_MOT_RIF" >
<key>
<column name="CODICE_RIFIUTO" precision="2" scale="0" not-null="true" />
</key>
<many-to-many entity-name="it.valueteam.gnp.dao.db.hb.GnpAnagOloCodMotivoRif" lazy="false">
<column name="ID_MOTIVO_RIFIUTO" precision="2" scale="0" not-null="true" />
</many-to-many>
</set>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,77 @@
package it.valueteam.gnp.dao.db.hb;
import java.util.HashSet;
import java.util.Set;
/**
* GnpAnagOloCausaleRifiuto generated by MyEclipse Persistence Tools
*/
public class GnpAnagOloCausaleRifiuto implements java.io.Serializable {
// Fields
private Long codice;
private GnpAnagOloTipoCom gnpAnagOloTipoCom;
private String descrizione;
private Set gnpAnagOloCodMotivoRifs = new HashSet(0);
// Constructors
/** default constructor */
public GnpAnagOloCausaleRifiuto() {
}
/** minimal constructor */
public GnpAnagOloCausaleRifiuto(Long codice, GnpAnagOloTipoCom gnpAnagOloTipoCom, String descrizione) {
this.codice = codice;
this.gnpAnagOloTipoCom = gnpAnagOloTipoCom;
this.descrizione = descrizione;
}
/** full constructor */
public GnpAnagOloCausaleRifiuto(Long codice, GnpAnagOloTipoCom gnpAnagOloTipoCom, String descrizione, Set gnpAnagOloCodMotivoRifs) {
this.codice = codice;
this.gnpAnagOloTipoCom = gnpAnagOloTipoCom;
this.descrizione = descrizione;
this.gnpAnagOloCodMotivoRifs = gnpAnagOloCodMotivoRifs;
}
// Property accessors
public Long getCodice() {
return this.codice;
}
public void setCodice(Long codice) {
this.codice = codice;
}
public GnpAnagOloTipoCom getGnpAnagOloTipoCom() {
return this.gnpAnagOloTipoCom;
}
public void setGnpAnagOloTipoCom(GnpAnagOloTipoCom gnpAnagOloTipoCom) {
this.gnpAnagOloTipoCom = gnpAnagOloTipoCom;
}
public String getDescrizione() {
return this.descrizione;
}
public void setDescrizione(String descrizione) {
this.descrizione = descrizione;
}
public Set getGnpAnagOloCodMotivoRifs() {
return this.gnpAnagOloCodMotivoRifs;
}
public void setGnpAnagOloCodMotivoRifs(Set gnpAnagOloCodMotivoRifs) {
this.gnpAnagOloCodMotivoRifs = gnpAnagOloCodMotivoRifs;
}
}

View File

@@ -0,0 +1,124 @@
package it.valueteam.gnp.dao.db.hb;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
/**
* Data access object (DAO) for domain model class GnpAnagOloCausaleRifiuto.
*
* @see it.valueteam.gnp.dao.db.hb.GnpAnagOloCausaleRifiuto
* @author MyEclipse Persistence Tools
*/
public class GnpAnagOloCausaleRifiutoDAO extends BaseHibernateDAO {
private static final Log log = LogFactory.getLog(GnpAnagOloCausaleRifiutoDAO.class);
public void save(GnpAnagOloCausaleRifiuto transientInstance) {
log.debug("saving GnpAnagOloCausaleRifiuto instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(GnpAnagOloCausaleRifiuto persistentInstance) {
log.debug("deleting GnpAnagOloCausaleRifiuto instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpAnagOloCausaleRifiuto findById(java.lang.Long id) {
log.debug("getting GnpAnagOloCausaleRifiuto instance with id: " + id);
try {
GnpAnagOloCausaleRifiuto instance = (GnpAnagOloCausaleRifiuto) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpAnagOloCausaleRifiuto", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(GnpAnagOloCausaleRifiuto instance) {
log.debug("finding GnpAnagOloCausaleRifiuto instance by example");
try {
List results = getSession().createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagOloCausaleRifiuto").add(Example.create(instance)).list();
log.debug("find by example successful, result size: " + results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpAnagOloCausaleRifiuto instance with property: " + propertyName + ", value: " + value);
try {
String queryString = "from GnpAnagOloCausaleRifiuto as model where model." + propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
public List findAll() {
log.debug("finding all GnpAnagOloCausaleRifiuto instances");
try {
String queryString = "from GnpAnagOloCausaleRifiuto";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public GnpAnagOloCausaleRifiuto merge(GnpAnagOloCausaleRifiuto detachedInstance) {
log.debug("merging GnpAnagOloCausaleRifiuto instance");
try {
GnpAnagOloCausaleRifiuto result = (GnpAnagOloCausaleRifiuto) getSession().merge(detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(GnpAnagOloCausaleRifiuto instance) {
log.debug("attaching dirty GnpAnagOloCausaleRifiuto instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpAnagOloCausaleRifiuto instance) {
log.debug("attaching clean GnpAnagOloCausaleRifiuto instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
}

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpAnagOloCodMotivoRif" table="GNP_ANAG_OLO_COD_MOTIVO_RIF">
<id name="progId" type="java.lang.Long">
<column name="PROG_ID" precision="2" scale="0" />
<generator class="assigned" />
</id>
<property name="codice" type="java.lang.Long">
<column name="CODICE" precision="2" scale="0" not-null="true" />
</property>
<property name="descrizione" type="java.lang.String">
<column name="DESCRIZIONE" length="100" not-null="true" />
</property>
<set name="gnpAnagOloCausaleRifiutos" table="GNP_ANAG_OLO_CAUSALE_MOT_RIF" >
<key>
<column name="ID_MOTIVO_RIFIUTO" precision="2" scale="0" not-null="true" />
</key>
<many-to-many entity-name="it.valueteam.gnp.dao.db.hb.GnpAnagOloCausaleRifiuto" lazy="false">
<column name="CODICE_RIFIUTO" precision="2" scale="0" not-null="true" />
</many-to-many>
</set>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,77 @@
package it.valueteam.gnp.dao.db.hb;
import java.util.HashSet;
import java.util.Set;
/**
* GnpAnagOloCodMotivoRif generated by MyEclipse Persistence Tools
*/
public class GnpAnagOloCodMotivoRif implements java.io.Serializable {
// Fields
private Long progId;
private Long codice;
private String descrizione;
private Set gnpAnagOloCausaleRifiutos = new HashSet(0);
// Constructors
/** default constructor */
public GnpAnagOloCodMotivoRif() {
}
/** minimal constructor */
public GnpAnagOloCodMotivoRif(Long progId, Long codice, String descrizione) {
this.progId = progId;
this.codice = codice;
this.descrizione = descrizione;
}
/** full constructor */
public GnpAnagOloCodMotivoRif(Long progId, Long codice, String descrizione, Set gnpAnagOloCausaleRifiutos) {
this.progId = progId;
this.codice = codice;
this.descrizione = descrizione;
this.gnpAnagOloCausaleRifiutos = gnpAnagOloCausaleRifiutos;
}
// Property accessors
public Long getProgId() {
return this.progId;
}
public void setProgId(Long progId) {
this.progId = progId;
}
public Long getCodice() {
return this.codice;
}
public void setCodice(Long codice) {
this.codice = codice;
}
public String getDescrizione() {
return this.descrizione;
}
public void setDescrizione(String descrizione) {
this.descrizione = descrizione;
}
public Set getGnpAnagOloCausaleRifiutos() {
return this.gnpAnagOloCausaleRifiutos;
}
public void setGnpAnagOloCausaleRifiutos(Set gnpAnagOloCausaleRifiutos) {
this.gnpAnagOloCausaleRifiutos = gnpAnagOloCausaleRifiutos;
}
}

View File

@@ -0,0 +1,123 @@
package it.valueteam.gnp.dao.db.hb;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
/**
* Data access object (DAO) for domain model class GnpAnagOloCodMotivoRif.
*
* @see it.valueteam.gnp.dao.db.hb.GnpAnagOloCodMotivoRif
* @author MyEclipse Persistence Tools
*/
public class GnpAnagOloCodMotivoRifDAO extends BaseHibernateDAO {
private static final Log log = LogFactory.getLog(GnpAnagOloCodMotivoRifDAO.class);
public void save(GnpAnagOloCodMotivoRif transientInstance) {
log.debug("saving GnpAnagOloCodMotivoRif instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(GnpAnagOloCodMotivoRif persistentInstance) {
log.debug("deleting GnpAnagOloCodMotivoRif instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpAnagOloCodMotivoRif findById(java.lang.Long id) {
log.debug("getting GnpAnagOloCodMotivoRif instance with id: " + id);
try {
GnpAnagOloCodMotivoRif instance = (GnpAnagOloCodMotivoRif) getSession().get("it.valueteam.gnp.dao.db.hb.GnpAnagOloCodMotivoRif", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(GnpAnagOloCodMotivoRif instance) {
log.debug("finding GnpAnagOloCodMotivoRif instance by example");
try {
List results = getSession().createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagOloCodMotivoRif").add(Example.create(instance)).list();
log.debug("find by example successful, result size: " + results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpAnagOloCodMotivoRif instance with property: " + propertyName + ", value: " + value);
try {
String queryString = "from GnpAnagOloCodMotivoRif as model where model." + propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
public List findAll() {
log.debug("finding all GnpAnagOloCodMotivoRif instances");
try {
String queryString = "from GnpAnagOloCodMotivoRif";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public GnpAnagOloCodMotivoRif merge(GnpAnagOloCodMotivoRif detachedInstance) {
log.debug("merging GnpAnagOloCodMotivoRif instance");
try {
GnpAnagOloCodMotivoRif result = (GnpAnagOloCodMotivoRif) getSession().merge(detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(GnpAnagOloCodMotivoRif instance) {
log.debug("attaching dirty GnpAnagOloCodMotivoRif instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpAnagOloCodMotivoRif instance) {
log.debug("attaching clean GnpAnagOloCodMotivoRif instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
}

View File

@@ -0,0 +1,177 @@
package it.valueteam.gnp.dao.db.hb;
import it.valueteam.gnp.obj.ApplicationCostants;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
/**
* Data access object (DAO) for domain model class GnpAnagOlo.
*
* @see it.valueteam.gnp.dao.db.hb.GnpAnagOlo
* @author MyEclipse Persistence Tools
*/
public class GnpAnagOloDAO extends BaseHibernateDAO {
private static final Log log = LogFactory.getLog(GnpAnagOloDAO.class);
public static final String HB_FLAGATTIVO="flagAttivo";
public void save(GnpAnagOlo transientInstance) {
log.debug("saving GnpAnagOlo instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(GnpAnagOlo persistentInstance) {
log.debug("deleting GnpAnagOlo instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpAnagOlo findById(java.lang.String id) {
log.debug("getting GnpAnagOlo instance with id: " + id);
try {
GnpAnagOlo instance = (GnpAnagOlo) getSession().get(
"it.valueteam.gnp.dao.db.hb.GnpAnagOlo", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpAnagOlo instance) {
log.debug("finding GnpAnagOlo instance by example");
try {
List results = getSession().createCriteria(
"it.valueteam.gnp.dao.db.hb.GnpAnagOlo").add(
Example.create(instance)).list();
log.debug("find by example successful, result size: "
+ results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpAnagOlo instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "from GnpAnagOlo as model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpAnagOlo instances");
try {
String queryString = "from GnpAnagOlo";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
finally {
closeSession();
}
}
public GnpAnagOlo merge(GnpAnagOlo detachedInstance) {
log.debug("merging GnpAnagOlo instance");
try {
GnpAnagOlo result = (GnpAnagOlo) getSession().merge(
detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(GnpAnagOlo instance) {
log.debug("attaching dirty GnpAnagOlo instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpAnagOlo instance) {
log.debug("attaching clean GnpAnagOlo instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public boolean isOloInBlackList(String cow) throws Exception{
GnpAnagOlo olo = findById(cow);
if (olo==null) {
return false;
}
else {
int flagAttivo = olo.getFlagAttivo().intValue();
if (flagAttivo==ApplicationCostants.FLAG_ATTIVO_ANAG_OLO_WHITE_LIST) {
return false;
}
else if (flagAttivo==ApplicationCostants.FLAG_ATTIVO_ANAG_OLO_BLACK_LIST) {
return true;
}
else
throw new Exception("Valore incosistente del campo FLAG_ATTIVO della tabella GNP_ANAG_OLO per l'OLO :" +cow+"; FLAG_ATTIVO= "+flagAttivo+" ;");
}
// int flagAttivo = olo.getFlagAttivo().intValue();
//
//
// if(olo==null || flagAttivo==ApplicationCostants.FLAG_ATTIVO_ANAG_OLO_WHITE_LIST){
// return false;
// }else if (flagAttivo==ApplicationCostants.FLAG_ATTIVO_ANAG_OLO_BLACK_LIST){
// return true;
// }else
// throw new Exception("Valore incosistente del campo FLAG_ATTIVO della tabella GNP_ANAG_OLO per l'OLO :" +cow+"; FLAG_ATTIVO= "+flagAttivo+" ;");
}
}

View File

@@ -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 10-set-2009 10.56.11 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpAnagOloParam" table="GNP_ANAG_OLO_PARAM">
<id name="codOlo" type="string">
<column name="COD_OLO" length="3" />
<generator class="assigned" />
</id>
<property name="cowFaseIii" type="string">
<column name="COW_FASE_III" length="3" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,43 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 10-set-2009 10.56.12 by Hibernate Tools 3.2.0.CR1
/**
* GnpAnagOloParam generated by hbm2java
*/
public class GnpAnagOloParam implements java.io.Serializable {
private String codOlo;
private String cowFaseIii;
public GnpAnagOloParam() {
}
public GnpAnagOloParam(String codOlo, String cowFaseIii) {
this.codOlo = codOlo;
this.cowFaseIii = cowFaseIii;
}
public String getCodOlo() {
return this.codOlo;
}
public void setCodOlo(String codOlo) {
this.codOlo = codOlo;
}
public String getCowFaseIii() {
return this.cowFaseIii;
}
public void setCowFaseIii(String cowFaseIii) {
this.cowFaseIii = cowFaseIii;
}
}

View File

@@ -0,0 +1,214 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 10-set-2009 10.55.49 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpAnagOloParam.
* @see .GnpAnagOloParam
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpAnagOloParamDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpAnagOloParamDAO.class);
public void save(GnpAnagOloParam transientInstance) {
log.debug("saving GnpAnagOloParam instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpAnagOloParam instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpAnagOloParam model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpAnagOloParam ");
try {
String queryString = " from GnpAnagOloParam";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpAnagOloParam instance) {
log.debug("attaching dirty GnpAnagOloParam instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpAnagOloParam instance) {
log.debug("attaching clean GnpAnagOloParam instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpAnagOloParam persistentInstance) {
log.debug("deleting GnpAnagOloParam instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpAnagOloParam merge(GnpAnagOloParam detachedInstance) {
log.debug("merging GnpAnagOloParam instance");
try {
GnpAnagOloParam result = (GnpAnagOloParam) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpAnagOloParam instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagOloParam");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpAnagOloParam findById( java.lang.String id) {
log.debug("getting GnpAnagOloParam instance with id: " + id);
try {
GnpAnagOloParam instance = (GnpAnagOloParam) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpAnagOloParam", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpAnagOloParam instance) {
log.debug("finding GnpAnagOloParam instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagOloParam")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
/**
* Metodo per reperire il vecchio COW
*
* @param newCOW
* @return
*/
public String getOldCOW(String newCOW)
{
log.debug("finding old COW");
String oldCOW = null;
try {
GnpAnagOloParam rec = findById(newCOW);
if(rec != null)
oldCOW = rec.getCowFaseIii();
}
catch (RuntimeException re) {
log.error("find old COW failed: ", re);
}
finally {
closeSession();
}
return oldCOW;
}
}

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpAnagOloTipoCom" table="GNP_ANAG_OLO_TIPO_COM" >
<id name="codice" type="java.lang.Long">
<column name="CODICE" precision="2" scale="0" />
<generator class="assigned" />
</id>
<property name="descrizione" type="java.lang.String">
<column name="DESCRIZIONE" length="100" not-null="true" />
</property>
<set name="gnpAnagOloCausaleRifiutos" inverse="true" lazy="false">
<key>
<column name="CODICE_TIPO_COM" precision="2" scale="0" not-null="true" />
</key>
<one-to-many class="it.valueteam.gnp.dao.db.hb.GnpAnagOloCausaleRifiuto" />
</set>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,65 @@
package it.valueteam.gnp.dao.db.hb;
import java.util.HashSet;
import java.util.Set;
/**
* GnpAnagOloTipoCom generated by MyEclipse Persistence Tools
*/
public class GnpAnagOloTipoCom implements java.io.Serializable {
// Fields
private Long codice;
private String descrizione;
private Set gnpAnagOloCausaleRifiutos = new HashSet(0);
// Constructors
/** default constructor */
public GnpAnagOloTipoCom() {
}
/** minimal constructor */
public GnpAnagOloTipoCom(Long codice, String descrizione) {
this.codice = codice;
this.descrizione = descrizione;
}
/** full constructor */
public GnpAnagOloTipoCom(Long codice, String descrizione, Set gnpAnagOloCausaleRifiutos) {
this.codice = codice;
this.descrizione = descrizione;
this.gnpAnagOloCausaleRifiutos = gnpAnagOloCausaleRifiutos;
}
// Property accessors
public Long getCodice() {
return this.codice;
}
public void setCodice(Long codice) {
this.codice = codice;
}
public String getDescrizione() {
return this.descrizione;
}
public void setDescrizione(String descrizione) {
this.descrizione = descrizione;
}
public Set getGnpAnagOloCausaleRifiutos() {
return this.gnpAnagOloCausaleRifiutos;
}
public void setGnpAnagOloCausaleRifiutos(Set gnpAnagOloCausaleRifiutos) {
this.gnpAnagOloCausaleRifiutos = gnpAnagOloCausaleRifiutos;
}
}

View File

@@ -0,0 +1,123 @@
package it.valueteam.gnp.dao.db.hb;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
/**
* Data access object (DAO) for domain model class GnpAnagOloTipoCom.
*
* @see it.valueteam.gnp.dao.db.hb.GnpAnagOloTipoCom
* @author MyEclipse Persistence Tools
*/
public class GnpAnagOloTipoComDAO extends BaseHibernateDAO {
private static final Log log = LogFactory.getLog(GnpAnagOloTipoComDAO.class);
public void save(GnpAnagOloTipoCom transientInstance) {
log.debug("saving GnpAnagOloTipoCom instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(GnpAnagOloTipoCom persistentInstance) {
log.debug("deleting GnpAnagOloTipoCom instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpAnagOloTipoCom findById(java.lang.Long id) {
log.debug("getting GnpAnagOloTipoCom instance with id: " + id);
try {
GnpAnagOloTipoCom instance = (GnpAnagOloTipoCom) getSession().get("it.valueteam.gnp.dao.db.hb.GnpAnagOloTipoCom", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(GnpAnagOloTipoCom instance) {
log.debug("finding GnpAnagOloTipoCom instance by example");
try {
List results = getSession().createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagOloTipoCom").add(Example.create(instance)).list();
log.debug("find by example successful, result size: " + results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpAnagOloTipoCom instance with property: " + propertyName + ", value: " + value);
try {
String queryString = "from GnpAnagOloTipoCom as model where model." + propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
public List findAll() {
log.debug("finding all GnpAnagOloTipoCom instances");
try {
String queryString = "from GnpAnagOloTipoCom";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public GnpAnagOloTipoCom merge(GnpAnagOloTipoCom detachedInstance) {
log.debug("merging GnpAnagOloTipoCom instance");
try {
GnpAnagOloTipoCom result = (GnpAnagOloTipoCom) getSession().merge(detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(GnpAnagOloTipoCom instance) {
log.debug("attaching dirty GnpAnagOloTipoCom instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpAnagOloTipoCom instance) {
log.debug("attaching clean GnpAnagOloTipoCom instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
}

View File

@@ -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 9-apr-2008 17.03.57 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpAnagraficaCos" table="GNP_ANAGRAFICA_COS">
<id name="cos" type="string">
<column name="COS" length="3" />
<generator class="assigned"></generator>
</id>
<property name="wait" type="java.lang.Long">
<column name="WAIT" precision="2" scale="0" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,43 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 9-apr-2008 17.03.59 by Hibernate Tools 3.2.0.CR1
/**
* GnpAnagraficaCos generated by hbm2java
*/
public class GnpAnagraficaCos implements java.io.Serializable {
private String cos;
private Long wait;
public GnpAnagraficaCos() {
}
public GnpAnagraficaCos(String cos, Long wait) {
this.cos = cos;
this.wait = wait;
}
public String getCos() {
return this.cos;
}
public void setCos(String cos) {
this.cos = cos;
}
public Long getWait() {
return this.wait;
}
public void setWait(Long wait) {
this.wait = wait;
}
}

View File

@@ -0,0 +1,162 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 9-apr-2008 17.04.50 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpAnagraficaCos.
* @see .GnpAnagraficaCos
* @author C.A.
*/
import org.hibernate.Query;
public class GnpAnagraficaCosDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpAnagraficaCosDAO.class);
public void save(GnpAnagraficaCos transientInstance) {
log.debug("saving GnpAnagraficaCos instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpAnagraficaCos instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpAnagraficaCos model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpAnagraficaCos ");
try {
String queryString = " from GnpAnagraficaCos";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpAnagraficaCos instance) {
log.debug("attaching dirty GnpAnagraficaCos instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpAnagraficaCos instance) {
log.debug("attaching clean GnpAnagraficaCos instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpAnagraficaCos persistentInstance) {
log.debug("deleting GnpAnagraficaCos instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpAnagraficaCos merge(GnpAnagraficaCos detachedInstance) {
log.debug("merging GnpAnagraficaCos instance");
try {
GnpAnagraficaCos result = (GnpAnagraficaCos) getSession().merge(detachedInstance);
log.debug("merge successful");
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public GnpAnagraficaCos findById( java.lang.String id) {
log.debug("getting GnpAnagraficaCos instance with id: " + id);
try {
GnpAnagraficaCos instance = (GnpAnagraficaCos) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpAnagraficaCos", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpAnagraficaCos instance) {
log.debug("finding GnpAnagraficaCos instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpAnagraficaCos")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -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 19-nov-2008 11.41.45 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpBamScarti" table="GNP_BAM_SCARTI">
<id name="adbSequence" type="java.lang.Long">
<column name="ADB_SEQUENCE" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_BAM</param>
</generator>
</id>
<property name="idEsigenza" type="string">
<column name="ID_ESIGENZA" length="15" />
</property>
<property name="causaleScarto" type="string">
<column name="CAUSALE_SCARTO" />
</property>
<property name="dataRicezione" type="date">
<column name="DATA_RICEZIONE" length="7" />
</property>
<property name="processo" type="string">
<column name="PROCESSO" length="20" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,70 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 19-nov-2008 11.41.46 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpBamScarti generated by hbm2java
*/
public class GnpBamScarti implements java.io.Serializable {
private Long adbSequence;
private String idEsigenza;
private String causaleScarto;
private Date dataRicezione;
private String processo;
public GnpBamScarti() {
}
public GnpBamScarti(String idEsigenza, String causaleScarto, Date dataRicezione, String processo) {
this.idEsigenza = idEsigenza;
this.causaleScarto = causaleScarto;
this.dataRicezione = dataRicezione;
this.processo = processo;
}
public Long getAdbSequence() {
return this.adbSequence;
}
public void setAdbSequence(Long adbSequence) {
this.adbSequence = adbSequence;
}
public String getIdEsigenza() {
return this.idEsigenza;
}
public void setIdEsigenza(String idEsigenza) {
this.idEsigenza = idEsigenza;
}
public String getCausaleScarto() {
return this.causaleScarto;
}
public void setCausaleScarto(String causaleScarto) {
this.causaleScarto = causaleScarto;
}
public Date getDataRicezione() {
return this.dataRicezione;
}
public void setDataRicezione(Date dataRicezione) {
this.dataRicezione = dataRicezione;
}
public String getProcesso() {
return this.processo;
}
public void setProcesso(String processo) {
this.processo = processo;
}
}

View File

@@ -0,0 +1,186 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 19-nov-2008 11.41.59 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpBamScarti.
* @see .GnpBamScarti
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpBamScartiDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpBamScartiDAO.class);
public void save(GnpBamScarti transientInstance) {
log.debug("saving GnpBamScarti instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpBamScarti instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpBamScarti model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpBamScarti ");
try {
String queryString = " from GnpBamScarti";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpBamScarti instance) {
log.debug("attaching dirty GnpBamScarti instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpBamScarti instance) {
log.debug("attaching clean GnpBamScarti instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpBamScarti persistentInstance) {
log.debug("deleting GnpBamScarti instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpBamScarti merge(GnpBamScarti detachedInstance) {
log.debug("merging GnpBamScarti instance");
try {
GnpBamScarti result = (GnpBamScarti) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpBamScarti instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpBamScarti");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpBamScarti findById( java.lang.Long id) {
log.debug("getting GnpBamScarti instance with id: " + id);
try {
GnpBamScarti instance = (GnpBamScarti) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpBamScarti", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpBamScarti instance) {
log.debug("finding GnpBamScarti instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpBamScarti")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,44 @@
<?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-nov-2008 11.41.45 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpBamTransStato" table="GNP_BAM_TRANS_STATO">
<id name="adbSequence" type="java.lang.Long">
<column name="ADB_SEQUENCE" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_BAM</param>
</generator>
</id>
<property name="idEsigenza" type="string">
<column name="ID_ESIGENZA" length="15" />
</property>
<property name="stato" type="string">
<column name="STATO" length="20" />
</property>
<property name="dataTransStato" type="date">
<column name="DATA_TRANS_STATO" length="7" />
</property>
<property name="dac" type="date">
<column name="DAC" length="7" />
</property>
<property name="motivoRifiutoOlo" type="string">
<column name="MOTIVO_RIFIUTO_OLO" />
</property>
<property name="motivoRifiutoPitagora" type="string">
<column name="MOTIVO_RIFIUTO_PITAGORA" />
</property>
<property name="dataInvioOlo" type="date">
<column name="DATA_INVIO_OLO" length="7" />
</property>
<property name="dataRicezPicOlo" type="timestamp">
<column name="DATA_RICEZ_PIC_OLO" length="7" />
</property>
<property name="dataInvioPitagora" type="date">
<column name="DATA_INVIO_PITAGORA" length="7" />
</property>
<property name="processo" type="string">
<column name="PROCESSO" length="20" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,124 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 19-nov-2008 11.41.46 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpBamTransStato generated by hbm2java
*/
public class GnpBamTransStato implements java.io.Serializable {
private Long adbSequence;
private String idEsigenza;
private String stato;
private Date dataTransStato;
private Date dac;
private String motivoRifiutoOlo;
private String motivoRifiutoPitagora;
private Date dataInvioOlo;
private Date dataRicezPicOlo;
private Date dataInvioPitagora;
private String processo;
public GnpBamTransStato() {
}
public GnpBamTransStato(String idEsigenza, String stato, Date dataTransStato, Date dac, String motivoRifiutoOlo, String motivoRifiutoPitagora, Date dataInvioOlo, Date dataRicezPicOlo, Date dataInvioPitagora, String processo) {
this.idEsigenza = idEsigenza;
this.stato = stato;
this.dataTransStato = dataTransStato;
this.dac = dac;
this.motivoRifiutoOlo = motivoRifiutoOlo;
this.motivoRifiutoPitagora = motivoRifiutoPitagora;
this.dataInvioOlo = dataInvioOlo;
this.dataRicezPicOlo = dataRicezPicOlo;
this.dataInvioPitagora = dataInvioPitagora;
this.processo = processo;
}
public Long getAdbSequence() {
return this.adbSequence;
}
public void setAdbSequence(Long adbSequence) {
this.adbSequence = adbSequence;
}
public String getIdEsigenza() {
return this.idEsigenza;
}
public void setIdEsigenza(String idEsigenza) {
this.idEsigenza = idEsigenza;
}
public String getStato() {
return this.stato;
}
public void setStato(String stato) {
this.stato = stato;
}
public Date getDataTransStato() {
return this.dataTransStato;
}
public void setDataTransStato(Date dataTransStato) {
this.dataTransStato = dataTransStato;
}
public Date getDac() {
return this.dac;
}
public void setDac(Date dac) {
this.dac = dac;
}
public String getMotivoRifiutoOlo() {
return this.motivoRifiutoOlo;
}
public void setMotivoRifiutoOlo(String motivoRifiutoOlo) {
this.motivoRifiutoOlo = motivoRifiutoOlo;
}
public String getMotivoRifiutoPitagora() {
return this.motivoRifiutoPitagora;
}
public void setMotivoRifiutoPitagora(String motivoRifiutoPitagora) {
this.motivoRifiutoPitagora = motivoRifiutoPitagora;
}
public Date getDataInvioOlo() {
return this.dataInvioOlo;
}
public void setDataInvioOlo(Date dataInvioOlo) {
this.dataInvioOlo = dataInvioOlo;
}
public Date getDataRicezPicOlo() {
return this.dataRicezPicOlo;
}
public void setDataRicezPicOlo(Date dataRicezPicOlo) {
this.dataRicezPicOlo = dataRicezPicOlo;
}
public Date getDataInvioPitagora() {
return this.dataInvioPitagora;
}
public void setDataInvioPitagora(Date dataInvioPitagora) {
this.dataInvioPitagora = dataInvioPitagora;
}
public String getProcesso() {
return this.processo;
}
public void setProcesso(String processo) {
this.processo = processo;
}
}

View File

@@ -0,0 +1,186 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 19-nov-2008 11.41.59 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpBamTransStato.
* @see .GnpBamTransStato
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpBamTransStatoDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpBamTransStatoDAO.class);
public void save(GnpBamTransStato transientInstance) {
log.debug("saving GnpBamTransStato instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpBamTransStato instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpBamTransStato model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpBamTransStato ");
try {
String queryString = " from GnpBamTransStato";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpBamTransStato instance) {
log.debug("attaching dirty GnpBamTransStato instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpBamTransStato instance) {
log.debug("attaching clean GnpBamTransStato instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpBamTransStato persistentInstance) {
log.debug("deleting GnpBamTransStato instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpBamTransStato merge(GnpBamTransStato detachedInstance) {
log.debug("merging GnpBamTransStato instance");
try {
GnpBamTransStato result = (GnpBamTransStato) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpBamTransStato instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpBamTransStato");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpBamTransStato findById( java.lang.Long id) {
log.debug("getting GnpBamTransStato instance with id: " + id);
try {
GnpBamTransStato instance = (GnpBamTransStato) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpBamTransStato", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpBamTransStato instance) {
log.debug("finding GnpBamTransStato instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpBamTransStato")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,41 @@
<?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-dic-2016 9.47.15 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpCrmbSoapHeaderIn" table="GNP_CRMB_SOAP_HEADER_IN">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_CRMB</param>
</generator>
</id>
<property name="sourceSystem" type="string">
<column name="SOURCE_SYSTEM" length="20" />
</property>
<property name="businessId" type="string">
<column name="BUSINESS_ID" length="36" />
</property>
<property name="messageId" type="string">
<column name="MESSAGE_ID" length="36" />
</property>
<property name="transactionId" type="string">
<column name="TRANSACTION_ID" length="36" />
</property>
<property name="orderItemId" type="string">
<column name="ORDER_ITEM_ID" length="30" />
</property>
<property name="dataRicezione" type="timestamp">
<column name="DATA_RICEZIONE" length="7" />
</property>
<property name="payload" type="java.sql.Clob">
<column name="PAYLOAD" />
</property>
<property name="webServiceName" type="string">
<column name="WEB_SERVICE_NAME" length="100" />
</property>
<property name="operationName" type="string">
<column name="OPERATION_NAME" length="100" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,122 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 28-dic-2016 9.47.15 by Hibernate Tools 3.2.0.CR1
import java.sql.Clob;
import java.util.Date;
/**
* GnpCrmbSoapHeaderIn generated by hbm2java
*/
public class GnpCrmbSoapHeaderIn implements java.io.Serializable {
private Long uniqueId;
private String sourceSystem;
private String businessId;
private String messageId;
private String transactionId;
private String orderItemId;
private Date dataRicezione;
private Clob payload;
private String webServiceName;
private String operationName;
public GnpCrmbSoapHeaderIn() {
}
public GnpCrmbSoapHeaderIn(String sourceSystem, String businessId, String messageId, String transactionId, String orderItemId, Date dataRicezione, Clob payload, String webServiceName, String operationName) {
this.sourceSystem = sourceSystem;
this.businessId = businessId;
this.messageId = messageId;
this.transactionId = transactionId;
this.orderItemId = orderItemId;
this.dataRicezione = dataRicezione;
this.payload = payload;
this.webServiceName = webServiceName;
this.operationName = operationName;
}
public Long getUniqueId() {
return this.uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public String getSourceSystem() {
return this.sourceSystem;
}
public void setSourceSystem(String sourceSystem) {
this.sourceSystem = sourceSystem;
}
public String getBusinessId() {
return this.businessId;
}
public void setBusinessId(String businessId) {
this.businessId = businessId;
}
public String getMessageId() {
return this.messageId;
}
public void setMessageId(String messageId) {
this.messageId = messageId;
}
public String getTransactionId() {
return this.transactionId;
}
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
}
public String getOrderItemId() {
return this.orderItemId;
}
public void setOrderItemId(String orderItemId) {
this.orderItemId = orderItemId;
}
public Date getDataRicezione() {
return this.dataRicezione;
}
public void setDataRicezione(Date dataRicezione) {
this.dataRicezione = dataRicezione;
}
public Clob getPayload() {
return this.payload;
}
public void setPayload(Clob payload) {
this.payload = payload;
}
public String getWebServiceName() {
return this.webServiceName;
}
public void setWebServiceName(String webServiceName) {
this.webServiceName = webServiceName;
}
public String getOperationName() {
return this.operationName;
}
public void setOperationName(String operationName) {
this.operationName = operationName;
}
@Override
public String toString() {
return "GnpCrmbSoapHeaderIn [uniqueId=" + uniqueId + ", sourceSystem=" + sourceSystem + ", businessId="
+ businessId + ", messageId=" + messageId + ", transactionId=" + transactionId + ", orderItemId="
+ orderItemId + ", dataRicezione=" + dataRicezione + ", payload=" + payload + ", webServiceName="
+ webServiceName + ", operationName=" + operationName + "]";
}
}

View File

@@ -0,0 +1,187 @@
package it.valueteam.gnp.dao.db.hb;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import java.util.List;
import static org.hibernate.criterion.Example.create;
/**
* DAO object for domain model class GnpCrmbSoapHeaderIn.
*
* @author C.A.
* @see .GnpCrmbSoapHeaderIn
*/
public class GnpCrmbSoapHeaderInDAO extends BaseHibernateDAO {
protected static final Log log = LogFactory.getLog(GnpCrmbSoapHeaderInDAO.class);
public static final String HIB_PROP_ORDER_ITEM_ID = "orderItemId";
public static final String HIB_PROP_DATA_RICEZIONE = "dataRicezione";
public void save(GnpCrmbSoapHeaderIn transientInstance) {
log.debug("saving GnpCrmbSoapHeaderIn instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpCrmbSoapHeaderIn instance with property: " + propertyName + ", value: " + value);
try {
String queryString = "select model from GnpCrmbSoapHeaderIn model where model." + propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
} finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpCrmbSoapHeaderIn ");
try {
String queryString = " from GnpCrmbSoapHeaderIn";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
} finally {
closeSession();
}
}
public void attachDirty(GnpCrmbSoapHeaderIn instance) {
log.debug("attaching dirty GnpCrmbSoapHeaderIn instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpCrmbSoapHeaderIn instance) {
log.debug("attaching clean GnpCrmbSoapHeaderIn instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpCrmbSoapHeaderIn persistentInstance) {
log.debug("deleting GnpCrmbSoapHeaderIn instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpCrmbSoapHeaderIn merge(GnpCrmbSoapHeaderIn detachedInstance) {
log.debug("merging GnpCrmbSoapHeaderIn instance");
try {
GnpCrmbSoapHeaderIn result = (GnpCrmbSoapHeaderIn) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpCrmbSoapHeaderIn instance by criteria");
try {
Criteria crit = getSession().createCriteria("it.valueteam.gnp.dao.db.hb.GnpCrmbSoapHeaderIn");
for (Object aCriterion : criterion) {
crit.add((Criterion) aCriterion);
}
List results = crit.list();
log.debug("find by criteria successful, result size: " + results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpCrmbSoapHeaderIn findById(Long id) {
log.debug("getting GnpCrmbSoapHeaderIn instance with id: " + id);
try {
GnpCrmbSoapHeaderIn instance = (GnpCrmbSoapHeaderIn) getSession().get("it.valueteam.gnp.dao.db.hb.GnpCrmbSoapHeaderIn", id);
if (instance == null) {
log.debug("get successful, no instance found");
} else {
log.debug("get successful, instance found");
}
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
} finally {
closeSession();
}
}
public List<GnpCrmbSoapHeaderIn> findByExample(GnpCrmbSoapHeaderIn instance) {
log.debug("finding GnpCrmbSoapHeaderIn instance by example");
try {
List<GnpCrmbSoapHeaderIn> results = (List<GnpCrmbSoapHeaderIn>) getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpCrmbSoapHeaderIn")
.add(create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
} finally {
closeSession();
}
}
//SM_423
public List<GnpCrmbSoapHeaderIn> getLastOrderItemId(String orderItemId) {
log.info("find GnpCrmbSoapHeaderIn by orderItemId "+orderItemId);
try {
Criteria crit = getSession().createCriteria("it.valueteam.gnp.dao.db.hb.GnpCrmbSoapHeaderIn");
crit.add(Restrictions.eq(GnpCrmbSoapHeaderInDAO.HIB_PROP_ORDER_ITEM_ID, orderItemId));
crit.addOrder(Order.desc(GnpCrmbSoapHeaderInDAO.HIB_PROP_DATA_RICEZIONE));
return crit.list();
} catch (RuntimeException re) {
log.error("getLastCodiceOrdine failed", re);
throw re;
} finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse Persistence Tools
-->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpCsNpg103CodMotivoRif" table="GNP_CS_NPG103_COD_MOTIVO_RIF">
<id name="progId" type="java.lang.Long">
<column name="PROG_ID" precision="2" scale="0" />
<generator class="assigned" />
</id>
<property name="codice" type="java.lang.Long">
<column name="CODICE" precision="2" scale="0" not-null="true" />
</property>
<property name="descrizione" type="java.lang.String">
<column name="DESCRIZIONE" length="200" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,77 @@
package it.valueteam.gnp.dao.db.hb;
import java.util.HashSet;
import java.util.Set;
/**
* GnpAnagOloCodMotivoRif generated by MyEclipse Persistence Tools
*/
public class GnpCsNpg103CodMotivoRif implements java.io.Serializable {
// Fields
private Long progId;
private Long codice;
private String descrizione;
private Set gnpCsNpg103CausaleRifiutos = new HashSet(0);
// Constructors
/** default constructor */
public GnpCsNpg103CodMotivoRif() {
}
/** minimal constructor */
public GnpCsNpg103CodMotivoRif(Long progId, Long codice, String descrizione) {
this.progId = progId;
this.codice = codice;
this.descrizione = descrizione;
}
/** full constructor */
public GnpCsNpg103CodMotivoRif(Long progId, Long codice, String descrizione, Set gnpAnagOloCausaleRifiutos) {
this.progId = progId;
this.codice = codice;
this.descrizione = descrizione;
this.gnpCsNpg103CausaleRifiutos = gnpAnagOloCausaleRifiutos;
}
// Property accessors
public Long getProgId() {
return this.progId;
}
public void setProgId(Long progId) {
this.progId = progId;
}
public Long getCodice() {
return this.codice;
}
public void setCodice(Long codice) {
this.codice = codice;
}
public String getDescrizione() {
return this.descrizione;
}
public void setDescrizione(String descrizione) {
this.descrizione = descrizione;
}
public Set getGnpCsNpg103CausaleRifiutos() {
return this.gnpCsNpg103CausaleRifiutos;
}
public void setGnpCsNpg103CausaleRifiutos(Set gnpCsNpg103CausaleRifiutos) {
this.gnpCsNpg103CausaleRifiutos = gnpCsNpg103CausaleRifiutos;
}
}

View File

@@ -0,0 +1,124 @@
package it.valueteam.gnp.dao.db.hb;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
import java.util.List;
/**
* Data access object (DAO) for domain model class GnpCsNpg103CodMotivoRif.
*
* @see GnpCsNpg103CodMotivoRif
* @author MyEclipse Persistence Tools
*/
public class GnpCsNpg103CodMotivoRifDAO extends BaseHibernateDAO {
private static final Log log = LogFactory.getLog(GnpCsNpg103CodMotivoRifDAO.class);
public void save(GnpCsNpg103CodMotivoRif transientInstance) {
log.debug("saving GnpCsNpg103CodMotivoRif instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
} catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public void delete(GnpCsNpg103CodMotivoRif persistentInstance) {
log.debug("deleting GnpCsNpg103CodMotivoRif instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
} catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpCsNpg103CodMotivoRif findById(Long id) {
log.debug("getting GnpAnagOloCodMotivoRif instance with id: " + id);
try {
GnpCsNpg103CodMotivoRif instance = (GnpCsNpg103CodMotivoRif) getSession().get("it.valueteam.gnp.dao.db.hb.GnpCsNpg103CodMotivoRif", id);
return instance;
} catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
}
public List findByExample(GnpCsNpg103CodMotivoRif instance) {
log.debug("finding GnpCsNpg103CodMotivoRif instance by example");
try {
List results = getSession().createCriteria("it.valueteam.gnp.dao.db.hb.GnpCsNpg103CodMotivoRif").add(Example.create(instance)).list();
log.debug("find by example successful, result size: " + results.size());
return results;
} catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpCsNpg103CodMotivoRif instance with property: " + propertyName + ", value: " + value);
try {
String queryString = "from GnpCsNpg103CodMotivoRif as model where model." + propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
}
public List findAll() {
log.debug("finding all GnpCsNpg103CodMotivoRif instances");
try {
String queryString = "from GnpCsNpg103CodMotivoRif";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all failed", re);
throw re;
}
}
public GnpCsNpg103CodMotivoRif merge(GnpCsNpg103CodMotivoRif detachedInstance) {
log.debug("merging GnpCsNpg103CodMotivoRif instance");
try {
GnpCsNpg103CodMotivoRif result = (GnpCsNpg103CodMotivoRif) getSession().merge(detachedInstance);
log.debug("merge successful");
return result;
} catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public void attachDirty(GnpCsNpg103CodMotivoRif instance) {
log.debug("attaching dirty GnpCsNpg103CodMotivoRif instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpCsNpg103CodMotivoRif instance) {
log.debug("attaching clean GnpCsNpg103CodMotivoRif instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
} catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
}

View File

@@ -0,0 +1,83 @@
<?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-set-2017 17.56.39 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbcfxgoInNng103" table="GNP_DBCFXGO_IN_NNG103">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_DBCFXGO</param>
</generator>
</id>
<property name="daScodare" type="java.lang.Long">
<column name="DA_SCODARE" precision="22" scale="0" not-null="true" />
</property>
<property name="idRichiesta" type="java.lang.Long">
<column name="ID_RICHIESTA" precision="22" scale="0" not-null="true" />
</property>
<property name="processo" type="string">
<column name="PROCESSO" length="25" not-null="true" />
</property>
<property name="stato" type="java.lang.Long">
<column name="STATO_ORDINE" precision="2" />
</property>
<property name="tipoComunicazione" type="java.lang.Long">
<column name="TIPO_COMUNICAZIONE" precision="2" />
</property>
<property name="tipoServizio" type="java.lang.Long">
<column name="TIPO_SERVIZIO" precision="2" />
</property>
<property name="idEsigenza" type="string">
<column name="ID_ESIGENZA" length="15" />
</property>
<property name="nng" type="string">
<column name="NNG" length="12" not-null="true" />
</property>
<property name="cow" type="string">
<column name="COW" length="3" />
</property>
<property name="codOperatore" type="string">
<column name="COD_OPERATORE" length="3" />
</property>
<property name="cor" type="string">
<column name="COR" length="3" />
</property>
<property name="codFiscale" type="string">
<column name="COD_FISCALE" length="16" />
</property>
<property name="partitaIva" type="string">
<column name="PARTITA_IVA" length="11" />
</property>
<property name="dataOrdine" type="date">
<column name="DATA_ORDINE" length="7" />
</property>
<property name="nomeFileFenp" type="string">
<column name="NOME_FILE_FENP" length="50" />
</property>
<property name="dataRicezioneRichiesta" type="date">
<column name="DATA_RICEZIONE_RICHIESTA" length="7" />
</property>
<property name="dataEspletamento" type="date">
<column name="DATA_ESPLETAMENTO" length="7" />
</property>
<property name="codiceRifiutoFenp" type="java.lang.Long">
<column name="CODICE_RIFIUTO" precision="2" />
</property>
<property name="causaleRifiutoFenp" type="string">
<column name="CAUSALE_RIFIUTO" length="100" />
</property>
<property name="dac" type="date">
<column name="DAC" length="7" />
</property>
<property name="rdac" type="date">
<column name="RDAC" length="7" />
</property>
<property name="codiceProgetto" type="string">
<column name="CODICE_PROGETTO" length="18" />
</property>
<property name="codiceOrdine" type="string">
<column name="CODICE_ORDINE" length="18" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,234 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 29-set-2017 17.56.39 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpDbcfxgoInNng103 generated by hbm2java
*/
public class GnpDbcfxgoInNng103 implements java.io.Serializable {
private Long uniqueId;
private Long daScodare;
private Long idRichiesta;
private String processo;
private Long stato;
private String idEsigenza;
private String nng;
private String cow;
private String codOperatore;
private String cor;
private String codFiscale;
private String partitaIva;
private Date dataOrdine;
private Date dataRicezioneRichiesta;
private Date dataEspletamento;
private String nomeFileFenp;
private Long codiceRifiutoFenp;
private String causaleRifiutoFenp;
private Date dac;
private Date rdac;
private String codiceProgetto;
private String codiceOrdine;
private Long tipoServizio;
private Long tipoComunicazione;
public GnpDbcfxgoInNng103() {
}
public Long getUniqueId() {
return uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public Long getDaScodare() {
return daScodare;
}
public void setDaScodare(Long daScodare) {
this.daScodare = daScodare;
}
public Long getIdRichiesta() {
return idRichiesta;
}
public void setIdRichiesta(Long idRichiesta) {
this.idRichiesta = idRichiesta;
}
public String getProcesso() {
return processo;
}
public void setProcesso(String processo) {
this.processo = processo;
}
public Long getStato() {
return stato;
}
public void setStato(Long stato) {
this.stato = stato;
}
public String getIdEsigenza() {
return idEsigenza;
}
public void setIdEsigenza(String idEsigenza) {
this.idEsigenza = idEsigenza;
}
public String getNng() {
return nng;
}
public void setNng(String nng) {
this.nng = nng;
}
public String getCow() {
return cow;
}
public void setCow(String cow) {
this.cow = cow;
}
public String getCor() {
return cor;
}
public void setCor(String cor) {
this.cor = cor;
}
public String getCodFiscale() {
return codFiscale;
}
public void setCodFiscale(String codFiscale) {
this.codFiscale = codFiscale;
}
public String getPartitaIva() {
return partitaIva;
}
public void setPartitaIva(String partitaIva) {
this.partitaIva = partitaIva;
}
public Date getDataOrdine() {
return dataOrdine;
}
public void setDataOrdine(Date dataOrdine) {
this.dataOrdine = dataOrdine;
}
public Date getDataRicezioneRichiesta() {
return dataRicezioneRichiesta;
}
public void setDataRicezioneRichiesta(Date dataRicezioneRichiesta) {
this.dataRicezioneRichiesta = dataRicezioneRichiesta;
}
public Date getDataEspletamento() {
return dataEspletamento;
}
public void setDataEspletamento(Date dataEspletamento) {
this.dataEspletamento = dataEspletamento;
}
public String getNomeFileFenp() {
return nomeFileFenp;
}
public void setNomeFileFenp(String nomeFileFenp) {
this.nomeFileFenp = nomeFileFenp;
}
public Long getCodiceRifiutoFenp() {
return codiceRifiutoFenp;
}
public void setCodiceRifiutoFenp(Long codiceRifiutoFenp) {
this.codiceRifiutoFenp = codiceRifiutoFenp;
}
public String getCausaleRifiutoFenp() {
return causaleRifiutoFenp;
}
public void setCausaleRifiutoFenp(String causaleRifiutoFenp) {
this.causaleRifiutoFenp = causaleRifiutoFenp;
}
public Date getDac() {
return dac;
}
public void setDac(Date dac) {
this.dac = dac;
}
public Date getRdac() {
return rdac;
}
public void setRdac(Date rdac) {
this.rdac = rdac;
}
public String getCodiceProgetto() {
return codiceProgetto;
}
public void setCodiceProgetto(String codiceProgetto) {
this.codiceProgetto = codiceProgetto;
}
public String getCodiceOrdine() {
return codiceOrdine;
}
public void setCodiceOrdine(String codiceOrdine) {
this.codiceOrdine = codiceOrdine;
}
public Long getTipoServizio() {
return tipoServizio;
}
public void setTipoServizio(Long tipoServizio) {
this.tipoServizio = tipoServizio;
}
public Long getTipoComunicazione() {
return tipoComunicazione;
}
public void setTipoComunicazione(Long tipoComunicazione) {
this.tipoComunicazione = tipoComunicazione;
}
public String getCodOperatore() {
return codOperatore;
}
public void setCodOperatore(String codOperatore) {
this.codOperatore = codOperatore;
}
}

View File

@@ -0,0 +1,188 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 27-mag-2011 14.25.47 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Example;
import java.util.Iterator;
import java.util.List;
/**
* DAO object for domain model class GnpDbcfxgoInNng103.
*
* @author C.A.
* @see .GnpDbcfxgoInNng103
*/
public class GnpDbcfxgoInNng103DAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbcfxgoInNng103DAO.class);
public void save(GnpDbcfxgoInNng103 transientInstance) {
log.debug("saving GnpDbcfxgoInNng103 instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbcfxgoInNng103 instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbcfxgoInNng103 model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbcfxgoInNng103 ");
try {
String queryString = " from GnpDbcfxgoInNng103";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbcfxgoInNng103 instance) {
log.debug("attaching dirty GnpDbcfxgoInNng103 instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbcfxgoInNng103 instance) {
log.debug("attaching clean GnpDbcfxgoInNng103 instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbcfxgoInNng103 persistentInstance) {
log.debug("deleting GnpDbcfxgoInNng103 instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbcfxgoInNng103 merge(GnpDbcfxgoInNng103 detachedInstance) {
log.debug("merging GnpDbcfxgoInNng103 instance");
try {
GnpDbcfxgoInNng103 result = (GnpDbcfxgoInNng103) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbcfxgoInNng103 instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoInNng103");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbcfxgoInNng103 findById( Long id) {
log.debug("getting GnpDbcfxgoInNng103 instance with id: " + id);
try {
GnpDbcfxgoInNng103 instance = (GnpDbcfxgoInNng103) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoInNng103", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbcfxgoInNng103 instance) {
log.debug("finding GnpDbcfxgoInNng103 instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoInNng103")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,116 @@
<?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-set-2017 17.56.39 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutDel82" table="GNP_DBCFXGO_OUT_DEL82">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_DBCFXGO</param>
</generator>
</id>
<property name="dataCreazione" type="timestamp">
<column name="DATA_CREAZIONE" length="7" />
</property>
<property name="daScodare" type="java.lang.Long">
<column name="DA_SCODARE" precision="22" scale="0" not-null="true" />
</property>
<property name="idRichiesta" type="java.lang.Long">
<column name="ID_RICHIESTA" precision="22" scale="0" not-null="true" />
</property>
<property name="stato" type="java.lang.Long">
<column name="STATO" precision="22" scale="0" not-null="true" />
</property>
<property name="piattaformaCrm" type="string">
<column name="PIATTAFORMA_CRM" length="1" />
</property>
<property name="numeroTelefono" type="string">
<column name="NUMERO_TELEFONO" length="12" />
</property>
<property name="tipoComunicazione" type="string">
<column name="TIPO_COMUNICAZIONE" length="4" />
</property>
<property name="opRecipient" type="string">
<column name="OP_RECIPIENT" length="3" />
</property>
<property name="codiceOrdineRecipient" type="string">
<column name="CODICE_ORDINE_RECIPIENT" length="18" />
</property>
<property name="codiceOrdineWhs" type="string">
<column name="CODICE_ORDINE_WHS" length="18" />
</property>
<property name="cow" type="string">
<column name="COW" length="3"/>
</property>
<property name="cos" type="string">
<column name="COS" length="3" />
</property>
<property name="cor" type="string">
<column name="COR" length="12" />
</property>
<property name="codFiscalePIva" type="string">
<column name="COD_FISCALE_P_IVA" length="16"/>
</property>
<property name="dataNotifica" type="date">
<column name="DATA_NOTIFICA" length="7" />
</property>
<property name="nomeFile" type="string">
<column name="NOME_FILE" length="50" />
</property>
<property name="dn1" type="string">
<column name="DN1" length="12" />
</property>
<property name="dn2" type="string">
<column name="DN2" length="12" />
</property>
<property name="dn3" type="string">
<column name="DN3" length="12" />
</property>
<property name="dn4" type="string">
<column name="DN4" length="12" />
</property>
<property name="dn5" type="string">
<column name="DN5" length="12" />
</property>
<property name="dn6" type="string">
<column name="DN6" length="12" />
</property>
<property name="dn7" type="string">
<column name="DN7" length="12" />
</property>
<property name="dn8" type="string">
<column name="DN8" length="12" />
</property>
<property name="dn9" type="string">
<column name="DN9" length="12" />
</property>
<property name="dn10" type="string">
<column name="DN10" length="12" />
</property>
<property name="codiceRifiuto" type="string">
<column name="CODICE_MOTIVO_RIFIUTO" length="4" />
</property>
<property name="causaleRifiuto" type="string">
<column name="CAUSALE_RIFIUTO" />
</property>
<property name="codiceSessione" type="string">
<column name="CODICE_SESSIONE" length="50" />
</property>
<property name="dataScadenza" type="date">
<column name="DATA_SCADENZA" length="7" />
</property>
<property name="dac" type="date">
<column name="DAC" length="7" />
</property>
<property name="des" type="date">
<column name="DATA_ESPLETAMENTO" length="7" />
</property>
<property name="idNotificaNow" type="string">
<column name="ID_NOTIFICA_FASE3" />
</property>
<property name="tipoEventoFase3" type="string">
<column name="TIPO_EVENTO_FASE3" length="20" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,332 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 29-set-2017 17.56.39 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpDbcfxgoOutDel82 generated by hbm2java
*/
public class GnpDbcfxgoOutDel82 implements java.io.Serializable {
private Long uniqueId;
private Date dataCreazione;
private Long daScodare;
private Long idRichiesta; //richiesteD82
private Long stato; //0 OK, 1 KO
private String codiceOrdineRecipient;
private String codiceOrdineWhs;
private String tipoComunicazione;
private String piattaformaCrm;
private String numeroTelefono; //dn
private String opRecipient; //olo_recipient
private String cow; //cowDonating
private String cos; //codServizio
private String cor; //cor
private String codFiscalePIva; //cod_fiscale_piva
private Date dataNotifica; //dataRicezione //dataInvio //dataInvioKO
private String nomeFile;
private String dn1;
private String dn2;
private String dn3;
private String dn4;
private String dn5;
private String dn6;
private String dn7;
private String dn8;
private String dn9;
private String dn10;
private Long codiceRifiuto;
private String causaleRifiuto;
private String codiceSessione;
private Date dataScadenza;
private String tipoEventoFase3;
private String idNotificaNow;
private Date dac;
private Date des;
public GnpDbcfxgoOutDel82() {
}
public Date getDataCreazione() {
return dataCreazione;
}
public void setDataCreazione(Date dataCreazione) {
this.dataCreazione = dataCreazione;
}
public Long getUniqueId() {
return uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public Long getDaScodare() {
return daScodare;
}
public void setDaScodare(Long daScodare) {
this.daScodare = daScodare;
}
public Long getIdRichiesta() {
return idRichiesta;
}
public void setIdRichiesta(Long idRichiesta) {
this.idRichiesta = idRichiesta;
}
public Long getStato() {
return stato;
}
public void setStato(Long stato) {
this.stato = stato;
}
public String getCodiceOrdineRecipient() {
return codiceOrdineRecipient;
}
public void setCodiceOrdineRecipient(String codiceOrdineRecipient) {
this.codiceOrdineRecipient = codiceOrdineRecipient;
}
public String getCodiceOrdineWhs() {
return codiceOrdineWhs;
}
public void setCodiceOrdineWhs(String codiceOrdineWhs) {
this.codiceOrdineWhs = codiceOrdineWhs;
}
public String getTipoComunicazione() {
return tipoComunicazione;
}
public void setTipoComunicazione(String tipoComunicazione) {
this.tipoComunicazione = tipoComunicazione;
}
public String getPiattaformaCrm() {
return piattaformaCrm;
}
public void setPiattaformaCrm(String piattaformaCrm) {
this.piattaformaCrm = piattaformaCrm;
}
public String getNumeroTelefono() {
return numeroTelefono;
}
public void setNumeroTelefono(String numeroTelefono) {
this.numeroTelefono = numeroTelefono;
}
public String getOpRecipient() {
return opRecipient;
}
public void setOpRecipient(String opRecipient) {
this.opRecipient = opRecipient;
}
public String getCow() {
return cow;
}
public void setCow(String cow) {
this.cow = cow;
}
public String getCos() {
return cos;
}
public void setCos(String cos) {
this.cos = cos;
}
public String getCor() {
return cor;
}
public void setCor(String cor) {
this.cor = cor;
}
public String getCodFiscalePIva() {
return codFiscalePIva;
}
public void setCodFiscalePIva(String codFiscalePIva) {
this.codFiscalePIva = codFiscalePIva;
}
public Date getDataNotifica() {
return dataNotifica;
}
public void setDataNotifica(Date dataNotifica) {
this.dataNotifica = dataNotifica;
}
public String getNomeFile() {
return nomeFile;
}
public void setNomeFile(String nomeFile) {
this.nomeFile = nomeFile;
}
public String getDn1() {
return dn1;
}
public void setDn1(String dn1) {
this.dn1 = dn1;
}
public String getDn2() {
return dn2;
}
public void setDn2(String dn2) {
this.dn2 = dn2;
}
public String getDn3() {
return dn3;
}
public void setDn3(String dn3) {
this.dn3 = dn3;
}
public String getDn4() {
return dn4;
}
public void setDn4(String dn4) {
this.dn4 = dn4;
}
public String getDn5() {
return dn5;
}
public void setDn5(String dn5) {
this.dn5 = dn5;
}
public String getDn6() {
return dn6;
}
public void setDn6(String dn6) {
this.dn6 = dn6;
}
public String getDn7() {
return dn7;
}
public void setDn7(String dn7) {
this.dn7 = dn7;
}
public String getDn8() {
return dn8;
}
public void setDn8(String dn8) {
this.dn8 = dn8;
}
public String getDn9() {
return dn9;
}
public void setDn9(String dn9) {
this.dn9 = dn9;
}
public String getDn10() {
return dn10;
}
public void setDn10(String dn10) {
this.dn10 = dn10;
}
public Long getCodiceRifiuto() {
return codiceRifiuto;
}
public void setCodiceRifiuto(Long codiceRifiuto) {
this.codiceRifiuto = codiceRifiuto;
}
public String getCausaleRifiuto() {
return causaleRifiuto;
}
public void setCausaleRifiuto(String causaleRifiuto) {
this.causaleRifiuto = causaleRifiuto;
}
public String getCodiceSessione() {
return codiceSessione;
}
public void setCodiceSessione(String codiceSessione) {
this.codiceSessione = codiceSessione;
}
public Date getDataScadenza() {
return dataScadenza;
}
public void setDataScadenza(Date dataScadenza) {
this.dataScadenza = dataScadenza;
}
public String getTipoEventoFase3() {
return tipoEventoFase3;
}
public void setTipoEventoFase3(String tipoEventoFase3) {
this.tipoEventoFase3 = tipoEventoFase3;
}
public String getIdNotificaNow() {
return idNotificaNow;
}
public void setIdNotificaNow(String idNotificaNow) {
this.idNotificaNow = idNotificaNow;
}
public Date getDac() {
return dac;
}
public void setDac(Date dac) {
this.dac = dac;
}
public Date getDes() {
return des;
}
public void setDes(Date des) {
this.des = des;
}
}

View File

@@ -0,0 +1,188 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 27-mag-2011 14.25.47 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Example;
import java.util.Iterator;
import java.util.List;
/**
* DAO object for domain model class GnpDbcfxgoOutDel82.
*
* @author C.A.
* @see .GnpDbcfxgoOutDel82
*/
public class GnpDbcfxgoOutDel82DAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbcfxgoOutDel82DAO.class);
public void save(GnpDbcfxgoOutDel82 transientInstance) {
log.debug("saving GnpDbcfxgoOutDel82 instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbcfxgoOutDel82 instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbcfxgoOutDel82 model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbcfxgoOutDel82 ");
try {
String queryString = " from GnpDbcfxgoOutDel82";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbcfxgoOutDel82 instance) {
log.debug("attaching dirty GnpDbcfxgoOutDel82 instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbcfxgoOutDel82 instance) {
log.debug("attaching clean GnpDbcfxgoOutDel82 instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbcfxgoOutDel82 persistentInstance) {
log.debug("deleting GnpDbcfxgoOutDel82 instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbcfxgoOutDel82 merge(GnpDbcfxgoOutDel82 detachedInstance) {
log.debug("merging GnpDbcfxgoOutDel82 instance");
try {
GnpDbcfxgoOutDel82 result = (GnpDbcfxgoOutDel82) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbcfxgoOutDel82 instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutDel82");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbcfxgoOutDel82 findById( Long id) {
log.debug("getting GnpDbcfxgoOutDel82 instance with id: " + id);
try {
GnpDbcfxgoOutDel82 instance = (GnpDbcfxgoOutDel82) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutDel82", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbcfxgoOutDel82 instance) {
log.debug("finding GnpDbcfxgoOutDel82 instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutDel82")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,83 @@
<?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-set-2017 17.56.39 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNng103" table="GNP_DBCFXGO_OUT_NNG103">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_DBCFXGO</param>
</generator>
</id>
<property name="daScodare" type="java.lang.Long">
<column name="DA_SCODARE" precision="22" scale="0" not-null="true" />
</property>
<property name="idRichiesta" type="java.lang.Long">
<column name="ID_RICHIESTA" precision="22" scale="0" not-null="true" />
</property>
<property name="processo" type="string">
<column name="PROCESSO" length="25" not-null="true" />
</property>
<property name="stato" type="java.lang.Long">
<column name="STATO_ORDINE" precision="22" />
</property>
<property name="tipoComunicazione" type="java.lang.Long">
<column name="TIPO_COMUNICAZIONE" precision="22" />
</property>
<property name="tipoServizio" type="java.lang.Long">
<column name="TIPO_SERVIZIO" precision="22" />
</property>
<property name="idEsigenza" type="string">
<column name="ID_ESIGENZA" precision="15" />
</property>
<property name="nng" type="string">
<column name="NNG" length="12" not-null="true" />
</property>
<property name="cow" type="string">
<column name="COW" length="3" />
</property>
<property name="codOperatore" type="string">
<column name="COD_OPERATORE" length="3" />
</property>
<property name="cor" type="string">
<column name="COR" length="12" />
</property>
<property name="codFiscale" type="string">
<column name="COD_FISCALE" length="16" />
</property>
<property name="partitaIva" type="string">
<column name="PARTITA_IVA" length="11" />
</property>
<property name="dataOrdine" type="date">
<column name="DATA_ORDINE" length="7" />
</property>
<property name="nomeFileFenp" type="string">
<column name="NOME_FILE_FENP" length="50" />
</property>
<property name="dataRicezioneRichiesta" type="date">
<column name="DATA_RICEZIONE_RICHIESTA" length="7" />
</property>
<property name="dataEspletamento" type="date">
<column name="DATA_ESPLETAMENTO" length="7" />
</property>
<property name="codiceRifiutoFenp" type="java.lang.Long">
<column name="CODICE_RIFIUTO_FENP" precision="2" />
</property>
<property name="causaleRifiutoFenp" type="string">
<column name="CAUSALE_RIFIUTO_FENP" length="100" />
</property>
<property name="dac" type="date">
<column name="DAC" length="7" />
</property>
<property name="rdac" type="date">
<column name="RDAC" length="7" />
</property>
<property name="codiceProgetto" type="string">
<column name="CODICE_PROGETTO" length="18" />
</property>
<property name="codiceOrdine" type="string">
<column name="CODICE_ORDINE" length="18" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,234 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 29-set-2017 17.56.39 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpDbcfxgoOutNpg35 generated by hbm2java
*/
public class GnpDbcfxgoOutNng103 implements java.io.Serializable {
private Long uniqueId;
private Long daScodare;
private Long idRichiesta;
private String processo;
private Long stato;
private String idEsigenza;
private String nng;
private String cow;
private String cor;
private String codOperatore;
private String codFiscale;
private String partitaIva;
private Date dataOrdine;
private Date dataRicezioneRichiesta;
private Date dataEspletamento;
private String nomeFileFenp;
private Long codiceRifiutoFenp;
private String causaleRifiutoFenp;
private Date dac;
private Date rdac;
private String codiceProgetto;
private String codiceOrdine;
private Long tipoServizio;
private Long tipoComunicazione;
public GnpDbcfxgoOutNng103() {
}
public Long getUniqueId() {
return uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public Long getDaScodare() {
return daScodare;
}
public void setDaScodare(Long daScodare) {
this.daScodare = daScodare;
}
public Long getIdRichiesta() {
return idRichiesta;
}
public void setIdRichiesta(Long idRichiesta) {
this.idRichiesta = idRichiesta;
}
public String getProcesso() {
return processo;
}
public void setProcesso(String processo) {
this.processo = processo;
}
public Long getStato() {
return stato;
}
public void setStato(Long stato) {
this.stato = stato;
}
public String getIdEsigenza() {
return idEsigenza;
}
public void setIdEsigenza(String idEsigenza) {
this.idEsigenza = idEsigenza;
}
public String getNng() {
return nng;
}
public void setNng(String nng) {
this.nng = nng;
}
public String getCow() {
return cow;
}
public void setCow(String cow) {
this.cow = cow;
}
public String getCor() {
return cor;
}
public void setCor(String cor) {
this.cor = cor;
}
public String getCodFiscale() {
return codFiscale;
}
public void setCodFiscale(String codFiscale) {
this.codFiscale = codFiscale;
}
public String getPartitaIva() {
return partitaIva;
}
public void setPartitaIva(String partitaIva) {
this.partitaIva = partitaIva;
}
public Date getDataOrdine() {
return dataOrdine;
}
public void setDataOrdine(Date dataOrdine) {
this.dataOrdine = dataOrdine;
}
public Date getDataRicezioneRichiesta() {
return dataRicezioneRichiesta;
}
public void setDataRicezioneRichiesta(Date dataRicezioneRichiesta) {
this.dataRicezioneRichiesta = dataRicezioneRichiesta;
}
public Date getDataEspletamento() {
return dataEspletamento;
}
public void setDataEspletamento(Date dataEspletamento) {
this.dataEspletamento = dataEspletamento;
}
public String getNomeFileFenp() {
return nomeFileFenp;
}
public void setNomeFileFenp(String nomeFileFenp) {
this.nomeFileFenp = nomeFileFenp;
}
public Long getCodiceRifiutoFenp() {
return codiceRifiutoFenp;
}
public void setCodiceRifiutoFenp(Long codiceRifiutoFenp) {
this.codiceRifiutoFenp = codiceRifiutoFenp;
}
public String getCausaleRifiutoFenp() {
return causaleRifiutoFenp;
}
public void setCausaleRifiutoFenp(String causaleRifiutoFenp) {
this.causaleRifiutoFenp = causaleRifiutoFenp;
}
public Date getDac() {
return dac;
}
public void setDac(Date dac) {
this.dac = dac;
}
public Date getRdac() {
return rdac;
}
public void setRdac(Date rdac) {
this.rdac = rdac;
}
public String getCodiceProgetto() {
return codiceProgetto;
}
public void setCodiceProgetto(String codiceProgetto) {
this.codiceProgetto = codiceProgetto;
}
public String getCodiceOrdine() {
return codiceOrdine;
}
public void setCodiceOrdine(String codiceOrdine) {
this.codiceOrdine = codiceOrdine;
}
public Long getTipoServizio() {
return tipoServizio;
}
public void setTipoServizio(Long tipoServizio) {
this.tipoServizio = tipoServizio;
}
public Long getTipoComunicazione() {
return tipoComunicazione;
}
public void setTipoComunicazione(Long tipoComunicazione) {
this.tipoComunicazione = tipoComunicazione;
}
public String getCodOperatore() {
return codOperatore;
}
public void setCodOperatore(String codOperatore) {
this.codOperatore = codOperatore;
}
}

View File

@@ -0,0 +1,188 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 27-mag-2011 14.25.47 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Example;
import java.util.Iterator;
import java.util.List;
/**
* DAO object for domain model class GnpDbcfxgoOutNng103.
*
* @author C.A.
* @see .GnpDbcfxgoOutNng103
*/
public class GnpDbcfxgoOutNng103DAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbcfxgoOutNng103DAO.class);
public void save(GnpDbcfxgoOutNng103 transientInstance) {
log.debug("saving GnpDbcfxgoOutNng103 instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbcfxgoOutNng103 instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbcfxgoOutNng103 model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbcfxgoOutNng103 ");
try {
String queryString = " from GnpDbcfxgoOutNng103";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbcfxgoOutNng103 instance) {
log.debug("attaching dirty GnpDbcfxgoOutNng103 instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbcfxgoOutNng103 instance) {
log.debug("attaching clean GnpDbcfxgoOutNng103 instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbcfxgoOutNng103 persistentInstance) {
log.debug("deleting GnpDbcfxgoOutNng103 instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbcfxgoOutNng103 merge(GnpDbcfxgoOutNng103 detachedInstance) {
log.debug("merging GnpDbcfxgoOutNng103 instance");
try {
GnpDbcfxgoOutNng103 result = (GnpDbcfxgoOutNng103) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbcfxgoOutNng103 instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNng103");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbcfxgoOutNng103 findById( Long id) {
log.debug("getting GnpDbcfxgoOutNng103 instance with id: " + id);
try {
GnpDbcfxgoOutNng103 instance = (GnpDbcfxgoOutNng103) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNng103", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbcfxgoOutNng103 instance) {
log.debug("finding GnpDbcfxgoOutNng103 instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNng103")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,175 @@
<?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-set-2017 17.56.39 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNpg103" table="GNP_DBCFXGO_OUT_NPG103">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_DBCFXGO</param>
</generator>
</id>
<property name="daScodare" type="java.lang.Long">
<column name="DA_SCODARE" precision="22" scale="0" not-null="true" />
</property>
<property name="idRichiesta" type="java.lang.Long">
<column name="ID_RICHIESTA" precision="22" scale="0" not-null="true" />
</property>
<property name="processo" type="string">
<column name="PROCESSO" length="25" not-null="true" />
</property>
<property name="stato" type="java.lang.Long">
<column name="STATO" precision="22" scale="0" not-null="true" />
</property>
<property name="idEsigenza" type="string">
<column name="ID_ESIGENZA" length="15" not-null="true" />
</property>
<property name="piattaformaCrm" type="string">
<column name="PIATTAFORMA_CRM" length="1" not-null="true" />
</property>
<property name="numeroTelefono" type="string">
<column name="NUMERO_TELEFONO" length="12" not-null="true" />
</property>
<property name="cow" type="string">
<column name="COW" length="3" not-null="true" />
</property>
<property name="cos" type="string">
<column name="COS" length="3" />
</property>
<property name="cor" type="string">
<column name="COR" length="12" />
</property>
<property name="codFiscalePIva" type="string">
<column name="COD_FISCALE_P_IVA" length="16" not-null="true" />
</property>
<property name="dataInvioFenp" type="date">
<column name="DATA_INVIO_FENP" length="7" />
</property>
<property name="nomeFileFenp" type="string">
<column name="NOME_FILE_FENP" length="50" />
</property>
<property name="dataInvioCrm" type="date">
<column name="DATA_INVIO_CRM" length="7" />
</property>
<property name="causaleRifiutoFenp" type="string">
<column name="CAUSALE_RIFIUTO_FENP" length="100" />
</property>
<property name="canaleVendita" type="string">
<column name="CANALE_VENDITA" length="5" />
</property>
<property name="marcaggio" type="string">
<column name="MARCAGGIO" length="2" />
</property>
<property name="dataRicezioneRichiesta" type="date">
<column name="DATA_RICEZIONE_RICHIESTA" length="7" />
</property>
<property name="dataFineWait" type="date">
<column name="DATA_FINE_WAIT" length="7" />
</property>
<property name="timestampNotifica" type="java.lang.Long">
<column name="TIMESTAMP_NOTIFICA" precision="22" scale="0" not-null="true" />
</property>
<property name="codCorrelazione" type="string">
<column name="COD_CORRELAZIONE" length="25" />
</property>
<property name="flagDichiarazione" type="string">
<column name="FLAG_DICHIARAZIONE" length="1" not-null="true" />
</property>
<property name="cow2" type="string">
<column name="COW2" length="3" />
</property>
<property name="dac" type="date">
<column name="DAC" length="7" />
</property>
<property name="nroInviiFenp" type="java.lang.Long">
<column name="NRO_INVII_FENP" precision="22" scale="0" not-null="true" />
</property>
<property name="flagGnr" type="string">
<column name="FLAG_GNR" length="1" not-null="true" />
</property>
<property name="flagConsip" type="string">
<column name="FLAG_CONSIP" length="1" not-null="true" />
</property>
<property name="codiceProgetto" type="string">
<column name="CODICE_PROGETTO" length="18" />
</property>
<property name="moduloCc" type="string">
<column name="MODULO_CC" length="30" />
</property>
<property name="moduloPartner" type="string">
<column name="MODULO_PARTNER" length="30" />
</property>
<property name="protocolloDms" type="string">
<column name="PROTOCOLLO_DMS" length="100" />
</property>
<property name="dataCreazioneSr" type="timestamp">
<column name="DATA_CREAZIONE_SR" length="7" />
</property>
<property name="idPadre" type="string">
<column name="ID_PADRE" length="15" />
</property>
<property name="causaleKo" type="string">
<column name="CAUSALE_KO" length="200" />
</property>
<property name="dataChiusuraCrm" type="timestamp">
<column name="DATA_CHIUSURA_CRM" length="7" />
</property>
<property name="dataPrimaEsigenza" type="timestamp">
<column name="DATA_PRIMA_ESIGENZA" length="7" />
</property>
<property name="codiceMotivoRifiutoFenp" type="java.lang.Long">
<column name="CODICE_MOTIVO_RIFIUTO_FENP" precision="2" scale="0" />
</property>
<property name="cor2" type="string">
<column name="COR2" length="12" />
</property>
<property name="cos2" type="string">
<column name="COS2" length="3" />
</property>
<property name="codiceOrdine" type="string">
<column name="CODICE_ORDINE" length="18" />
</property>
<property name="dataRicezioneTipocom2" type="timestamp">
<column name="DATA_RICEZIONE_TIPOCOM2" length="7" />
</property>
<property name="subCorrelazione" type="string">
<column name="SUB_CORRELAZIONE" length="15" />
</property>
<property name="numTotRichieste" type="java.lang.Long">
<column name="NUM_TOT_RICHIESTE" precision="22" scale="0" />
</property>
<property name="numSubRichieste" type="java.lang.Long">
<column name="NUM_SUB_RICHIESTE" precision="22" scale="0" />
</property>
<property name="classificazione" type="string">
<column name="CLASSIFICAZIONE" length="2" />
</property>
<property name="rnb" type="string">
<column name="RNB" length="18" />
</property>
<property name="primario" type="string">
<column name="PRIMARIO" length="12" />
</property>
<property name="radicale" type="string">
<column name="RADICALE" length="12" />
</property>
<property name="idOlFittizio" type="string">
<column name="ID_OL_FITTIZIO" length="15" />
</property>
<property name="nominativoCliente" type="string">
<column name="NOMINATIVO_CLIENTE" length="100" />
</property>
<property name="recapitoAlternativo" type="string">
<column name="RECAPITO_ALTERNATIVO" length="20" />
</property>
<property name="flagSky" type="string">
<column name="FLAG_SKY" length="1" />
</property>
<property name="flagVerticalizzato" type="string">
<column name="FLAG_VERTICALIZZATO" length="1">
<comment>C10_2017 R2F-17-0644 rientri Del.35 VOIP verticalizzati adeguamento I/F CRMB/INFOBUS/DBCFX</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,528 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 29-set-2017 17.56.39 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpDbcfxgoOutNpg35 generated by hbm2java
*/
public class GnpDbcfxgoOutNpg103 implements java.io.Serializable {
private Long uniqueId;
private Long daScodare;
private Long idRichiesta;
private String processo;
private Long stato;
private String idEsigenza;
private String piattaformaCrm;
private String numeroTelefono;
private String cow;
private String cos;
private String cor;
private String codFiscalePIva;
private Date dataInvioFenp;
private String nomeFileFenp;
private Date dataInvioCrm;
private String causaleRifiutoFenp;
private String canaleVendita;
private String marcaggio;
private Date dataRicezioneRichiesta;
private Date dataFineWait;
private Long timestampNotifica;
private String codCorrelazione;
private String flagDichiarazione;
private String cow2;
private Date dac;
private Long nroInviiFenp;
private String flagGnr;
private String flagConsip;
private String codiceProgetto;
private String moduloCc;
private String moduloPartner;
private String protocolloDms;
private Date dataCreazioneSr;
private String idPadre;
private String causaleKo;
private Date dataChiusuraCrm;
private Date dataPrimaEsigenza;
private Long codiceMotivoRifiutoFenp;
private String cor2;
private String cos2;
private String codiceOrdine;
private Date dataRicezioneTipocom2;
private String subCorrelazione;
private Long numTotRichieste;
private Long numSubRichieste;
private String classificazione;
private String rnb;
private String primario;
private String radicale;
private String idOlFittizio;
private String nominativoCliente;
private String recapitoAlternativo;
private String flagSky;
private String flagVerticalizzato;
public GnpDbcfxgoOutNpg103() {
}
public GnpDbcfxgoOutNpg103(Long daScodare, Long idRichiesta, String processo, Long stato, String idEsigenza, String piattaformaCrm, String numeroTelefono, String cow, String codFiscalePIva, Long timestampNotifica, String flagDichiarazione, Long nroInviiFenp, String flagGnr, String flagConsip) {
this.daScodare = daScodare;
this.idRichiesta = idRichiesta;
this.processo = processo;
this.stato = stato;
this.idEsigenza = idEsigenza;
this.piattaformaCrm = piattaformaCrm;
this.numeroTelefono = numeroTelefono;
this.cow = cow;
this.codFiscalePIva = codFiscalePIva;
this.timestampNotifica = timestampNotifica;
this.flagDichiarazione = flagDichiarazione;
this.nroInviiFenp = nroInviiFenp;
this.flagGnr = flagGnr;
this.flagConsip = flagConsip;
}
public GnpDbcfxgoOutNpg103(Long daScodare, Long idRichiesta, String processo, Long stato, String idEsigenza, String piattaformaCrm, String numeroTelefono, String cow, String cos, String cor, String codFiscalePIva, Date dataInvioFenp, String nomeFileFenp, Date dataInvioCrm, String causaleRifiutoFenp, String canaleVendita, String marcaggio, Date dataRicezioneRichiesta, Date dataFineWait, Long timestampNotifica, String codCorrelazione, String flagDichiarazione, String cow2, Date dac, Long nroInviiFenp, String flagGnr, String flagConsip, String codiceProgetto, String moduloCc, String moduloPartner, String protocolloDms, Date dataCreazioneSr, String idPadre, String causaleKo, Date dataChiusuraCrm, Date dataPrimaEsigenza, Long codiceMotivoRifiutoFenp, String cor2, String cos2, String codiceOrdine, Date dataRicezioneTipocom2, String subCorrelazione, Long numTotRichieste, Long numSubRichieste, String classificazione, String rnb, String primario, String radicale, String idOlFittizio, String nominativoCliente, String recapitoAlternativo, String flagSky, String flagVerticalizzato) {
this.daScodare = daScodare;
this.idRichiesta = idRichiesta;
this.processo = processo;
this.stato = stato;
this.idEsigenza = idEsigenza;
this.piattaformaCrm = piattaformaCrm;
this.numeroTelefono = numeroTelefono;
this.cow = cow;
this.cos = cos;
this.cor = cor;
this.codFiscalePIva = codFiscalePIva;
this.dataInvioFenp = dataInvioFenp;
this.nomeFileFenp = nomeFileFenp;
this.dataInvioCrm = dataInvioCrm;
this.causaleRifiutoFenp = causaleRifiutoFenp;
this.canaleVendita = canaleVendita;
this.marcaggio = marcaggio;
this.dataRicezioneRichiesta = dataRicezioneRichiesta;
this.dataFineWait = dataFineWait;
this.timestampNotifica = timestampNotifica;
this.codCorrelazione = codCorrelazione;
this.flagDichiarazione = flagDichiarazione;
this.cow2 = cow2;
this.dac = dac;
this.nroInviiFenp = nroInviiFenp;
this.flagGnr = flagGnr;
this.flagConsip = flagConsip;
this.codiceProgetto = codiceProgetto;
this.moduloCc = moduloCc;
this.moduloPartner = moduloPartner;
this.protocolloDms = protocolloDms;
this.dataCreazioneSr = dataCreazioneSr;
this.idPadre = idPadre;
this.causaleKo = causaleKo;
this.dataChiusuraCrm = dataChiusuraCrm;
this.dataPrimaEsigenza = dataPrimaEsigenza;
this.codiceMotivoRifiutoFenp = codiceMotivoRifiutoFenp;
this.cor2 = cor2;
this.cos2 = cos2;
this.codiceOrdine = codiceOrdine;
this.dataRicezioneTipocom2 = dataRicezioneTipocom2;
this.subCorrelazione = subCorrelazione;
this.numTotRichieste = numTotRichieste;
this.numSubRichieste = numSubRichieste;
this.classificazione = classificazione;
this.rnb = rnb;
this.primario = primario;
this.radicale = radicale;
this.idOlFittizio = idOlFittizio;
this.nominativoCliente = nominativoCliente;
this.recapitoAlternativo = recapitoAlternativo;
this.flagSky = flagSky;
this.flagVerticalizzato = flagVerticalizzato;
}
public Long getUniqueId() {
return this.uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public Long getDaScodare() {
return this.daScodare;
}
public void setDaScodare(Long daScodare) {
this.daScodare = daScodare;
}
public Long getIdRichiesta() {
return this.idRichiesta;
}
public void setIdRichiesta(Long idRichiesta) {
this.idRichiesta = idRichiesta;
}
public String getProcesso() {
return this.processo;
}
public void setProcesso(String processo) {
this.processo = processo;
}
public Long getStato() {
return this.stato;
}
public void setStato(Long stato) {
this.stato = stato;
}
public String getIdEsigenza() {
return this.idEsigenza;
}
public void setIdEsigenza(String idEsigenza) {
this.idEsigenza = idEsigenza;
}
public String getPiattaformaCrm() {
return this.piattaformaCrm;
}
public void setPiattaformaCrm(String piattaformaCrm) {
this.piattaformaCrm = piattaformaCrm;
}
public String getNumeroTelefono() {
return this.numeroTelefono;
}
public void setNumeroTelefono(String numeroTelefono) {
this.numeroTelefono = numeroTelefono;
}
public String getCow() {
return this.cow;
}
public void setCow(String cow) {
this.cow = cow;
}
public String getCos() {
return this.cos;
}
public void setCos(String cos) {
this.cos = cos;
}
public String getCor() {
return this.cor;
}
public void setCor(String cor) {
this.cor = cor;
}
public String getCodFiscalePIva() {
return this.codFiscalePIva;
}
public void setCodFiscalePIva(String codFiscalePIva) {
this.codFiscalePIva = codFiscalePIva;
}
public Date getDataInvioFenp() {
return this.dataInvioFenp;
}
public void setDataInvioFenp(Date dataInvioFenp) {
this.dataInvioFenp = dataInvioFenp;
}
public String getNomeFileFenp() {
return this.nomeFileFenp;
}
public void setNomeFileFenp(String nomeFileFenp) {
this.nomeFileFenp = nomeFileFenp;
}
public Date getDataInvioCrm() {
return this.dataInvioCrm;
}
public void setDataInvioCrm(Date dataInvioCrm) {
this.dataInvioCrm = dataInvioCrm;
}
public String getCausaleRifiutoFenp() {
return this.causaleRifiutoFenp;
}
public void setCausaleRifiutoFenp(String causaleRifiutoFenp) {
this.causaleRifiutoFenp = causaleRifiutoFenp;
}
public String getCanaleVendita() {
return this.canaleVendita;
}
public void setCanaleVendita(String canaleVendita) {
this.canaleVendita = canaleVendita;
}
public String getMarcaggio() {
return this.marcaggio;
}
public void setMarcaggio(String marcaggio) {
this.marcaggio = marcaggio;
}
public Date getDataRicezioneRichiesta() {
return this.dataRicezioneRichiesta;
}
public void setDataRicezioneRichiesta(Date dataRicezioneRichiesta) {
this.dataRicezioneRichiesta = dataRicezioneRichiesta;
}
public Date getDataFineWait() {
return this.dataFineWait;
}
public void setDataFineWait(Date dataFineWait) {
this.dataFineWait = dataFineWait;
}
public Long getTimestampNotifica() {
return this.timestampNotifica;
}
public void setTimestampNotifica(Long timestampNotifica) {
this.timestampNotifica = timestampNotifica;
}
public String getCodCorrelazione() {
return this.codCorrelazione;
}
public void setCodCorrelazione(String codCorrelazione) {
this.codCorrelazione = codCorrelazione;
}
public String getFlagDichiarazione() {
return this.flagDichiarazione;
}
public void setFlagDichiarazione(String flagDichiarazione) {
this.flagDichiarazione = flagDichiarazione;
}
public String getCow2() {
return this.cow2;
}
public void setCow2(String cow2) {
this.cow2 = cow2;
}
public Date getDac() {
return this.dac;
}
public void setDac(Date dac) {
this.dac = dac;
}
public Long getNroInviiFenp() {
return this.nroInviiFenp;
}
public void setNroInviiFenp(Long nroInviiFenp) {
this.nroInviiFenp = nroInviiFenp;
}
public String getFlagGnr() {
return this.flagGnr;
}
public void setFlagGnr(String flagGnr) {
this.flagGnr = flagGnr;
}
public String getFlagConsip() {
return this.flagConsip;
}
public void setFlagConsip(String flagConsip) {
this.flagConsip = flagConsip;
}
public String getCodiceProgetto() {
return this.codiceProgetto;
}
public void setCodiceProgetto(String codiceProgetto) {
this.codiceProgetto = codiceProgetto;
}
public String getModuloCc() {
return this.moduloCc;
}
public void setModuloCc(String moduloCc) {
this.moduloCc = moduloCc;
}
public String getModuloPartner() {
return this.moduloPartner;
}
public void setModuloPartner(String moduloPartner) {
this.moduloPartner = moduloPartner;
}
public String getProtocolloDms() {
return this.protocolloDms;
}
public void setProtocolloDms(String protocolloDms) {
this.protocolloDms = protocolloDms;
}
public Date getDataCreazioneSr() {
return this.dataCreazioneSr;
}
public void setDataCreazioneSr(Date dataCreazioneSr) {
this.dataCreazioneSr = dataCreazioneSr;
}
public String getIdPadre() {
return this.idPadre;
}
public void setIdPadre(String idPadre) {
this.idPadre = idPadre;
}
public String getCausaleKo() {
return this.causaleKo;
}
public void setCausaleKo(String causaleKo) {
this.causaleKo = causaleKo;
}
public Date getDataChiusuraCrm() {
return this.dataChiusuraCrm;
}
public void setDataChiusuraCrm(Date dataChiusuraCrm) {
this.dataChiusuraCrm = dataChiusuraCrm;
}
public Date getDataPrimaEsigenza() {
return this.dataPrimaEsigenza;
}
public void setDataPrimaEsigenza(Date dataPrimaEsigenza) {
this.dataPrimaEsigenza = dataPrimaEsigenza;
}
public Long getCodiceMotivoRifiutoFenp() {
return this.codiceMotivoRifiutoFenp;
}
public void setCodiceMotivoRifiutoFenp(Long codiceMotivoRifiutoFenp) {
this.codiceMotivoRifiutoFenp = codiceMotivoRifiutoFenp;
}
public String getCor2() {
return this.cor2;
}
public void setCor2(String cor2) {
this.cor2 = cor2;
}
public String getCos2() {
return this.cos2;
}
public void setCos2(String cos2) {
this.cos2 = cos2;
}
public String getCodiceOrdine() {
return this.codiceOrdine;
}
public void setCodiceOrdine(String codiceOrdine) {
this.codiceOrdine = codiceOrdine;
}
public Date getDataRicezioneTipocom2() {
return this.dataRicezioneTipocom2;
}
public void setDataRicezioneTipocom2(Date dataRicezioneTipocom2) {
this.dataRicezioneTipocom2 = dataRicezioneTipocom2;
}
public String getSubCorrelazione() {
return this.subCorrelazione;
}
public void setSubCorrelazione(String subCorrelazione) {
this.subCorrelazione = subCorrelazione;
}
public Long getNumTotRichieste() {
return this.numTotRichieste;
}
public void setNumTotRichieste(Long numTotRichieste) {
this.numTotRichieste = numTotRichieste;
}
public Long getNumSubRichieste() {
return this.numSubRichieste;
}
public void setNumSubRichieste(Long numSubRichieste) {
this.numSubRichieste = numSubRichieste;
}
public String getClassificazione() {
return this.classificazione;
}
public void setClassificazione(String classificazione) {
this.classificazione = classificazione;
}
public String getRnb() {
return this.rnb;
}
public void setRnb(String rnb) {
this.rnb = rnb;
}
public String getPrimario() {
return this.primario;
}
public void setPrimario(String primario) {
this.primario = primario;
}
public String getRadicale() {
return this.radicale;
}
public void setRadicale(String radicale) {
this.radicale = radicale;
}
public String getIdOlFittizio() {
return this.idOlFittizio;
}
public void setIdOlFittizio(String idOlFittizio) {
this.idOlFittizio = idOlFittizio;
}
public String getNominativoCliente() {
return this.nominativoCliente;
}
public void setNominativoCliente(String nominativoCliente) {
this.nominativoCliente = nominativoCliente;
}
public String getRecapitoAlternativo() {
return this.recapitoAlternativo;
}
public void setRecapitoAlternativo(String recapitoAlternativo) {
this.recapitoAlternativo = recapitoAlternativo;
}
public String getFlagSky() {
return this.flagSky;
}
public void setFlagSky(String flagSky) {
this.flagSky = flagSky;
}
public String getFlagVerticalizzato() {
return this.flagVerticalizzato;
}
public void setFlagVerticalizzato(String flagVerticalizzato) {
this.flagVerticalizzato = flagVerticalizzato;
}
}

View File

@@ -0,0 +1,188 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 27-mag-2011 14.25.47 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.LockMode;
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Example;
import java.util.Iterator;
import java.util.List;
/**
* DAO object for domain model class GnpDbcfxgoOutNpg103.
*
* @author C.A.
* @see .GnpDbcfxgoOutNpg103
*/
public class GnpDbcfxgoOutNpg103DAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbcfxgoOutNpg103DAO.class);
public void save(GnpDbcfxgoOutNpg103 transientInstance) {
log.debug("saving GnpDbcfxgoOutNpg103 instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbcfxgoOutNpg103 instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbcfxgoOutNpg103 model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbcfxgoOutNpg103 ");
try {
String queryString = " from GnpDbcfxgoOutNpg103";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbcfxgoOutNpg103 instance) {
log.debug("attaching dirty GnpDbcfxgoOutNpg103 instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbcfxgoOutNpg103 instance) {
log.debug("attaching clean GnpDbcfxgoOutNpg103 instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbcfxgoOutNpg103 persistentInstance) {
log.debug("deleting GnpDbcfxgoOutNpg103 instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbcfxgoOutNpg103 merge(GnpDbcfxgoOutNpg103 detachedInstance) {
log.debug("merging GnpDbcfxgoOutNpg103 instance");
try {
GnpDbcfxgoOutNpg103 result = (GnpDbcfxgoOutNpg103) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbcfxgoOutNpg103 instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNpg103");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbcfxgoOutNpg103 findById( Long id) {
log.debug("getting GnpDbcfxgoOutNpg103 instance with id: " + id);
try {
GnpDbcfxgoOutNpg103 instance = (GnpDbcfxgoOutNpg103) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNpg103", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbcfxgoOutNpg103 instance) {
log.debug("finding GnpDbcfxgoOutNpg103 instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNpg103")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,175 @@
<?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-set-2017 17.56.39 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNpg35" table="GNP_DBCFXGO_OUT_NPG35">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_DBCFXGO</param>
</generator>
</id>
<property name="daScodare" type="java.lang.Long">
<column name="DA_SCODARE" precision="22" scale="0" not-null="true" />
</property>
<property name="idRichiesta" type="java.lang.Long">
<column name="ID_RICHIESTA" precision="22" scale="0" not-null="true" />
</property>
<property name="processo" type="string">
<column name="PROCESSO" length="25" not-null="true" />
</property>
<property name="stato" type="java.lang.Long">
<column name="STATO" precision="22" scale="0" not-null="true" />
</property>
<property name="idEsigenza" type="string">
<column name="ID_ESIGENZA" length="15" not-null="true" />
</property>
<property name="piattaformaCrm" type="string">
<column name="PIATTAFORMA_CRM" length="1" not-null="true" />
</property>
<property name="numeroTelefono" type="string">
<column name="NUMERO_TELEFONO" length="12" not-null="true" />
</property>
<property name="cow" type="string">
<column name="COW" length="3" not-null="true" />
</property>
<property name="cos" type="string">
<column name="COS" length="3" />
</property>
<property name="cor" type="string">
<column name="COR" length="12" />
</property>
<property name="codFiscalePIva" type="string">
<column name="COD_FISCALE_P_IVA" length="16" not-null="true" />
</property>
<property name="dataInvioFenp" type="date">
<column name="DATA_INVIO_FENP" length="7" />
</property>
<property name="nomeFileFenp" type="string">
<column name="NOME_FILE_FENP" length="50" />
</property>
<property name="dataInvioCrm" type="date">
<column name="DATA_INVIO_CRM" length="7" />
</property>
<property name="causaleRifiutoFenp" type="string">
<column name="CAUSALE_RIFIUTO_FENP" length="100" />
</property>
<property name="canaleVendita" type="string">
<column name="CANALE_VENDITA" length="5" />
</property>
<property name="marcaggio" type="string">
<column name="MARCAGGIO" length="2" />
</property>
<property name="dataRicezioneRichiesta" type="date">
<column name="DATA_RICEZIONE_RICHIESTA" length="7" />
</property>
<property name="dataFineWait" type="date">
<column name="DATA_FINE_WAIT" length="7" />
</property>
<property name="timestampNotifica" type="java.lang.Long">
<column name="TIMESTAMP_NOTIFICA" precision="22" scale="0" not-null="true" />
</property>
<property name="codCorrelazione" type="string">
<column name="COD_CORRELAZIONE" length="15" />
</property>
<property name="flagDichiarazione" type="string">
<column name="FLAG_DICHIARAZIONE" length="1" not-null="true" />
</property>
<property name="cow2" type="string">
<column name="COW2" length="3" />
</property>
<property name="dac" type="date">
<column name="DAC" length="7" />
</property>
<property name="nroInviiFenp" type="java.lang.Long">
<column name="NRO_INVII_FENP" precision="22" scale="0" not-null="true" />
</property>
<property name="flagGnr" type="string">
<column name="FLAG_GNR" length="1" not-null="true" />
</property>
<property name="flagConsip" type="string">
<column name="FLAG_CONSIP" length="1" not-null="true" />
</property>
<property name="codiceProgetto" type="string">
<column name="CODICE_PROGETTO" length="18" />
</property>
<property name="moduloCc" type="string">
<column name="MODULO_CC" length="30" />
</property>
<property name="moduloPartner" type="string">
<column name="MODULO_PARTNER" length="30" />
</property>
<property name="protocolloDms" type="string">
<column name="PROTOCOLLO_DMS" length="100" />
</property>
<property name="dataCreazioneSr" type="timestamp">
<column name="DATA_CREAZIONE_SR" length="7" />
</property>
<property name="idPadre" type="string">
<column name="ID_PADRE" length="15" />
</property>
<property name="causaleKo" type="string">
<column name="CAUSALE_KO" length="200" />
</property>
<property name="dataChiusuraCrm" type="timestamp">
<column name="DATA_CHIUSURA_CRM" length="7" />
</property>
<property name="dataPrimaEsigenza" type="timestamp">
<column name="DATA_PRIMA_ESIGENZA" length="7" />
</property>
<property name="codiceMotivoRifiutoFenp" type="java.lang.Long">
<column name="CODICE_MOTIVO_RIFIUTO_FENP" precision="2" scale="0" />
</property>
<property name="cor2" type="string">
<column name="COR2" length="12" />
</property>
<property name="cos2" type="string">
<column name="COS2" length="3" />
</property>
<property name="codiceOrdine" type="string">
<column name="CODICE_ORDINE" length="18" />
</property>
<property name="dataRicezioneTipocom2" type="timestamp">
<column name="DATA_RICEZIONE_TIPOCOM2" length="7" />
</property>
<property name="subCorrelazione" type="string">
<column name="SUB_CORRELAZIONE" length="15" />
</property>
<property name="numTotRichieste" type="java.lang.Long">
<column name="NUM_TOT_RICHIESTE" precision="22" scale="0" />
</property>
<property name="numSubRichieste" type="java.lang.Long">
<column name="NUM_SUB_RICHIESTE" precision="22" scale="0" />
</property>
<property name="classificazione" type="string">
<column name="CLASSIFICAZIONE" length="2" />
</property>
<property name="rnb" type="string">
<column name="RNB" length="18" />
</property>
<property name="primario" type="string">
<column name="PRIMARIO" length="12" />
</property>
<property name="radicale" type="string">
<column name="RADICALE" length="12" />
</property>
<property name="idOlFittizio" type="string">
<column name="ID_OL_FITTIZIO" length="15" />
</property>
<property name="nominativoCliente" type="string">
<column name="NOMINATIVO_CLIENTE" length="100" />
</property>
<property name="recapitoAlternativo" type="string">
<column name="RECAPITO_ALTERNATIVO" length="20" />
</property>
<property name="flagSky" type="string">
<column name="FLAG_SKY" length="1" />
</property>
<property name="flagVerticalizzato" type="string">
<column name="FLAG_VERTICALIZZATO" length="1">
<comment>C10_2017 R2F-17-0644 rientri Del.35 VOIP verticalizzati adeguamento I/F CRMB/INFOBUS/DBCFX</comment>
</column>
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,528 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 29-set-2017 17.56.39 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpDbcfxgoOutNpg35 generated by hbm2java
*/
public class GnpDbcfxgoOutNpg35 implements java.io.Serializable {
private Long uniqueId;
private Long daScodare;
private Long idRichiesta;
private String processo;
private Long stato;
private String idEsigenza;
private String piattaformaCrm;
private String numeroTelefono;
private String cow;
private String cos;
private String cor;
private String codFiscalePIva;
private Date dataInvioFenp;
private String nomeFileFenp;
private Date dataInvioCrm;
private String causaleRifiutoFenp;
private String canaleVendita;
private String marcaggio;
private Date dataRicezioneRichiesta;
private Date dataFineWait;
private Long timestampNotifica;
private String codCorrelazione;
private String flagDichiarazione;
private String cow2;
private Date dac;
private Long nroInviiFenp;
private String flagGnr;
private String flagConsip;
private String codiceProgetto;
private String moduloCc;
private String moduloPartner;
private String protocolloDms;
private Date dataCreazioneSr;
private String idPadre;
private String causaleKo;
private Date dataChiusuraCrm;
private Date dataPrimaEsigenza;
private Long codiceMotivoRifiutoFenp;
private String cor2;
private String cos2;
private String codiceOrdine;
private Date dataRicezioneTipocom2;
private String subCorrelazione;
private Long numTotRichieste;
private Long numSubRichieste;
private String classificazione;
private String rnb;
private String primario;
private String radicale;
private String idOlFittizio;
private String nominativoCliente;
private String recapitoAlternativo;
private String flagSky;
private String flagVerticalizzato;
public GnpDbcfxgoOutNpg35() {
}
public GnpDbcfxgoOutNpg35(Long daScodare, Long idRichiesta, String processo, Long stato, String idEsigenza, String piattaformaCrm, String numeroTelefono, String cow, String codFiscalePIva, Long timestampNotifica, String flagDichiarazione, Long nroInviiFenp, String flagGnr, String flagConsip) {
this.daScodare = daScodare;
this.idRichiesta = idRichiesta;
this.processo = processo;
this.stato = stato;
this.idEsigenza = idEsigenza;
this.piattaformaCrm = piattaformaCrm;
this.numeroTelefono = numeroTelefono;
this.cow = cow;
this.codFiscalePIva = codFiscalePIva;
this.timestampNotifica = timestampNotifica;
this.flagDichiarazione = flagDichiarazione;
this.nroInviiFenp = nroInviiFenp;
this.flagGnr = flagGnr;
this.flagConsip = flagConsip;
}
public GnpDbcfxgoOutNpg35(Long daScodare, Long idRichiesta, String processo, Long stato, String idEsigenza, String piattaformaCrm, String numeroTelefono, String cow, String cos, String cor, String codFiscalePIva, Date dataInvioFenp, String nomeFileFenp, Date dataInvioCrm, String causaleRifiutoFenp, String canaleVendita, String marcaggio, Date dataRicezioneRichiesta, Date dataFineWait, Long timestampNotifica, String codCorrelazione, String flagDichiarazione, String cow2, Date dac, Long nroInviiFenp, String flagGnr, String flagConsip, String codiceProgetto, String moduloCc, String moduloPartner, String protocolloDms, Date dataCreazioneSr, String idPadre, String causaleKo, Date dataChiusuraCrm, Date dataPrimaEsigenza, Long codiceMotivoRifiutoFenp, String cor2, String cos2, String codiceOrdine, Date dataRicezioneTipocom2, String subCorrelazione, Long numTotRichieste, Long numSubRichieste, String classificazione, String rnb, String primario, String radicale, String idOlFittizio, String nominativoCliente, String recapitoAlternativo, String flagSky, String flagVerticalizzato) {
this.daScodare = daScodare;
this.idRichiesta = idRichiesta;
this.processo = processo;
this.stato = stato;
this.idEsigenza = idEsigenza;
this.piattaformaCrm = piattaformaCrm;
this.numeroTelefono = numeroTelefono;
this.cow = cow;
this.cos = cos;
this.cor = cor;
this.codFiscalePIva = codFiscalePIva;
this.dataInvioFenp = dataInvioFenp;
this.nomeFileFenp = nomeFileFenp;
this.dataInvioCrm = dataInvioCrm;
this.causaleRifiutoFenp = causaleRifiutoFenp;
this.canaleVendita = canaleVendita;
this.marcaggio = marcaggio;
this.dataRicezioneRichiesta = dataRicezioneRichiesta;
this.dataFineWait = dataFineWait;
this.timestampNotifica = timestampNotifica;
this.codCorrelazione = codCorrelazione;
this.flagDichiarazione = flagDichiarazione;
this.cow2 = cow2;
this.dac = dac;
this.nroInviiFenp = nroInviiFenp;
this.flagGnr = flagGnr;
this.flagConsip = flagConsip;
this.codiceProgetto = codiceProgetto;
this.moduloCc = moduloCc;
this.moduloPartner = moduloPartner;
this.protocolloDms = protocolloDms;
this.dataCreazioneSr = dataCreazioneSr;
this.idPadre = idPadre;
this.causaleKo = causaleKo;
this.dataChiusuraCrm = dataChiusuraCrm;
this.dataPrimaEsigenza = dataPrimaEsigenza;
this.codiceMotivoRifiutoFenp = codiceMotivoRifiutoFenp;
this.cor2 = cor2;
this.cos2 = cos2;
this.codiceOrdine = codiceOrdine;
this.dataRicezioneTipocom2 = dataRicezioneTipocom2;
this.subCorrelazione = subCorrelazione;
this.numTotRichieste = numTotRichieste;
this.numSubRichieste = numSubRichieste;
this.classificazione = classificazione;
this.rnb = rnb;
this.primario = primario;
this.radicale = radicale;
this.idOlFittizio = idOlFittizio;
this.nominativoCliente = nominativoCliente;
this.recapitoAlternativo = recapitoAlternativo;
this.flagSky = flagSky;
this.flagVerticalizzato = flagVerticalizzato;
}
public Long getUniqueId() {
return this.uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public Long getDaScodare() {
return this.daScodare;
}
public void setDaScodare(Long daScodare) {
this.daScodare = daScodare;
}
public Long getIdRichiesta() {
return this.idRichiesta;
}
public void setIdRichiesta(Long idRichiesta) {
this.idRichiesta = idRichiesta;
}
public String getProcesso() {
return this.processo;
}
public void setProcesso(String processo) {
this.processo = processo;
}
public Long getStato() {
return this.stato;
}
public void setStato(Long stato) {
this.stato = stato;
}
public String getIdEsigenza() {
return this.idEsigenza;
}
public void setIdEsigenza(String idEsigenza) {
this.idEsigenza = idEsigenza;
}
public String getPiattaformaCrm() {
return this.piattaformaCrm;
}
public void setPiattaformaCrm(String piattaformaCrm) {
this.piattaformaCrm = piattaformaCrm;
}
public String getNumeroTelefono() {
return this.numeroTelefono;
}
public void setNumeroTelefono(String numeroTelefono) {
this.numeroTelefono = numeroTelefono;
}
public String getCow() {
return this.cow;
}
public void setCow(String cow) {
this.cow = cow;
}
public String getCos() {
return this.cos;
}
public void setCos(String cos) {
this.cos = cos;
}
public String getCor() {
return this.cor;
}
public void setCor(String cor) {
this.cor = cor;
}
public String getCodFiscalePIva() {
return this.codFiscalePIva;
}
public void setCodFiscalePIva(String codFiscalePIva) {
this.codFiscalePIva = codFiscalePIva;
}
public Date getDataInvioFenp() {
return this.dataInvioFenp;
}
public void setDataInvioFenp(Date dataInvioFenp) {
this.dataInvioFenp = dataInvioFenp;
}
public String getNomeFileFenp() {
return this.nomeFileFenp;
}
public void setNomeFileFenp(String nomeFileFenp) {
this.nomeFileFenp = nomeFileFenp;
}
public Date getDataInvioCrm() {
return this.dataInvioCrm;
}
public void setDataInvioCrm(Date dataInvioCrm) {
this.dataInvioCrm = dataInvioCrm;
}
public String getCausaleRifiutoFenp() {
return this.causaleRifiutoFenp;
}
public void setCausaleRifiutoFenp(String causaleRifiutoFenp) {
this.causaleRifiutoFenp = causaleRifiutoFenp;
}
public String getCanaleVendita() {
return this.canaleVendita;
}
public void setCanaleVendita(String canaleVendita) {
this.canaleVendita = canaleVendita;
}
public String getMarcaggio() {
return this.marcaggio;
}
public void setMarcaggio(String marcaggio) {
this.marcaggio = marcaggio;
}
public Date getDataRicezioneRichiesta() {
return this.dataRicezioneRichiesta;
}
public void setDataRicezioneRichiesta(Date dataRicezioneRichiesta) {
this.dataRicezioneRichiesta = dataRicezioneRichiesta;
}
public Date getDataFineWait() {
return this.dataFineWait;
}
public void setDataFineWait(Date dataFineWait) {
this.dataFineWait = dataFineWait;
}
public Long getTimestampNotifica() {
return this.timestampNotifica;
}
public void setTimestampNotifica(Long timestampNotifica) {
this.timestampNotifica = timestampNotifica;
}
public String getCodCorrelazione() {
return this.codCorrelazione;
}
public void setCodCorrelazione(String codCorrelazione) {
this.codCorrelazione = codCorrelazione;
}
public String getFlagDichiarazione() {
return this.flagDichiarazione;
}
public void setFlagDichiarazione(String flagDichiarazione) {
this.flagDichiarazione = flagDichiarazione;
}
public String getCow2() {
return this.cow2;
}
public void setCow2(String cow2) {
this.cow2 = cow2;
}
public Date getDac() {
return this.dac;
}
public void setDac(Date dac) {
this.dac = dac;
}
public Long getNroInviiFenp() {
return this.nroInviiFenp;
}
public void setNroInviiFenp(Long nroInviiFenp) {
this.nroInviiFenp = nroInviiFenp;
}
public String getFlagGnr() {
return this.flagGnr;
}
public void setFlagGnr(String flagGnr) {
this.flagGnr = flagGnr;
}
public String getFlagConsip() {
return this.flagConsip;
}
public void setFlagConsip(String flagConsip) {
this.flagConsip = flagConsip;
}
public String getCodiceProgetto() {
return this.codiceProgetto;
}
public void setCodiceProgetto(String codiceProgetto) {
this.codiceProgetto = codiceProgetto;
}
public String getModuloCc() {
return this.moduloCc;
}
public void setModuloCc(String moduloCc) {
this.moduloCc = moduloCc;
}
public String getModuloPartner() {
return this.moduloPartner;
}
public void setModuloPartner(String moduloPartner) {
this.moduloPartner = moduloPartner;
}
public String getProtocolloDms() {
return this.protocolloDms;
}
public void setProtocolloDms(String protocolloDms) {
this.protocolloDms = protocolloDms;
}
public Date getDataCreazioneSr() {
return this.dataCreazioneSr;
}
public void setDataCreazioneSr(Date dataCreazioneSr) {
this.dataCreazioneSr = dataCreazioneSr;
}
public String getIdPadre() {
return this.idPadre;
}
public void setIdPadre(String idPadre) {
this.idPadre = idPadre;
}
public String getCausaleKo() {
return this.causaleKo;
}
public void setCausaleKo(String causaleKo) {
this.causaleKo = causaleKo;
}
public Date getDataChiusuraCrm() {
return this.dataChiusuraCrm;
}
public void setDataChiusuraCrm(Date dataChiusuraCrm) {
this.dataChiusuraCrm = dataChiusuraCrm;
}
public Date getDataPrimaEsigenza() {
return this.dataPrimaEsigenza;
}
public void setDataPrimaEsigenza(Date dataPrimaEsigenza) {
this.dataPrimaEsigenza = dataPrimaEsigenza;
}
public Long getCodiceMotivoRifiutoFenp() {
return this.codiceMotivoRifiutoFenp;
}
public void setCodiceMotivoRifiutoFenp(Long codiceMotivoRifiutoFenp) {
this.codiceMotivoRifiutoFenp = codiceMotivoRifiutoFenp;
}
public String getCor2() {
return this.cor2;
}
public void setCor2(String cor2) {
this.cor2 = cor2;
}
public String getCos2() {
return this.cos2;
}
public void setCos2(String cos2) {
this.cos2 = cos2;
}
public String getCodiceOrdine() {
return this.codiceOrdine;
}
public void setCodiceOrdine(String codiceOrdine) {
this.codiceOrdine = codiceOrdine;
}
public Date getDataRicezioneTipocom2() {
return this.dataRicezioneTipocom2;
}
public void setDataRicezioneTipocom2(Date dataRicezioneTipocom2) {
this.dataRicezioneTipocom2 = dataRicezioneTipocom2;
}
public String getSubCorrelazione() {
return this.subCorrelazione;
}
public void setSubCorrelazione(String subCorrelazione) {
this.subCorrelazione = subCorrelazione;
}
public Long getNumTotRichieste() {
return this.numTotRichieste;
}
public void setNumTotRichieste(Long numTotRichieste) {
this.numTotRichieste = numTotRichieste;
}
public Long getNumSubRichieste() {
return this.numSubRichieste;
}
public void setNumSubRichieste(Long numSubRichieste) {
this.numSubRichieste = numSubRichieste;
}
public String getClassificazione() {
return this.classificazione;
}
public void setClassificazione(String classificazione) {
this.classificazione = classificazione;
}
public String getRnb() {
return this.rnb;
}
public void setRnb(String rnb) {
this.rnb = rnb;
}
public String getPrimario() {
return this.primario;
}
public void setPrimario(String primario) {
this.primario = primario;
}
public String getRadicale() {
return this.radicale;
}
public void setRadicale(String radicale) {
this.radicale = radicale;
}
public String getIdOlFittizio() {
return this.idOlFittizio;
}
public void setIdOlFittizio(String idOlFittizio) {
this.idOlFittizio = idOlFittizio;
}
public String getNominativoCliente() {
return this.nominativoCliente;
}
public void setNominativoCliente(String nominativoCliente) {
this.nominativoCliente = nominativoCliente;
}
public String getRecapitoAlternativo() {
return this.recapitoAlternativo;
}
public void setRecapitoAlternativo(String recapitoAlternativo) {
this.recapitoAlternativo = recapitoAlternativo;
}
public String getFlagSky() {
return this.flagSky;
}
public void setFlagSky(String flagSky) {
this.flagSky = flagSky;
}
public String getFlagVerticalizzato() {
return this.flagVerticalizzato;
}
public void setFlagVerticalizzato(String flagVerticalizzato) {
this.flagVerticalizzato = flagVerticalizzato;
}
}

View File

@@ -0,0 +1,186 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 27-mag-2011 14.25.47 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpDbcfxgoOutNpg35.
* @see .GnpDbcfxgoOutNpg35
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpDbcfxgoOutNpg35DAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbcfxgoOutNpg35DAO.class);
public void save(GnpDbcfxgoOutNpg35 transientInstance) {
log.debug("saving GnpDbcfxgoOutNpg35 instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbcfxgoOutNpg35 instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbcfxgoOutNpg35 model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbcfxgoOutNpg35 ");
try {
String queryString = " from GnpDbcfxgoOutNpg35";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbcfxgoOutNpg35 instance) {
log.debug("attaching dirty GnpDbcfxgoOutNpg35 instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbcfxgoOutNpg35 instance) {
log.debug("attaching clean GnpDbcfxgoOutNpg35 instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbcfxgoOutNpg35 persistentInstance) {
log.debug("deleting GnpDbcfxgoOutNpg35 instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbcfxgoOutNpg35 merge(GnpDbcfxgoOutNpg35 detachedInstance) {
log.debug("merging GnpDbcfxgoOutNpg35 instance");
try {
GnpDbcfxgoOutNpg35 result = (GnpDbcfxgoOutNpg35) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbcfxgoOutNpg35 instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNpg35");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbcfxgoOutNpg35 findById( java.lang.Long id) {
log.debug("getting GnpDbcfxgoOutNpg35 instance with id: " + id);
try {
GnpDbcfxgoOutNpg35 instance = (GnpDbcfxgoOutNpg35) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNpg35", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbcfxgoOutNpg35 instance) {
log.debug("finding GnpDbcfxgoOutNpg35 instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutNpg35")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,251 @@
<?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-dic-2014 11.48.29 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutRec" table="GNP_DBCFXGO_OUT_REC">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_DBCFXGO</param>
</generator>
</id>
<property name="daScodare" type="java.lang.Long">
<column name="DA_SCODARE" precision="1" scale="0" not-null="true" />
</property>
<property name="idRichiesta" type="java.lang.Long">
<column name="ID_RICHIESTA" precision="22" scale="0" not-null="true" />
</property>
<property name="processo" type="string">
<column name="PROCESSO" length="25" not-null="true" />
</property>
<property name="stato" type="java.lang.Long">
<column name="STATO" precision="2" scale="0" not-null="true" />
</property>
<property name="idEsigenza" type="string">
<column name="ID_ESIGENZA" length="15" not-null="true" />
</property>
<property name="piattaformaCrm" type="string">
<column name="PIATTAFORMA_CRM" length="1" not-null="true" />
</property>
<property name="numeroTelefono" type="string">
<column name="NUMERO_TELEFONO" length="12" not-null="true" />
</property>
<property name="cow" type="string">
<column name="COW" length="3" not-null="true" />
</property>
<property name="cos" type="string">
<column name="COS" length="3" />
</property>
<property name="cor" type="string">
<column name="COR" length="12" not-null="true" />
</property>
<property name="dac" type="date">
<column name="DAC" length="7" not-null="true" />
</property>
<property name="codFiscalePIva" type="string">
<column name="COD_FISCALE_P_IVA" length="16" not-null="true" />
</property>
<property name="causaleRifiutoOlo" type="string">
<column name="CAUSALE_RIFIUTO_OLO" />
</property>
<property name="causaleRifiutoPitagora" type="string">
<column name="CAUSALE_RIFIUTO_PITAGORA" />
</property>
<property name="canaleVendita" type="string">
<column name="CANALE_VENDITA" length="5" />
</property>
<property name="marcaggio" type="string">
<column name="MARCAGGIO" length="2" />
</property>
<property name="dataRicezioneRichiesta" type="date">
<column name="DATA_RICEZIONE_RICHIESTA" length="7" />
</property>
<property name="dataRicezionePic" type="date">
<column name="DATA_RICEZIONE_PIC" length="7" />
</property>
<property name="dataInvioOlo" type="date">
<column name="DATA_INVIO_OLO" length="7" />
</property>
<property name="dataInvioPitagora" type="date">
<column name="DATA_INVIO_PITAGORA" length="7" />
</property>
<property name="codSessioneOlo" type="string">
<column name="COD_SESSIONE_OLO" length="50" />
</property>
<property name="nomeFileOlo" type="string">
<column name="NOME_FILE_OLO" length="50" />
</property>
<property name="nomeFilePitagora" type="string">
<column name="NOME_FILE_PITAGORA" length="50" />
</property>
<property name="dataRicezioneKoOlo" type="date">
<column name="DATA_RICEZIONE_KO_OLO" length="7" />
</property>
<property name="dataRicezioneKoPitagora" type="date">
<column name="DATA_RICEZIONE_KO_PITAGORA" length="7" />
</property>
<property name="dataFineWait" type="date">
<column name="DATA_FINE_WAIT" length="7" />
</property>
<property name="dataReinvioOlo" type="date">
<column name="DATA_REINVIO_OLO" length="7" />
</property>
<property name="timestampNotifica" type="java.lang.Long">
<column name="TIMESTAMP_NOTIFICA" precision="22" scale="0" not-null="true" />
</property>
<property name="corDuplicato" type="java.lang.Long">
<column name="COR_DUPLICATO" precision="1" scale="0" not-null="true" />
</property>
<property name="dn1" type="string">
<column name="DN1" length="12" />
</property>
<property name="dn2" type="string">
<column name="DN2" length="12" />
</property>
<property name="dn3" type="string">
<column name="DN3" length="12" />
</property>
<property name="dn4" type="string">
<column name="DN4" length="12" />
</property>
<property name="dn5" type="string">
<column name="DN5" length="12" />
</property>
<property name="dn6" type="string">
<column name="DN6" length="12" />
</property>
<property name="dn7" type="string">
<column name="DN7" length="12" />
</property>
<property name="dn8" type="string">
<column name="DN8" length="12" />
</property>
<property name="dn9" type="string">
<column name="DN9" length="12" />
</property>
<property name="dn10" type="string">
<column name="DN10" length="12" />
</property>
<property name="statoDn1" type="string">
<column name="STATO_DN1" length="2" />
</property>
<property name="statoDn2" type="string">
<column name="STATO_DN2" length="2" />
</property>
<property name="statoDn3" type="string">
<column name="STATO_DN3" length="2" />
</property>
<property name="statoDn4" type="string">
<column name="STATO_DN4" length="2" />
</property>
<property name="statoDn5" type="string">
<column name="STATO_DN5" length="2" />
</property>
<property name="statoDn6" type="string">
<column name="STATO_DN6" length="2" />
</property>
<property name="statoDn7" type="string">
<column name="STATO_DN7" length="2" />
</property>
<property name="statoDn8" type="string">
<column name="STATO_DN8" length="2" />
</property>
<property name="statoDn9" type="string">
<column name="STATO_DN9" length="2" />
</property>
<property name="statoDn10" type="string">
<column name="STATO_DN10" length="2" />
</property>
<property name="codCorrelazione" type="string">
<column name="COD_CORRELAZIONE" length="8" />
</property>
<property name="esitoA375Pitagora" type="string">
<column name="ESITO_A375_PITAGORA" length="1" />
</property>
<property name="esitoDnaggA3751" type="string">
<column name="ESITO_DNAGG_A375_1" length="1" />
</property>
<property name="esitoDnaggA3752" type="string">
<column name="ESITO_DNAGG_A375_2" length="1" />
</property>
<property name="esitoDnaggA3753" type="string">
<column name="ESITO_DNAGG_A375_3" length="1" />
</property>
<property name="esitoDnaggA3754" type="string">
<column name="ESITO_DNAGG_A375_4" length="1" />
</property>
<property name="esitoDnaggA3755" type="string">
<column name="ESITO_DNAGG_A375_5" length="1" />
</property>
<property name="esitoDnaggA3756" type="string">
<column name="ESITO_DNAGG_A375_6" length="1" />
</property>
<property name="esitoDnaggA3757" type="string">
<column name="ESITO_DNAGG_A375_7" length="1" />
</property>
<property name="esitoDnaggA3758" type="string">
<column name="ESITO_DNAGG_A375_8" length="1" />
</property>
<property name="esitoDnaggA3759" type="string">
<column name="ESITO_DNAGG_A375_9" length="1" />
</property>
<property name="esitoDnaggA37510" type="string">
<column name="ESITO_DNAGG_A375_10" length="1" />
</property>
<property name="cow2" type="string">
<column name="COW2" length="3" />
</property>
<property name="flagDichiarazione" type="string">
<column name="FLAG_DICHIARAZIONE" length="1" not-null="true" />
</property>
<property name="flagDichiarazioneA375" type="string">
<column name="FLAG_DICHIARAZIONE_A375" length="1" not-null="true" />
</property>
<property name="moduloCc" type="string">
<column name="MODULO_CC" length="30" />
</property>
<property name="moduloPartner" type="string">
<column name="MODULO_PARTNER" length="30" />
</property>
<property name="protocolloDms" type="string">
<column name="PROTOCOLLO_DMS" length="100" />
</property>
<property name="dataCreazioneSr" type="timestamp">
<column name="DATA_CREAZIONE_SR" length="7" />
</property>
<property name="idPadre" type="string">
<column name="ID_PADRE" length="15" />
</property>
<property name="causaleKo" type="string">
<column name="CAUSALE_KO" length="200" />
</property>
<property name="dataChiusuraCrm" type="timestamp">
<column name="DATA_CHIUSURA_CRM" length="7" />
</property>
<property name="dataPrimaEsigenza" type="timestamp">
<column name="DATA_PRIMA_ESIGENZA" length="7" />
</property>
<property name="cor2" type="string">
<column name="COR2" length="12" />
</property>
<property name="cos2" type="string">
<column name="COS2" length="3" />
</property>
<property name="codiceOrdine" type="string">
<column name="CODICE_ORDINE" length="18" />
</property>
<property name="dataRicezioneTipocom2" type="timestamp">
<column name="DATA_RICEZIONE_TIPOCOM2" length="7" />
</property>
<property name="nominativoCliente" type="string">
<column name="NOMINATIVO_CLIENTE" length="100" />
</property>
<property name="recapitoAlternativo" type="string">
<column name="RECAPITO_ALTERNATIVO" length="20" />
</property>
<property name="flagSky" type="string">
<column name="FLAG_SKY" length="1" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,763 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 29-dic-2014 11.48.30 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpDbcfxgoOutRec generated by hbm2java
*/
public class GnpDbcfxgoOutRec implements java.io.Serializable {
private Long uniqueId;
private Long daScodare;
private Long idRichiesta;
private String processo;
private Long stato;
private String idEsigenza;
private String piattaformaCrm;
private String numeroTelefono;
private String cow;
private String cos;
private String cor;
private Date dac;
private String codFiscalePIva;
private String causaleRifiutoOlo;
private String causaleRifiutoPitagora;
private String canaleVendita;
private String marcaggio;
private Date dataRicezioneRichiesta;
private Date dataRicezionePic;
private Date dataInvioOlo;
private Date dataInvioPitagora;
private String codSessioneOlo;
private String nomeFileOlo;
private String nomeFilePitagora;
private Date dataRicezioneKoOlo;
private Date dataRicezioneKoPitagora;
private Date dataFineWait;
private Date dataReinvioOlo;
private Long timestampNotifica;
private Long corDuplicato;
private String dn1;
private String dn2;
private String dn3;
private String dn4;
private String dn5;
private String dn6;
private String dn7;
private String dn8;
private String dn9;
private String dn10;
private String statoDn1;
private String statoDn2;
private String statoDn3;
private String statoDn4;
private String statoDn5;
private String statoDn6;
private String statoDn7;
private String statoDn8;
private String statoDn9;
private String statoDn10;
private String codCorrelazione;
private String esitoA375Pitagora;
private String esitoDnaggA3751;
private String esitoDnaggA3752;
private String esitoDnaggA3753;
private String esitoDnaggA3754;
private String esitoDnaggA3755;
private String esitoDnaggA3756;
private String esitoDnaggA3757;
private String esitoDnaggA3758;
private String esitoDnaggA3759;
private String esitoDnaggA37510;
private String cow2;
private String flagDichiarazione;
private String flagDichiarazioneA375;
private String moduloCc;
private String moduloPartner;
private String protocolloDms;
private Date dataCreazioneSr;
private String idPadre;
private String causaleKo;
private Date dataChiusuraCrm;
private Date dataPrimaEsigenza;
private String cor2;
private String cos2;
private String codiceOrdine;
private Date dataRicezioneTipocom2;
private String nominativoCliente;
private String recapitoAlternativo;
private String flagSky;
public GnpDbcfxgoOutRec() {
}
public GnpDbcfxgoOutRec(Long daScodare, Long idRichiesta, String processo, Long stato, String idEsigenza, String piattaformaCrm, String numeroTelefono, String cow, String cor, Date dac, String codFiscalePIva, Long timestampNotifica, Long corDuplicato, String flagDichiarazione, String flagDichiarazioneA375) {
this.daScodare = daScodare;
this.idRichiesta = idRichiesta;
this.processo = processo;
this.stato = stato;
this.idEsigenza = idEsigenza;
this.piattaformaCrm = piattaformaCrm;
this.numeroTelefono = numeroTelefono;
this.cow = cow;
this.cor = cor;
this.dac = dac;
this.codFiscalePIva = codFiscalePIva;
this.timestampNotifica = timestampNotifica;
this.corDuplicato = corDuplicato;
this.flagDichiarazione = flagDichiarazione;
this.flagDichiarazioneA375 = flagDichiarazioneA375;
}
public GnpDbcfxgoOutRec(Long daScodare, Long idRichiesta, String processo, Long stato, String idEsigenza, String piattaformaCrm, String numeroTelefono, String cow, String cos, String cor, Date dac, String codFiscalePIva, String causaleRifiutoOlo, String causaleRifiutoPitagora, String canaleVendita, String marcaggio, Date dataRicezioneRichiesta, Date dataRicezionePic, Date dataInvioOlo, Date dataInvioPitagora, String codSessioneOlo, String nomeFileOlo, String nomeFilePitagora, Date dataRicezioneKoOlo, Date dataRicezioneKoPitagora, Date dataFineWait, Date dataReinvioOlo, Long timestampNotifica, Long corDuplicato, String dn1, String dn2, String dn3, String dn4, String dn5, String dn6, String dn7, String dn8, String dn9, String dn10, String statoDn1, String statoDn2, String statoDn3, String statoDn4, String statoDn5, String statoDn6, String statoDn7, String statoDn8, String statoDn9, String statoDn10, String codCorrelazione, String esitoA375Pitagora, String esitoDnaggA3751, String esitoDnaggA3752, String esitoDnaggA3753, String esitoDnaggA3754, String esitoDnaggA3755, String esitoDnaggA3756, String esitoDnaggA3757, String esitoDnaggA3758, String esitoDnaggA3759, String esitoDnaggA37510, String cow2, String flagDichiarazione, String flagDichiarazioneA375, String moduloCc, String moduloPartner, String protocolloDms, Date dataCreazioneSr, String idPadre, String causaleKo, Date dataChiusuraCrm, Date dataPrimaEsigenza, String cor2, String cos2, String codiceOrdine, Date dataRicezioneTipocom2, String nominativoCliente, String recapitoAlternativo, String flagSky) {
this.daScodare = daScodare;
this.idRichiesta = idRichiesta;
this.processo = processo;
this.stato = stato;
this.idEsigenza = idEsigenza;
this.piattaformaCrm = piattaformaCrm;
this.numeroTelefono = numeroTelefono;
this.cow = cow;
this.cos = cos;
this.cor = cor;
this.dac = dac;
this.codFiscalePIva = codFiscalePIva;
this.causaleRifiutoOlo = causaleRifiutoOlo;
this.causaleRifiutoPitagora = causaleRifiutoPitagora;
this.canaleVendita = canaleVendita;
this.marcaggio = marcaggio;
this.dataRicezioneRichiesta = dataRicezioneRichiesta;
this.dataRicezionePic = dataRicezionePic;
this.dataInvioOlo = dataInvioOlo;
this.dataInvioPitagora = dataInvioPitagora;
this.codSessioneOlo = codSessioneOlo;
this.nomeFileOlo = nomeFileOlo;
this.nomeFilePitagora = nomeFilePitagora;
this.dataRicezioneKoOlo = dataRicezioneKoOlo;
this.dataRicezioneKoPitagora = dataRicezioneKoPitagora;
this.dataFineWait = dataFineWait;
this.dataReinvioOlo = dataReinvioOlo;
this.timestampNotifica = timestampNotifica;
this.corDuplicato = corDuplicato;
this.dn1 = dn1;
this.dn2 = dn2;
this.dn3 = dn3;
this.dn4 = dn4;
this.dn5 = dn5;
this.dn6 = dn6;
this.dn7 = dn7;
this.dn8 = dn8;
this.dn9 = dn9;
this.dn10 = dn10;
this.statoDn1 = statoDn1;
this.statoDn2 = statoDn2;
this.statoDn3 = statoDn3;
this.statoDn4 = statoDn4;
this.statoDn5 = statoDn5;
this.statoDn6 = statoDn6;
this.statoDn7 = statoDn7;
this.statoDn8 = statoDn8;
this.statoDn9 = statoDn9;
this.statoDn10 = statoDn10;
this.codCorrelazione = codCorrelazione;
this.esitoA375Pitagora = esitoA375Pitagora;
this.esitoDnaggA3751 = esitoDnaggA3751;
this.esitoDnaggA3752 = esitoDnaggA3752;
this.esitoDnaggA3753 = esitoDnaggA3753;
this.esitoDnaggA3754 = esitoDnaggA3754;
this.esitoDnaggA3755 = esitoDnaggA3755;
this.esitoDnaggA3756 = esitoDnaggA3756;
this.esitoDnaggA3757 = esitoDnaggA3757;
this.esitoDnaggA3758 = esitoDnaggA3758;
this.esitoDnaggA3759 = esitoDnaggA3759;
this.esitoDnaggA37510 = esitoDnaggA37510;
this.cow2 = cow2;
this.flagDichiarazione = flagDichiarazione;
this.flagDichiarazioneA375 = flagDichiarazioneA375;
this.moduloCc = moduloCc;
this.moduloPartner = moduloPartner;
this.protocolloDms = protocolloDms;
this.dataCreazioneSr = dataCreazioneSr;
this.idPadre = idPadre;
this.causaleKo = causaleKo;
this.dataChiusuraCrm = dataChiusuraCrm;
this.dataPrimaEsigenza = dataPrimaEsigenza;
this.cor2 = cor2;
this.cos2 = cos2;
this.codiceOrdine = codiceOrdine;
this.dataRicezioneTipocom2 = dataRicezioneTipocom2;
this.nominativoCliente = nominativoCliente;
this.recapitoAlternativo = recapitoAlternativo;
this.flagSky = flagSky;
}
public Long getUniqueId() {
return this.uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public Long getDaScodare() {
return this.daScodare;
}
public void setDaScodare(Long daScodare) {
this.daScodare = daScodare;
}
public Long getIdRichiesta() {
return this.idRichiesta;
}
public void setIdRichiesta(Long idRichiesta) {
this.idRichiesta = idRichiesta;
}
public String getProcesso() {
return this.processo;
}
public void setProcesso(String processo) {
this.processo = processo;
}
public Long getStato() {
return this.stato;
}
public void setStato(Long stato) {
this.stato = stato;
}
public String getIdEsigenza() {
return this.idEsigenza;
}
public void setIdEsigenza(String idEsigenza) {
this.idEsigenza = idEsigenza;
}
public String getPiattaformaCrm() {
return this.piattaformaCrm;
}
public void setPiattaformaCrm(String piattaformaCrm) {
this.piattaformaCrm = piattaformaCrm;
}
public String getNumeroTelefono() {
return this.numeroTelefono;
}
public void setNumeroTelefono(String numeroTelefono) {
this.numeroTelefono = numeroTelefono;
}
public String getCow() {
return this.cow;
}
public void setCow(String cow) {
this.cow = cow;
}
public String getCos() {
return this.cos;
}
public void setCos(String cos) {
this.cos = cos;
}
public String getCor() {
return this.cor;
}
public void setCor(String cor) {
this.cor = cor;
}
public Date getDac() {
return this.dac;
}
public void setDac(Date dac) {
this.dac = dac;
}
public String getCodFiscalePIva() {
return this.codFiscalePIva;
}
public void setCodFiscalePIva(String codFiscalePIva) {
this.codFiscalePIva = codFiscalePIva;
}
public String getCausaleRifiutoOlo() {
return this.causaleRifiutoOlo;
}
public void setCausaleRifiutoOlo(String causaleRifiutoOlo) {
this.causaleRifiutoOlo = causaleRifiutoOlo;
}
public String getCausaleRifiutoPitagora() {
return this.causaleRifiutoPitagora;
}
public void setCausaleRifiutoPitagora(String causaleRifiutoPitagora) {
this.causaleRifiutoPitagora = causaleRifiutoPitagora;
}
public String getCanaleVendita() {
return this.canaleVendita;
}
public void setCanaleVendita(String canaleVendita) {
this.canaleVendita = canaleVendita;
}
public String getMarcaggio() {
return this.marcaggio;
}
public void setMarcaggio(String marcaggio) {
this.marcaggio = marcaggio;
}
public Date getDataRicezioneRichiesta() {
return this.dataRicezioneRichiesta;
}
public void setDataRicezioneRichiesta(Date dataRicezioneRichiesta) {
this.dataRicezioneRichiesta = dataRicezioneRichiesta;
}
public Date getDataRicezionePic() {
return this.dataRicezionePic;
}
public void setDataRicezionePic(Date dataRicezionePic) {
this.dataRicezionePic = dataRicezionePic;
}
public Date getDataInvioOlo() {
return this.dataInvioOlo;
}
public void setDataInvioOlo(Date dataInvioOlo) {
this.dataInvioOlo = dataInvioOlo;
}
public Date getDataInvioPitagora() {
return this.dataInvioPitagora;
}
public void setDataInvioPitagora(Date dataInvioPitagora) {
this.dataInvioPitagora = dataInvioPitagora;
}
public String getCodSessioneOlo() {
return this.codSessioneOlo;
}
public void setCodSessioneOlo(String codSessioneOlo) {
this.codSessioneOlo = codSessioneOlo;
}
public String getNomeFileOlo() {
return this.nomeFileOlo;
}
public void setNomeFileOlo(String nomeFileOlo) {
this.nomeFileOlo = nomeFileOlo;
}
public String getNomeFilePitagora() {
return this.nomeFilePitagora;
}
public void setNomeFilePitagora(String nomeFilePitagora) {
this.nomeFilePitagora = nomeFilePitagora;
}
public Date getDataRicezioneKoOlo() {
return this.dataRicezioneKoOlo;
}
public void setDataRicezioneKoOlo(Date dataRicezioneKoOlo) {
this.dataRicezioneKoOlo = dataRicezioneKoOlo;
}
public Date getDataRicezioneKoPitagora() {
return this.dataRicezioneKoPitagora;
}
public void setDataRicezioneKoPitagora(Date dataRicezioneKoPitagora) {
this.dataRicezioneKoPitagora = dataRicezioneKoPitagora;
}
public Date getDataFineWait() {
return this.dataFineWait;
}
public void setDataFineWait(Date dataFineWait) {
this.dataFineWait = dataFineWait;
}
public Date getDataReinvioOlo() {
return this.dataReinvioOlo;
}
public void setDataReinvioOlo(Date dataReinvioOlo) {
this.dataReinvioOlo = dataReinvioOlo;
}
public Long getTimestampNotifica() {
return this.timestampNotifica;
}
public void setTimestampNotifica(Long timestampNotifica) {
this.timestampNotifica = timestampNotifica;
}
public Long getCorDuplicato() {
return this.corDuplicato;
}
public void setCorDuplicato(Long corDuplicato) {
this.corDuplicato = corDuplicato;
}
public String getDn1() {
return this.dn1;
}
public void setDn1(String dn1) {
this.dn1 = dn1;
}
public String getDn2() {
return this.dn2;
}
public void setDn2(String dn2) {
this.dn2 = dn2;
}
public String getDn3() {
return this.dn3;
}
public void setDn3(String dn3) {
this.dn3 = dn3;
}
public String getDn4() {
return this.dn4;
}
public void setDn4(String dn4) {
this.dn4 = dn4;
}
public String getDn5() {
return this.dn5;
}
public void setDn5(String dn5) {
this.dn5 = dn5;
}
public String getDn6() {
return this.dn6;
}
public void setDn6(String dn6) {
this.dn6 = dn6;
}
public String getDn7() {
return this.dn7;
}
public void setDn7(String dn7) {
this.dn7 = dn7;
}
public String getDn8() {
return this.dn8;
}
public void setDn8(String dn8) {
this.dn8 = dn8;
}
public String getDn9() {
return this.dn9;
}
public void setDn9(String dn9) {
this.dn9 = dn9;
}
public String getDn10() {
return this.dn10;
}
public void setDn10(String dn10) {
this.dn10 = dn10;
}
public String getStatoDn1() {
return this.statoDn1;
}
public void setStatoDn1(String statoDn1) {
this.statoDn1 = statoDn1;
}
public String getStatoDn2() {
return this.statoDn2;
}
public void setStatoDn2(String statoDn2) {
this.statoDn2 = statoDn2;
}
public String getStatoDn3() {
return this.statoDn3;
}
public void setStatoDn3(String statoDn3) {
this.statoDn3 = statoDn3;
}
public String getStatoDn4() {
return this.statoDn4;
}
public void setStatoDn4(String statoDn4) {
this.statoDn4 = statoDn4;
}
public String getStatoDn5() {
return this.statoDn5;
}
public void setStatoDn5(String statoDn5) {
this.statoDn5 = statoDn5;
}
public String getStatoDn6() {
return this.statoDn6;
}
public void setStatoDn6(String statoDn6) {
this.statoDn6 = statoDn6;
}
public String getStatoDn7() {
return this.statoDn7;
}
public void setStatoDn7(String statoDn7) {
this.statoDn7 = statoDn7;
}
public String getStatoDn8() {
return this.statoDn8;
}
public void setStatoDn8(String statoDn8) {
this.statoDn8 = statoDn8;
}
public String getStatoDn9() {
return this.statoDn9;
}
public void setStatoDn9(String statoDn9) {
this.statoDn9 = statoDn9;
}
public String getStatoDn10() {
return this.statoDn10;
}
public void setStatoDn10(String statoDn10) {
this.statoDn10 = statoDn10;
}
public String getCodCorrelazione() {
return this.codCorrelazione;
}
public void setCodCorrelazione(String codCorrelazione) {
this.codCorrelazione = codCorrelazione;
}
public String getEsitoA375Pitagora() {
return this.esitoA375Pitagora;
}
public void setEsitoA375Pitagora(String esitoA375Pitagora) {
this.esitoA375Pitagora = esitoA375Pitagora;
}
public String getEsitoDnaggA3751() {
return this.esitoDnaggA3751;
}
public void setEsitoDnaggA3751(String esitoDnaggA3751) {
this.esitoDnaggA3751 = esitoDnaggA3751;
}
public String getEsitoDnaggA3752() {
return this.esitoDnaggA3752;
}
public void setEsitoDnaggA3752(String esitoDnaggA3752) {
this.esitoDnaggA3752 = esitoDnaggA3752;
}
public String getEsitoDnaggA3753() {
return this.esitoDnaggA3753;
}
public void setEsitoDnaggA3753(String esitoDnaggA3753) {
this.esitoDnaggA3753 = esitoDnaggA3753;
}
public String getEsitoDnaggA3754() {
return this.esitoDnaggA3754;
}
public void setEsitoDnaggA3754(String esitoDnaggA3754) {
this.esitoDnaggA3754 = esitoDnaggA3754;
}
public String getEsitoDnaggA3755() {
return this.esitoDnaggA3755;
}
public void setEsitoDnaggA3755(String esitoDnaggA3755) {
this.esitoDnaggA3755 = esitoDnaggA3755;
}
public String getEsitoDnaggA3756() {
return this.esitoDnaggA3756;
}
public void setEsitoDnaggA3756(String esitoDnaggA3756) {
this.esitoDnaggA3756 = esitoDnaggA3756;
}
public String getEsitoDnaggA3757() {
return this.esitoDnaggA3757;
}
public void setEsitoDnaggA3757(String esitoDnaggA3757) {
this.esitoDnaggA3757 = esitoDnaggA3757;
}
public String getEsitoDnaggA3758() {
return this.esitoDnaggA3758;
}
public void setEsitoDnaggA3758(String esitoDnaggA3758) {
this.esitoDnaggA3758 = esitoDnaggA3758;
}
public String getEsitoDnaggA3759() {
return this.esitoDnaggA3759;
}
public void setEsitoDnaggA3759(String esitoDnaggA3759) {
this.esitoDnaggA3759 = esitoDnaggA3759;
}
public String getEsitoDnaggA37510() {
return this.esitoDnaggA37510;
}
public void setEsitoDnaggA37510(String esitoDnaggA37510) {
this.esitoDnaggA37510 = esitoDnaggA37510;
}
public String getCow2() {
return this.cow2;
}
public void setCow2(String cow2) {
this.cow2 = cow2;
}
public String getFlagDichiarazione() {
return this.flagDichiarazione;
}
public void setFlagDichiarazione(String flagDichiarazione) {
this.flagDichiarazione = flagDichiarazione;
}
public String getFlagDichiarazioneA375() {
return this.flagDichiarazioneA375;
}
public void setFlagDichiarazioneA375(String flagDichiarazioneA375) {
this.flagDichiarazioneA375 = flagDichiarazioneA375;
}
public String getModuloCc() {
return this.moduloCc;
}
public void setModuloCc(String moduloCc) {
this.moduloCc = moduloCc;
}
public String getModuloPartner() {
return this.moduloPartner;
}
public void setModuloPartner(String moduloPartner) {
this.moduloPartner = moduloPartner;
}
public String getProtocolloDms() {
return this.protocolloDms;
}
public void setProtocolloDms(String protocolloDms) {
this.protocolloDms = protocolloDms;
}
public Date getDataCreazioneSr() {
return this.dataCreazioneSr;
}
public void setDataCreazioneSr(Date dataCreazioneSr) {
this.dataCreazioneSr = dataCreazioneSr;
}
public String getIdPadre() {
return this.idPadre;
}
public void setIdPadre(String idPadre) {
this.idPadre = idPadre;
}
public String getCausaleKo() {
return this.causaleKo;
}
public void setCausaleKo(String causaleKo) {
this.causaleKo = causaleKo;
}
public Date getDataChiusuraCrm() {
return this.dataChiusuraCrm;
}
public void setDataChiusuraCrm(Date dataChiusuraCrm) {
this.dataChiusuraCrm = dataChiusuraCrm;
}
public Date getDataPrimaEsigenza() {
return this.dataPrimaEsigenza;
}
public void setDataPrimaEsigenza(Date dataPrimaEsigenza) {
this.dataPrimaEsigenza = dataPrimaEsigenza;
}
public String getCor2() {
return this.cor2;
}
public void setCor2(String cor2) {
this.cor2 = cor2;
}
public String getCos2() {
return this.cos2;
}
public void setCos2(String cos2) {
this.cos2 = cos2;
}
public String getCodiceOrdine() {
return this.codiceOrdine;
}
public void setCodiceOrdine(String codiceOrdine) {
this.codiceOrdine = codiceOrdine;
}
public Date getDataRicezioneTipocom2() {
return this.dataRicezioneTipocom2;
}
public void setDataRicezioneTipocom2(Date dataRicezioneTipocom2) {
this.dataRicezioneTipocom2 = dataRicezioneTipocom2;
}
public String getNominativoCliente() {
return this.nominativoCliente;
}
public void setNominativoCliente(String nominativoCliente) {
this.nominativoCliente = nominativoCliente;
}
public String getRecapitoAlternativo() {
return this.recapitoAlternativo;
}
public void setRecapitoAlternativo(String recapitoAlternativo) {
this.recapitoAlternativo = recapitoAlternativo;
}
public String getFlagSky() {
return this.flagSky;
}
public void setFlagSky(String flagSky) {
this.flagSky = flagSky;
}
}

View File

@@ -0,0 +1,297 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 23-ott-2008 15.31.04 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import it.valueteam.gnp.obj.StatoRichiestaRec;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpDbcfxgoOutRec.
* @see .GnpDbcfxgoOutRec
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpDbcfxgoOutRecDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbcfxgoOutRecDAO.class);
public static final String HIB_PROP_ID_RICHIESTA = "idRichiesta";
private static final String SQL_INVIATA_OLO="from GnpOloRichiesteOut gnp " +
"where gnp.idRichiesta=:idRichiesta " +
"order by gnp.dataInvioRichiesta desc";
private static final String SQL_NRO_INVII_OLO = "select count(*) from GnpStoricoRichiesteRec stor " +
"where stor.idRichiesta=:idRichiesta and stor.statoA="+StatoRichiestaRec.INVIATA;
private static final String SQL_INVIATA_PITAGORA_REGOLATORIO="from GnpPitagoraOutRec gnp " +
"where gnp.idRichiesta=:idRichiesta " +
"order by gnp.datadataCreazione desc";
private static final String SQL_INVIATA_PITAGORA_XDSL="from GnpPitagoraXdslOutRec gnp " +
"where gnp.idRichiesta=:idRichiesta " +
"order by gnp.datadataCreazione desc";
private static final String SQL_RICEVUTO_KO_OLO="SELECT inn.UNIQUE_ID, inn.DA_SCODARE, inn.NOME_FILE, MAX(inn.DATA_RICEZIONE) as dataRicezione, " +
"inn.TOP_CODICE_ORDINE_RECIPIENT, inn.TIPO_COMUNICAZIONE, inn.CODICE_OPERATORE_RECIPIENT, inn.CODICE_ORDINE_RECIPIENT, inn.COW, " +
"inn.COR, inn.COR2, inn.STATO_RICHIESTA, inn.CAUSALE_RIFIUTO, inn.CODICE_MOTIVO_RIFIUTO, inn.MOTIVO_RIFIUTO, " +
"inn.NUMERAZIONE_ERRATA, inn.CODICE_SESSIONE " +
"FROM gnp_richieste_rec rec, gnp_olo_richieste_out outt, gnp_olo_richieste_in inn " +
"WHERE inn.codice_ordine_recipient = outt.codice_ordine_recipient AND " +
"outt.id_richiesta = rec.id_richiesta AND " +
"rec.id_richiesta=:idRichiesta AND " +
"inn.tipo_comunicazione=:tipoComunicazione " +
"GROUP BY inn.UNIQUE_ID, inn.DA_SCODARE, inn.NOME_FILE, " +
"inn.TOP_CODICE_ORDINE_RECIPIENT, inn.TIPO_COMUNICAZIONE, inn.CODICE_OPERATORE_RECIPIENT, " +
"inn.CODICE_ORDINE_RECIPIENT, inn.COW, inn.COR, inn.COR2, inn.STATO_RICHIESTA, " +
"inn.CAUSALE_RIFIUTO, inn.CODICE_MOTIVO_RIFIUTO, inn.MOTIVO_RIFIUTO, " +
"inn.NUMERAZIONE_ERRATA, inn.CODICE_SESSIONE";
public void save(GnpDbcfxgoOutRec transientInstance) {
log.debug("saving GnpDbcfxgoOutRec instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbcfxgoOutRec instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbcfxgoOutRec model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbcfxgoOutRec ");
try {
String queryString = " from GnpDbcfxgoOutRec";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbcfxgoOutRec instance) {
log.debug("attaching dirty GnpDbcfxgoOutRec instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbcfxgoOutRec instance) {
log.debug("attaching clean GnpDbcfxgoOutRec instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbcfxgoOutRec persistentInstance) {
log.debug("deleting GnpDbcfxgoOutRec instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbcfxgoOutRec merge(GnpDbcfxgoOutRec detachedInstance) {
log.debug("merging GnpDbcfxgoOutRec instance");
try {
GnpDbcfxgoOutRec result = (GnpDbcfxgoOutRec) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbcfxgoOutRec instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutRec");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbcfxgoOutRec findById( java.lang.Long id) {
log.debug("getting GnpDbcfxgoOutRec instance with id: " + id);
try {
GnpDbcfxgoOutRec instance = (GnpDbcfxgoOutRec) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutRec", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbcfxgoOutRec instance) {
log.debug("finding GnpDbcfxgoOutRec instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbcfxgoOutRec")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findNomeFile_DataInvioRichiestaOLO(Long idRichiesta) {
try {
String queryString =SQL_INVIATA_OLO;
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter("idRichiesta", idRichiesta);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public Long findNumeroInviiOlo(Long idRichiesta) {
try {
String queryString =SQL_NRO_INVII_OLO;
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter("idRichiesta", idRichiesta);
return (Long)queryObject.uniqueResult();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findNomeFile_DataInvioRichiestaPitagoraReg(Long idRichiesta) {
try {
String queryString =SQL_INVIATA_PITAGORA_REGOLATORIO;
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter("idRichiesta", idRichiesta);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findNomeFile_DataInvioRichiestaPitagoraXdsl(Long idRichiesta) {
try {
String queryString =SQL_INVIATA_PITAGORA_XDSL;
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter("idRichiesta", idRichiesta);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findKoOlo(Long idRichiesta, int tipoComunicazione) {
try {
String queryString =SQL_RICEVUTO_KO_OLO;
Query queryObject = getSession().createSQLQuery(queryString).addEntity("inn",
GnpOloRichiesteIn.class);
queryObject.setParameter("idRichiesta", idRichiesta);
queryObject.setParameter("tipoComunicazione", tipoComunicazione);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,27 @@
<?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 8-mar-2010 12.11.32 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbp" table="GNP_DBP">
<id name="msisdn" type="string">
<column name="MSISDN" length="15" />
<generator class="assigned"></generator>
</id>
<property name="dco" type="date">
<column name="DCO" length="7" not-null="true" />
</property>
<property name="recipient" type="string">
<column name="RECIPIENT" length="4" not-null="true" />
</property>
<property name="routingNumber" type="string">
<column name="ROUTING_NUMBER" length="3" not-null="true" />
</property>
<property name="timeStamp" type="timestamp">
<column name="TIME_STAMP" length="7" not-null="true" />
</property>
<property name="daInviare" type="string">
<column name="DA_INVIARE" length="1" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,80 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 8-mar-2010 12.11.33 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpDbp generated by hbm2java
*/
public class GnpDbp implements java.io.Serializable {
private String msisdn;
private Date dco;
private String recipient;
private String routingNumber;
private Date timeStamp;
private String daInviare;
public GnpDbp() {
}
public GnpDbp(String msisdn, Date dco, String recipient, String routingNumber, Date timeStamp, String daInviare) {
this.msisdn = msisdn;
this.dco = dco;
this.recipient = recipient;
this.routingNumber = routingNumber;
this.timeStamp = timeStamp;
this.daInviare = daInviare;
}
public String getMsisdn() {
return this.msisdn;
}
public void setMsisdn(String msisdn) {
this.msisdn = msisdn;
}
public Date getDco() {
return this.dco;
}
public void setDco(Date dco) {
this.dco = dco;
}
public String getRecipient() {
return this.recipient;
}
public void setRecipient(String recipient) {
this.recipient = recipient;
}
public String getRoutingNumber() {
return this.routingNumber;
}
public void setRoutingNumber(String routingNumber) {
this.routingNumber = routingNumber;
}
public Date getTimeStamp() {
return this.timeStamp;
}
public void setTimeStamp(Date timeStamp) {
this.timeStamp = timeStamp;
}
public String getDaInviare() {
return this.daInviare;
}
public void setDaInviare(String daInviare) {
this.daInviare = daInviare;
}
}

View File

@@ -0,0 +1,209 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 8-mar-2010 12.11.18 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpDbp.
* @see .GnpDbp
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpDbpDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbpDAO.class);
public void save(GnpDbp transientInstance) {
log.debug("saving GnpDbp instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbp instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbp model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbp ");
try {
String queryString = " from GnpDbp";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbp instance) {
log.debug("attaching dirty GnpDbp instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbp instance) {
log.debug("attaching clean GnpDbp instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbp persistentInstance) {
log.debug("deleting GnpDbp instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbp merge(GnpDbp detachedInstance) {
log.debug("merging GnpDbp instance");
try {
GnpDbp result = (GnpDbp) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbp instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbp");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbp findById( java.lang.String id) {
log.debug("getting GnpDbp instance with id: " + id);
try {
GnpDbp instance = (GnpDbp) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbp", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbp instance) {
log.debug("finding GnpDbp instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbp")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
/*
* X4 2010 estrazione notifiche DBC da inviare agli OLO coinvolti nel processo DBP
*/
public List getNotificheToSendOlo()
{
String sqlQuery =
" SELECT MSISDN, DCO, RECIPIENT, ROUTING_NUMBER, TIME_STAMP, DA_INVIARE " +
" FROM GNP_DBP G WHERE G.DA_INVIARE = 1 ORDER BY G.TIME_STAMP ";
try
{
Query hqlQuery = getSession().createSQLQuery(sqlQuery).addEntity("G",GnpDbp.class);
return hqlQuery.list();
}
catch (RuntimeException re)
{
log.error("find by custom query failed", re);
throw re;
} finally
{
closeSession();
}
}
}

View File

@@ -0,0 +1,38 @@
<?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 26-apr-2010 9.39.50 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbpDbcIn" table="GNP_DBP_DBC_IN">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_DBP_DBC_IN</param>
</generator>
</id>
<property name="daScodare" type="java.lang.Long">
<column name="DA_SCODARE" precision="1" scale="0" not-null="true" />
</property>
<property name="msisdn" type="string">
<column name="MSISDN" length="15" not-null="true" />
</property>
<property name="dco" type="date">
<column name="DCO" length="7" not-null="true" />
</property>
<property name="recipient" type="string">
<column name="RECIPIENT" length="4" not-null="true" />
</property>
<property name="routingNumber" type="string">
<column name="ROUTING_NUMBER" length="3" not-null="true" />
</property>
<property name="idrichiestaDbc" type="string">
<column name="IDRICHIESTA_DBC" length="23" not-null="true" />
</property>
<property name="processoDbc" type="string">
<column name="PROCESSO_DBC" length="1" not-null="true" />
</property>
<property name="dataRicezione" type="timestamp">
<column name="DATA_RICEZIONE" length="7" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,106 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 26-apr-2010 9.39.51 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpDbpDbcIn generated by hbm2java
*/
public class GnpDbpDbcIn implements java.io.Serializable {
private Long uniqueId;
private Long daScodare;
private String msisdn;
private Date dco;
private String recipient;
private String routingNumber;
private String idrichiestaDbc;
private String processoDbc;
private Date dataRicezione;
public GnpDbpDbcIn() {
}
public GnpDbpDbcIn(Long daScodare, String msisdn, Date dco, String recipient, String routingNumber, String idrichiestaDbc, String processoDbc, Date dataRicezione) {
this.daScodare = daScodare;
this.msisdn = msisdn;
this.dco = dco;
this.recipient = recipient;
this.routingNumber = routingNumber;
this.idrichiestaDbc = idrichiestaDbc;
this.processoDbc = processoDbc;
this.dataRicezione = dataRicezione;
}
public Long getUniqueId() {
return this.uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public Long getDaScodare() {
return this.daScodare;
}
public void setDaScodare(Long daScodare) {
this.daScodare = daScodare;
}
public String getMsisdn() {
return this.msisdn;
}
public void setMsisdn(String msisdn) {
this.msisdn = msisdn;
}
public Date getDco() {
return this.dco;
}
public void setDco(Date dco) {
this.dco = dco;
}
public String getRecipient() {
return this.recipient;
}
public void setRecipient(String recipient) {
this.recipient = recipient;
}
public String getRoutingNumber() {
return this.routingNumber;
}
public void setRoutingNumber(String routingNumber) {
this.routingNumber = routingNumber;
}
public String getIdrichiestaDbc() {
return this.idrichiestaDbc;
}
public void setIdrichiestaDbc(String idrichiestaDbc) {
this.idrichiestaDbc = idrichiestaDbc;
}
public String getProcessoDbc() {
return this.processoDbc;
}
public void setProcessoDbc(String processoDbc) {
this.processoDbc = processoDbc;
}
public Date getDataRicezione() {
return this.dataRicezione;
}
public void setDataRicezione(Date dataRicezione) {
this.dataRicezione = dataRicezione;
}
}

View File

@@ -0,0 +1,186 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 26-apr-2010 9.39.57 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpDbpDbcIn.
* @see .GnpDbpDbcIn
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpDbpDbcInDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbpDbcInDAO.class);
public void save(GnpDbpDbcIn transientInstance) {
log.debug("saving GnpDbpDbcIn instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbpDbcIn instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbpDbcIn model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbpDbcIn ");
try {
String queryString = " from GnpDbpDbcIn";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbpDbcIn instance) {
log.debug("attaching dirty GnpDbpDbcIn instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbpDbcIn instance) {
log.debug("attaching clean GnpDbpDbcIn instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbpDbcIn persistentInstance) {
log.debug("deleting GnpDbpDbcIn instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbpDbcIn merge(GnpDbpDbcIn detachedInstance) {
log.debug("merging GnpDbpDbcIn instance");
try {
GnpDbpDbcIn result = (GnpDbpDbcIn) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbpDbcIn instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbpDbcIn");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbpDbcIn findById( java.lang.Long id) {
log.debug("getting GnpDbpDbcIn instance with id: " + id);
try {
GnpDbpDbcIn instance = (GnpDbpDbcIn) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbpDbcIn", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbpDbcIn instance) {
log.debug("finding GnpDbpDbcIn instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbpDbcIn")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,35 @@
<?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 26-apr-2010 9.36.42 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbpDbcScartoIn" table="GNP_DBP_DBC_SCARTO_IN">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_DBP_DBC_IN</param>
</generator>
</id>
<property name="msisdn" type="string">
<column name="MSISDN" length="15" />
</property>
<property name="dco" type="string">
<column name="DCO" length="10" />
</property>
<property name="recipient" type="string">
<column name="RECIPIENT" length="4" />
</property>
<property name="routingNumber" type="string">
<column name="ROUTING_NUMBER" length="3" />
</property>
<property name="idrichiestaDbc" type="string">
<column name="IDRICHIESTA_DBC" length="23" />
</property>
<property name="processoDbc" type="string">
<column name="PROCESSO_DBC" length="1" />
</property>
<property name="causaleScarto" type="string">
<column name="CAUSALE_SCARTO" length="200" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,96 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 26-apr-2010 9.36.43 by Hibernate Tools 3.2.0.CR1
/**
* GnpDbpDbcScartoIn generated by hbm2java
*/
public class GnpDbpDbcScartoIn implements java.io.Serializable {
private Long uniqueId;
private String msisdn;
private String dco;
private String recipient;
private String routingNumber;
private String idrichiestaDbc;
private String processoDbc;
private String causaleScarto;
public GnpDbpDbcScartoIn() {
}
public GnpDbpDbcScartoIn(String msisdn, String dco, String recipient, String routingNumber, String idrichiestaDbc, String processoDbc, String causaleScarto) {
this.msisdn = msisdn;
this.dco = dco;
this.recipient = recipient;
this.routingNumber = routingNumber;
this.idrichiestaDbc = idrichiestaDbc;
this.processoDbc = processoDbc;
this.causaleScarto = causaleScarto;
}
public Long getUniqueId() {
return this.uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public String getMsisdn() {
return this.msisdn;
}
public void setMsisdn(String msisdn) {
this.msisdn = msisdn;
}
public String getDco() {
return this.dco;
}
public void setDco(String dco) {
this.dco = dco;
}
public String getRecipient() {
return this.recipient;
}
public void setRecipient(String recipient) {
this.recipient = recipient;
}
public String getRoutingNumber() {
return this.routingNumber;
}
public void setRoutingNumber(String routingNumber) {
this.routingNumber = routingNumber;
}
public String getIdrichiestaDbc() {
return this.idrichiestaDbc;
}
public void setIdrichiestaDbc(String idrichiestaDbc) {
this.idrichiestaDbc = idrichiestaDbc;
}
public String getProcessoDbc() {
return this.processoDbc;
}
public void setProcessoDbc(String processoDbc) {
this.processoDbc = processoDbc;
}
public String getCausaleScarto() {
return this.causaleScarto;
}
public void setCausaleScarto(String causaleScarto) {
this.causaleScarto = causaleScarto;
}
}

View File

@@ -0,0 +1,186 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 26-apr-2010 9.36.08 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpDbpDbcScartoIn.
* @see .GnpDbpDbcScartoIn
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpDbpDbcScartoInDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbpDbcScartoInDAO.class);
public void save(GnpDbpDbcScartoIn transientInstance) {
log.debug("saving GnpDbpDbcScartoIn instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbpDbcScartoIn instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbpDbcScartoIn model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbpDbcScartoIn ");
try {
String queryString = " from GnpDbpDbcScartoIn";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbpDbcScartoIn instance) {
log.debug("attaching dirty GnpDbpDbcScartoIn instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbpDbcScartoIn instance) {
log.debug("attaching clean GnpDbpDbcScartoIn instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbpDbcScartoIn persistentInstance) {
log.debug("deleting GnpDbpDbcScartoIn instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbpDbcScartoIn merge(GnpDbpDbcScartoIn detachedInstance) {
log.debug("merging GnpDbpDbcScartoIn instance");
try {
GnpDbpDbcScartoIn result = (GnpDbpDbcScartoIn) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbpDbcScartoIn instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbpDbcScartoIn");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbpDbcScartoIn findById( java.lang.Long id) {
log.debug("getting GnpDbpDbcScartoIn instance with id: " + id);
try {
GnpDbpDbcScartoIn instance = (GnpDbpDbcScartoIn) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbpDbcScartoIn", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbpDbcScartoIn instance) {
log.debug("finding GnpDbpDbcScartoIn instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbpDbcScartoIn")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -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 30-apr-2010 9.53.49 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbpOloOut" table="GNP_DBP_OLO_OUT">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_OLO</param>
</generator>
</id>
<property name="nomeFile" type="string">
<column name="NOME_FILE" length="50" not-null="true" />
</property>
<property name="oloDestinatario" type="string">
<column name="OLO_DESTINATARIO" length="3" not-null="true" />
</property>
<property name="daInviare" type="java.lang.Long">
<column name="DA_INVIARE" precision="1" scale="0" not-null="true" />
</property>
<property name="dataInvio" type="timestamp">
<column name="DATA_INVIO" length="7" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,70 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 30-apr-2010 9.53.51 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpDbpOloOut generated by hbm2java
*/
public class GnpDbpOloOut implements java.io.Serializable {
private Long uniqueId;
private String nomeFile;
private String oloDestinatario;
private Long daInviare;
private Date dataInvio;
public GnpDbpOloOut() {
}
public GnpDbpOloOut(String nomeFile, String oloDestinatario, Long daInviare, Date dataInvio) {
this.nomeFile = nomeFile;
this.oloDestinatario = oloDestinatario;
this.daInviare = daInviare;
this.dataInvio = dataInvio;
}
public Long getUniqueId() {
return this.uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public String getNomeFile() {
return this.nomeFile;
}
public void setNomeFile(String nomeFile) {
this.nomeFile = nomeFile;
}
public String getOloDestinatario() {
return this.oloDestinatario;
}
public void setOloDestinatario(String oloDestinatario) {
this.oloDestinatario = oloDestinatario;
}
public Long getDaInviare() {
return this.daInviare;
}
public void setDaInviare(Long daInviare) {
this.daInviare = daInviare;
}
public Date getDataInvio() {
return this.dataInvio;
}
public void setDataInvio(Date dataInvio) {
this.dataInvio = dataInvio;
}
}

View File

@@ -0,0 +1,186 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 30-apr-2010 9.53.34 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpDbpOloOut.
* @see .GnpDbpOloOut
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpDbpOloOutDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbpOloOutDAO.class);
public void save(GnpDbpOloOut transientInstance) {
log.debug("saving GnpDbpOloOut instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbpOloOut instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbpOloOut model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbpOloOut ");
try {
String queryString = " from GnpDbpOloOut";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbpOloOut instance) {
log.debug("attaching dirty GnpDbpOloOut instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbpOloOut instance) {
log.debug("attaching clean GnpDbpOloOut instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbpOloOut persistentInstance) {
log.debug("deleting GnpDbpOloOut instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbpOloOut merge(GnpDbpOloOut detachedInstance) {
log.debug("merging GnpDbpOloOut instance");
try {
GnpDbpOloOut result = (GnpDbpOloOut) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbpOloOut instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbpOloOut");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbpOloOut findById( java.lang.Long id) {
log.debug("getting GnpDbpOloOut instance with id: " + id);
try {
GnpDbpOloOut instance = (GnpDbpOloOut) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbpOloOut", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbpOloOut instance) {
log.debug("finding GnpDbpOloOut instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbpOloOut")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -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 28-apr-2010 17.16.26 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbpOut" table="GNP_DBP_OUT">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_OLO</param>
</generator>
</id>
<property name="nomeFile" type="string">
<column name="NOME_FILE" length="50" not-null="true" />
</property>
<property name="xml" type="java.sql.Clob">
<column name="XML" not-null="true" />
</property>
<property name="idfile" type="java.lang.Long">
<column name="IDFILE" precision="4" scale="0" not-null="true" />
</property>
<property name="tipoFile" type="string">
<column name="TIPO_FILE" length="4" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,70 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 28-apr-2010 17.16.28 by Hibernate Tools 3.2.0.CR1
import java.sql.Clob;
/**
* GnpDbpOut generated by hbm2java
*/
public class GnpDbpOut implements java.io.Serializable {
private Long uniqueId;
private String nomeFile;
private Clob xml;
private Long idfile;
private String tipoFile;
public GnpDbpOut() {
}
public GnpDbpOut(String nomeFile, Clob xml, Long idfile, String tipoFile) {
this.nomeFile = nomeFile;
this.xml = xml;
this.idfile = idfile;
this.tipoFile = tipoFile;
}
public Long getUniqueId() {
return this.uniqueId;
}
public void setUniqueId(Long uniqueId) {
this.uniqueId = uniqueId;
}
public String getNomeFile() {
return this.nomeFile;
}
public void setNomeFile(String nomeFile) {
this.nomeFile = nomeFile;
}
public Clob getXml() {
return this.xml;
}
public void setXml(Clob xml) {
this.xml = xml;
}
public Long getIdfile() {
return this.idfile;
}
public void setIdfile(Long idfile) {
this.idfile = idfile;
}
public String getTipoFile() {
return this.tipoFile;
}
public void setTipoFile(String tipoFile) {
this.tipoFile = tipoFile;
}
}

View File

@@ -0,0 +1,218 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 28-apr-2010 17.16.19 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.sql.Clob;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpDbpOut.
* @see .GnpDbpOut
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpDbpOutDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbpOutDAO.class);
public void save(GnpDbpOut transientInstance) {
log.debug("saving GnpDbpOut instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbpOut instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbpOut model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbpOut ");
try {
String queryString = " from GnpDbpOut";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbpOut instance) {
log.debug("attaching dirty GnpDbpOut instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbpOut instance) {
log.debug("attaching clean GnpDbpOut instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbpOut persistentInstance) {
log.debug("deleting GnpDbpOut instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbpOut merge(GnpDbpOut detachedInstance) {
log.debug("merging GnpDbpOut instance");
try {
GnpDbpOut result = (GnpDbpOut) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbpOut instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbpOut");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbpOut findById( java.lang.Long id) {
log.debug("getting GnpDbpOut instance with id: " + id);
try {
GnpDbpOut instance = (GnpDbpOut) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbpOut", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbpOut instance) {
log.debug("finding GnpDbpOut instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbpOut")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
/*
* X4 2010 estrazione notifiche DBC da inviare agli OLO coinvolti nel processo DBP
*/
public Clob getXmlContentByFilename(String fileName)
{
/* http://opensource.atlassian.com/projects/hibernate/browse/HHH-3035
String sqlQuery =
" SELECT G.XML FROM GNP_DBP_OUT G WHERE G.NOME_FILE=:fName ";
try
{
Query hqlQuery = getSession().createSQLQuery(sqlQuery).addEntity("G",GnpDbpOut.class).setParameter("fName", fileName);
GnpDbpOut g = (GnpDbpOut)hqlQuery.list().get(0);
return g.getXml();
}
catch (RuntimeException re)
{
log.error("find by custom query failed", re);
throw re;
} finally
{
closeSession();
}*/
GnpDbpOut dbpOut = new GnpDbpOut();
log.debug("GnpDbpOutDAO.getXmlContentByFilename(), fileName="+fileName);
dbpOut.setNomeFile(fileName);
// ritorno la prima tupla tanto ne dovrebbe uscire una sola...!!!
dbpOut = (GnpDbpOut)this.findByExample(dbpOut).get(0);
return dbpOut.getXml();
}
}

View File

@@ -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 8-mar-2010 11.53.55 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbpStorico" table="GNP_DBP_STORICO">
<id name="msisdn" type="string">
<column name="MSISDN" length="15" />
<generator class="assigned"></generator>
</id>
<property name="dco" type="date">
<column name="DCO" length="7" not-null="true" />
</property>
<property name="recipient" type="string">
<column name="RECIPIENT" length="4" not-null="true" />
</property>
<property name="routingNumber" type="string">
<column name="ROUTING_NUMBER" length="3" not-null="true" />
</property>
<property name="timeStamp" type="timestamp">
<column name="TIME_STAMP" length="7" not-null="true" />
</property>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,71 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 8-mar-2010 11.53.56 by Hibernate Tools 3.2.0.CR1
import java.util.Date;
/**
* GnpDbpStorico generated by hbm2java
*/
public class GnpDbpStorico implements java.io.Serializable {
private String msisdn;
private Date dco;
private String recipient;
private String routingNumber;
private Date timeStamp;
public GnpDbpStorico() {
}
public GnpDbpStorico(String msisdn, Date dco, String recipient, String routingNumber, Date timeStamp) {
this.msisdn = msisdn;
this.dco = dco;
this.recipient = recipient;
this.routingNumber = routingNumber;
this.timeStamp = timeStamp;
}
public String getMsisdn() {
return this.msisdn;
}
public void setMsisdn(String msisdn) {
this.msisdn = msisdn;
}
public Date getDco() {
return this.dco;
}
public void setDco(Date dco) {
this.dco = dco;
}
public String getRecipient() {
return this.recipient;
}
public void setRecipient(String recipient) {
this.recipient = recipient;
}
public String getRoutingNumber() {
return this.routingNumber;
}
public void setRoutingNumber(String routingNumber) {
this.routingNumber = routingNumber;
}
public Date getTimeStamp() {
return this.timeStamp;
}
public void setTimeStamp(Date timeStamp) {
this.timeStamp = timeStamp;
}
}

View File

@@ -0,0 +1,186 @@
package it.valueteam.gnp.dao.db.hb;
// Generated 8-mar-2010 11.53.27 by Hibernate Tools Customizzato per GNP da C.A. 3.2.0.CR1
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.LockMode;
import org.hibernate.criterion.Example;
/**
* DAO object for domain model class GnpDbpStorico.
* @see .GnpDbpStorico
* @author C.A.
*/
import org.hibernate.Query;
import org.hibernate.criterion.Criterion;
import org.hibernate.Criteria;
import java.util.*;
public class GnpDbpStoricoDAO extends BaseHibernateDAO{
protected static final Log log = LogFactory.getLog(GnpDbpStoricoDAO.class);
public void save(GnpDbpStorico transientInstance) {
log.debug("saving GnpDbpStorico instance");
try {
getSession().save(transientInstance);
log.debug("save successful");
}
catch (RuntimeException re) {
log.error("save failed", re);
throw re;
}
}
public List findByProperty(String propertyName, Object value) {
log.debug("finding GnpDbpStorico instance with property: " + propertyName
+ ", value: " + value);
try {
String queryString = "select model from GnpDbpStorico model where model."
+ propertyName + "= ?";
Query queryObject = getSession().createQuery(queryString);
queryObject.setParameter(0, value);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find by property name failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findAll() {
log.debug("finding all GnpDbpStorico ");
try {
String queryString = " from GnpDbpStorico";
Query queryObject = getSession().createQuery(queryString);
return queryObject.list();
} catch (RuntimeException re) {
log.error("find all name failed", re);
throw re;
}finally {
closeSession();
}
}
public void attachDirty(GnpDbpStorico instance) {
log.debug("attaching dirty GnpDbpStorico instance");
try {
getSession().saveOrUpdate(instance);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void attachClean(GnpDbpStorico instance) {
log.debug("attaching clean GnpDbpStorico instance");
try {
getSession().lock(instance, LockMode.NONE);
log.debug("attach successful");
}
catch (RuntimeException re) {
log.error("attach failed", re);
throw re;
}
}
public void delete(GnpDbpStorico persistentInstance) {
log.debug("deleting GnpDbpStorico instance");
try {
getSession().delete(persistentInstance);
log.debug("delete successful");
}
catch (RuntimeException re) {
log.error("delete failed", re);
throw re;
}
}
public GnpDbpStorico merge(GnpDbpStorico detachedInstance) {
log.debug("merging GnpDbpStorico instance");
try {
GnpDbpStorico result = (GnpDbpStorico) getSession().merge(detachedInstance);
log.debug("merge successful");
flush();
return result;
}
catch (RuntimeException re) {
log.error("merge failed", re);
throw re;
}
}
public List findByCriteria(List criterion) {
log.debug("finding GnpDbpStorico instance by criteria");
try {
Criteria crit = getSession() .createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbpStorico");
Iterator iter = criterion.iterator();
while (iter.hasNext()) {
crit.add((Criterion) iter.next());
}
List results = crit.list();
log.debug("find by criteria successful, result size: "
+ results.size());
return results;
} catch (RuntimeException e) {
log.error("find by criteria failed", e);
throw e;
} finally {
closeSession();
}
}
public GnpDbpStorico findById( java.lang.String id) {
log.debug("getting GnpDbpStorico instance with id: " + id);
try {
GnpDbpStorico instance = (GnpDbpStorico) getSession()
.get("it.valueteam.gnp.dao.db.hb.GnpDbpStorico", id);
if (instance==null) {
log.debug("get successful, no instance found");
}
else {
log.debug("get successful, instance found");
}
return instance;
}
catch (RuntimeException re) {
log.error("get failed", re);
throw re;
}
finally {
closeSession();
}
}
public List findByExample(GnpDbpStorico instance) {
log.debug("finding GnpDbpStorico instance by example");
try {
List results = getSession()
.createCriteria("it.valueteam.gnp.dao.db.hb.GnpDbpStorico")
.add(Example.create(instance))
.list();
log.debug("find by example successful, result size: " + results.size());
return results;
}
catch (RuntimeException re) {
log.error("find by example failed", re);
throw re;
}
finally {
closeSession();
}
}
}

View File

@@ -0,0 +1,41 @@
<?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-2016 17.12.42 by Hibernate Tools 3.2.0.CR1 -->
<hibernate-mapping>
<class name="it.valueteam.gnp.dao.db.hb.GnpDbssDonorOut" table="GNP_DBSS_DONOR_OUT">
<id name="uniqueId" type="java.lang.Long">
<column name="UNIQUE_ID" precision="22" scale="0" />
<generator class="sequence">
<param name="sequence">SEQ_REC_DBSS_OUT</param>
</generator>
</id>
<property name="cowDonating" type="string">
<column name="COW_DONATING" length="3" not-null="true" />
</property>
<property name="dn" type="string">
<column name="DN" length="12" not-null="true" />
</property>
<property name="codiceSessione" type="string">
<column name="CODICE_SESSIONE" length="50" not-null="true" />
</property>
<property name="tipoChiamata" type="string">
<column name="TIPO_CHIAMATA" length="1" not-null="true" />
</property>
<property name="dataInvio" type="timestamp">
<column name="DATA_INVIO" length="7" />
</property>
<property name="respCodEsito" type="string">
<column name="RESP_COD_ESITO" length="3" />
</property>
<property name="respDescrEsito" type="string">
<column name="RESP_DESCR_ESITO" length="60" />
</property>
<property name="respDataRicezione" type="timestamp">
<column name="RESP_DATA_RICEZIONE" length="7" />
</property>
<property name="respCodiceCliente" type="string">
<column name="RESP_CODICE_CLIENTE" length="30" />
</property>
</class>
</hibernate-mapping>

Some files were not shown because too many files have changed in this diff Show More