use of it.cnr.contab.docamm00.fatturapa.bulk in project sigla-main by consiglionazionaledellericerche.
the class Ass_inv_bene_fatturaHome method makePersistentAssocia.
/*
* Permette, una volta fatte tutte le operazioni di Fattura e di Inventario,
* di rendere persistente la tabella "righeFatturaHash", la quale contiene le associazioni
* fra le righe di Fattura e i Beni ad esse associati.
*/
public void makePersistentAssocia(UserContext userContext, Ass_inv_bene_fatturaBulk associaBulk, it.cnr.contab.docamm00.docs.bulk.Documento_genericoBulk doc) throws PersistencyException, IntrospectionException {
PersistentHome apgHome = getHomeCache().getHome(Inventario_beni_apgBulk.class);
SQLBuilder sql = apgHome.createSQLBuilder();
sql.addSQLClause("AND", "INVENTARIO_BENI_APG.LOCAL_TRANSACTION_ID", sql.EQUALS, associaBulk.getLocal_transactionID());
sql.addSQLClause("AND", "INVENTARIO_BENI_APG.PG_BUONO_C_S", sql.GREATER, "0");
List beni_apg = apgHome.fetchAll(sql);
Ass_inv_bene_fatturaBulk nuova_associazione = new Ass_inv_bene_fatturaBulk();
for (Iterator i = beni_apg.iterator(); i.hasNext(); ) {
Inventario_beni_apgBulk bene_apg = (Inventario_beni_apgBulk) i.next();
try {
// r.p. Prendo il progressivo dalla fattura_passivaBulk perchè viene aggiornato
nuova_associazione.setRiga_doc_gen(new Documento_generico_rigaBulk(doc.getCd_cds(), doc.getCd_tipo_documento_amm(), doc.getCd_unita_organizzativa(), doc.getEsercizio(), doc.getPg_documento_generico(), bene_apg.getProgressivo_riga()));
nuova_associazione.getRiga_doc_gen().setDocumento_generico(new Documento_genericoBulk(doc.getCd_cds(), doc.getCd_tipo_documento_amm(), doc.getCd_unita_organizzativa(), doc.getEsercizio(), doc.getPg_documento_generico()));
nuova_associazione.setNr_inventario(bene_apg.getNr_inventario());
nuova_associazione.setProgressivo(bene_apg.getProgressivo());
nuova_associazione.setTest_buono(new Buono_carico_scaricoBulk(bene_apg.getPg_inventario(), bene_apg.getTi_documento(), bene_apg.getEsercizio(), bene_apg.getPg_buono_c_s()));
nuova_associazione.setUser(doc.getUser());
// perchè gia' loccata in modifica
nuova_associazione.setPg_riga(new Long((Long) findAndLockMax(nuova_associazione, "pg_riga", new Long(0))).longValue() + 1);
insert(nuova_associazione, userContext);
apgHome.delete(bene_apg, userContext);
} catch (it.cnr.jada.bulk.BusyResourceException e) {
nuova_associazione.setPg_riga(new Long((Long) findMax(nuova_associazione, "pg_riga", new Long(0))).longValue() + 1);
insert(nuova_associazione, userContext);
apgHome.delete(bene_apg, userContext);
// throw new PersistencyException(e);
}
}
}
use of it.cnr.contab.docamm00.fatturapa.bulk in project sigla-main by consiglionazionaledellericerche.
the class AutoFatturaComponentSessionBean method estraeSezionali.
public java.util.Vector estraeSezionali(it.cnr.jada.UserContext param0, it.cnr.contab.docamm00.docs.bulk.AutofatturaBulk param1) throws it.cnr.jada.comp.ComponentException, javax.ejb.EJBException {
pre_component_invocation(param0, componentObj);
try {
java.util.Vector result = ((AutoFatturaComponent) componentObj).estraeSezionali(param0, param1);
component_invocation_succes(param0, componentObj);
return result;
} catch (it.cnr.jada.comp.NoRollbackException e) {
component_invocation_succes(param0, componentObj);
throw e;
} catch (it.cnr.jada.comp.ComponentException e) {
component_invocation_failure(param0, componentObj);
throw e;
} catch (RuntimeException e) {
throw uncaughtRuntimeException(param0, componentObj, e);
} catch (Error e) {
throw uncaughtError(param0, componentObj, e);
}
}
use of it.cnr.contab.docamm00.fatturapa.bulk in project sigla-main by consiglionazionaledellericerche.
the class FatturaAttivaSingolaComponentSessionBean method findDettagli.
public java.util.List findDettagli(it.cnr.jada.UserContext param0, it.cnr.contab.docamm00.docs.bulk.Fattura_attivaBulk param1) throws it.cnr.jada.comp.ComponentException, it.cnr.jada.persistency.PersistencyException, it.cnr.jada.persistency.IntrospectionException, javax.ejb.EJBException {
pre_component_invocation(param0, componentObj);
try {
java.util.List result = ((FatturaAttivaSingolaComponent) componentObj).findDettagli(param0, param1);
component_invocation_succes(param0, componentObj);
return result;
} catch (it.cnr.jada.comp.NoRollbackException e) {
component_invocation_succes(param0, componentObj);
throw e;
} catch (it.cnr.jada.comp.ComponentException e) {
component_invocation_failure(param0, componentObj);
throw e;
} catch (it.cnr.jada.persistency.PersistencyException e) {
component_invocation_failure(param0, componentObj);
throw e;
} catch (it.cnr.jada.persistency.IntrospectionException e) {
component_invocation_failure(param0, componentObj);
throw e;
} catch (RuntimeException e) {
throw uncaughtRuntimeException(param0, componentObj, e);
} catch (Error e) {
throw uncaughtError(param0, componentObj, e);
}
}
use of it.cnr.contab.docamm00.fatturapa.bulk in project sigla-main by consiglionazionaledellericerche.
the class FatturaAttivaSingolaComponentSessionBean method contabilizzaDettagliSelezionati.
public it.cnr.contab.docamm00.docs.bulk.Fattura_attivaBulk contabilizzaDettagliSelezionati(it.cnr.jada.UserContext param0, it.cnr.contab.docamm00.docs.bulk.Fattura_attivaBulk param1, java.util.Collection param2, it.cnr.contab.doccont00.core.bulk.Accertamento_scadenzarioBulk param3) throws it.cnr.jada.comp.ComponentException, javax.ejb.EJBException {
pre_component_invocation(param0, componentObj);
try {
it.cnr.contab.docamm00.docs.bulk.Fattura_attivaBulk result = ((FatturaAttivaSingolaComponent) componentObj).contabilizzaDettagliSelezionati(param0, param1, param2, param3);
component_invocation_succes(param0, componentObj);
return result;
} catch (it.cnr.jada.comp.NoRollbackException e) {
component_invocation_succes(param0, componentObj);
throw e;
} catch (it.cnr.jada.comp.ComponentException e) {
component_invocation_failure(param0, componentObj);
throw e;
} catch (RuntimeException e) {
throw uncaughtRuntimeException(param0, componentObj, e);
} catch (Error e) {
throw uncaughtError(param0, componentObj, e);
}
}
use of it.cnr.contab.docamm00.fatturapa.bulk in project sigla-main by consiglionazionaledellericerche.
the class FatturaAttivaSingolaComponentSessionBean method stornaDettagli.
public it.cnr.contab.docamm00.docs.bulk.Nota_di_credito_attivaBulk stornaDettagli(it.cnr.jada.UserContext param0, it.cnr.contab.docamm00.docs.bulk.Nota_di_credito_attivaBulk param1, java.util.List param2, java.util.Hashtable param3) throws it.cnr.jada.comp.ComponentException, javax.ejb.EJBException {
pre_component_invocation(param0, componentObj);
try {
it.cnr.contab.docamm00.docs.bulk.Nota_di_credito_attivaBulk result = ((FatturaAttivaSingolaComponent) componentObj).stornaDettagli(param0, param1, param2, param3);
component_invocation_succes(param0, componentObj);
return result;
} catch (it.cnr.jada.comp.NoRollbackException e) {
component_invocation_succes(param0, componentObj);
throw e;
} catch (it.cnr.jada.comp.ComponentException e) {
component_invocation_failure(param0, componentObj);
throw e;
} catch (RuntimeException e) {
throw uncaughtRuntimeException(param0, componentObj, e);
} catch (Error e) {
throw uncaughtError(param0, componentObj, e);
}
}
Aggregations