Package beans.expenditure.entity

Examples of beans.expenditure.entity.Expenditure


       
        List list = findEntityList(Expenditure.class, "serviceRender", entity);
        List<ExpenditureDetails> res = new ArrayList<ExpenditureDetails>();
        Iterator i = list.iterator();
        while (i.hasNext()) {
            Expenditure j = (Expenditure) i.next();
            res.add(j.getDetails((RightChecker) this));
        }
        return res;
    }
View Full Code Here


    @Override
    public ModificationInfo setExpenditure(ExpenditureDetails details) throws ClipsServerException {
        checkCommandAccessibility(COMMAND_MODIFY);
        ServiceRender entity = getExistentEntity();

        Expenditure exp = null;
        if (details.id != 0) {
            exp = findEntity(Expenditure.class, details.id);
            checkTheSame(exp.getServiceRender());
        } else {
            exp = new Expenditure();
            exp.setServiceRender(entity);
        }
        AuditDoc<Expenditure> auditExp = new AuditDoc<Expenditure>(exp, getCollaborator());
        exp.setQuantity(details.quantity);
        exp.setType(findEntity(ExpenditureType.class, details.expenTypeID));
        int id = saveEntity(exp);
        auditExp.check(exp);
        return new ModificationInfo(id, persistAudit(auditExp));
    }
View Full Code Here

     */
    @Override
    public ModificationInfo removeExpenditure(int id) throws ClipsServerException {
        checkCommandAccessibility(COMMAND_MODIFY);
        checkEntityExist();
        Expenditure exp = findEntity(Expenditure.class, id);
        checkTheSame(exp.getServiceRender());
        AuditDoc<Expenditure> auditExp = new AuditDoc<Expenditure>(exp, getCollaborator());
        manager.remove(exp);
        auditExp.check(null);
        return new ModificationInfo(persistAudit(auditExp));
    }
View Full Code Here

TOP

Related Classes of beans.expenditure.entity.Expenditure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.