it.cnr.contab.utenze00.comp.AssBpAccessoComponent Maven / Gradle / Ivy
/*
* Copyright (C) 2019 Consiglio Nazionale delle Ricerche
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
package it.cnr.contab.utenze00.comp;
import it.cnr.contab.utenze00.bulk.AccessoBulk;
import it.cnr.contab.utenze00.bulk.AccessoHome;
import it.cnr.contab.utenze00.bulk.AssBpAccessoBulk;
import it.cnr.contab.utenze00.bulk.AssBpAccessoHome;
import it.cnr.jada.UserContext;
import it.cnr.jada.comp.ComponentException;
import it.cnr.jada.persistency.sql.FindClause;
import it.cnr.jada.persistency.sql.SQLBuilder;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
/**
* Classe che ridefinisce alcune operazioni di CRUD su CdsBulk e Unita_organizzativaBulk
*/
public class AssBpAccessoComponent extends it.cnr.jada.comp.CRUDComponent {
public AssBpAccessoComponent() {
}
public java.util.List findAccessoByBP(UserContext userContext, String bp) throws ComponentException {
try {
AssBpAccessoHome home = (AssBpAccessoHome) getHome(userContext, AssBpAccessoBulk.class);
SQLBuilder sql = (SQLBuilder) super.select(userContext, null, new AssBpAccessoBulk());
sql.addSQLClause("AND", "business_process", sql.EQUALS, bp);
List lista = home.fetchAll(sql);
if (lista != null && !lista.isEmpty()) {
for (Iterator © 2015 - 2025 Weber Informatics LLC | Privacy Policy