Search in sources :

Example 21 with it.cnr.contab.docamm00.fatturapa.bulk

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);
        }
    }
}
Also used : SQLBuilder(it.cnr.jada.persistency.sql.SQLBuilder) Documento_genericoBulk(it.cnr.contab.docamm00.docs.bulk.Documento_genericoBulk) Inventario_beni_apgBulk(it.cnr.contab.inventario01.bulk.Inventario_beni_apgBulk) Documento_generico_rigaBulk(it.cnr.contab.docamm00.docs.bulk.Documento_generico_rigaBulk) Buono_carico_scaricoBulk(it.cnr.contab.inventario01.bulk.Buono_carico_scaricoBulk) Iterator(java.util.Iterator) List(java.util.List) PersistentHome(it.cnr.jada.persistency.sql.PersistentHome) it.cnr.jada.bulk(it.cnr.jada.bulk)

Example 22 with it.cnr.contab.docamm00.fatturapa.bulk

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);
    }
}
Also used : Vector(java.util.Vector) AutoFatturaComponent(it.cnr.contab.docamm00.comp.AutoFatturaComponent) ComponentException(it.cnr.jada.comp.ComponentException)

Example 23 with it.cnr.contab.docamm00.fatturapa.bulk

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);
    }
}
Also used : List(java.util.List) PersistencyException(it.cnr.jada.persistency.PersistencyException) FatturaAttivaSingolaComponent(it.cnr.contab.docamm00.comp.FatturaAttivaSingolaComponent) ComponentException(it.cnr.jada.comp.ComponentException)

Example 24 with it.cnr.contab.docamm00.fatturapa.bulk

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);
    }
}
Also used : FatturaAttivaSingolaComponent(it.cnr.contab.docamm00.comp.FatturaAttivaSingolaComponent) ComponentException(it.cnr.jada.comp.ComponentException) Fattura_attivaBulk(it.cnr.contab.docamm00.docs.bulk.Fattura_attivaBulk)

Example 25 with it.cnr.contab.docamm00.fatturapa.bulk

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);
    }
}
Also used : Nota_di_credito_attivaBulk(it.cnr.contab.docamm00.docs.bulk.Nota_di_credito_attivaBulk) FatturaAttivaSingolaComponent(it.cnr.contab.docamm00.comp.FatturaAttivaSingolaComponent) ComponentException(it.cnr.jada.comp.ComponentException)

Aggregations

ComponentException (it.cnr.jada.comp.ComponentException)46 PersistencyException (it.cnr.jada.persistency.PersistencyException)23 SQLBuilder (it.cnr.jada.persistency.sql.SQLBuilder)18 it.cnr.contab.docamm00.docs.bulk (it.cnr.contab.docamm00.docs.bulk)13 BusinessProcessException (it.cnr.jada.action.BusinessProcessException)13 FatturaAttivaSingolaComponent (it.cnr.contab.docamm00.comp.FatturaAttivaSingolaComponent)12 FatturaPassivaComponent (it.cnr.contab.docamm00.comp.FatturaPassivaComponent)12 Fattura_passivaBulk (it.cnr.contab.docamm00.docs.bulk.Fattura_passivaBulk)11 DocumentoGenericoComponent (it.cnr.contab.docamm00.comp.DocumentoGenericoComponent)10 Documento_genericoBulk (it.cnr.contab.docamm00.docs.bulk.Documento_genericoBulk)10 it.cnr.jada.bulk (it.cnr.jada.bulk)10 Fattura_attivaBulk (it.cnr.contab.docamm00.docs.bulk.Fattura_attivaBulk)9 it.cnr.contab.doccont00.core.bulk (it.cnr.contab.doccont00.core.bulk)9 VIntrastatBulk (it.cnr.contab.docamm00.docs.bulk.VIntrastatBulk)8 VIntrastatHome (it.cnr.contab.docamm00.docs.bulk.VIntrastatHome)8 List (java.util.List)8 FatturaAttivaSingolaComponentSession (it.cnr.contab.docamm00.ejb.FatturaAttivaSingolaComponentSession)7 Categoria_gruppo_inventBulk (it.cnr.contab.docamm00.tabrif.bulk.Categoria_gruppo_inventBulk)7 it.cnr.contab.inventario01.bulk (it.cnr.contab.inventario01.bulk)7 ApplicationException (it.cnr.jada.comp.ApplicationException)7