Package beans.expenditure.entity

Examples of beans.expenditure.entity.ExpenditureDefault


        Service service = findEntity(Service.class, serviceID);
        Collection<ExpenditureDefault> list = findEntityList(ExpenditureDefault.class, "service", service);
        List<ExpenditureDetails> res = new ArrayList<ExpenditureDetails>();
        Iterator<ExpenditureDefault> i = list.iterator();
        while(i.hasNext()) {
            ExpenditureDefault j = (ExpenditureDefault) i.next();
            res.add(j.getDetails((RightChecker) this));
        }
        return res;        
    }
View Full Code Here


     *          безопастности либо произошла ошибка     *
     */
    @Override
    public int setExpenditure(ExpenditureDetails details) throws ClipsServerException {
        checkCommandAccessibility(COMMAND_WRITE_EXPENDITURE);
        ExpenditureDefault exp = null;
       
        if(details.id != 0) {
            exp = findEntity(ExpenditureDefault.class, details.id);
            if(details.parentID != exp.getService().getId()) {
                throw new EDataIntegrity("Подмена услуги запрещена");
            }
        } else {
            exp = new ExpenditureDefault();
            exp.setService(findEntity(Service.class, details.parentID));
        }       
       
        exp.setQuantity(details.quantity);
        exp.setType(findEntity(ExpenditureType.class, details.expenTypeID));
       
        return saveEntity(exp);
    }
View Full Code Here

     *          безопастности либо произошла ошибка     *
     */
    @Override
    public void removeExpenditure(int id) throws ClipsServerException {
        checkCommandAccessibility(COMMAND_WRITE_EXPENDITURE);
        ExpenditureDefault exp = findEntity(ExpenditureDefault.class, id);
        removeEntity(exp);
    }      
View Full Code Here

TOP

Related Classes of beans.expenditure.entity.ExpenditureDefault

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.