Package org.libreplan.business.common.exceptions

Examples of org.libreplan.business.common.exceptions.InstanceNotFoundException


    public HourCost getHourCostByCode(String code)
            throws InstanceNotFoundException {

        if (StringUtils.isBlank(code)) {
            throw new InstanceNotFoundException(code, HourCost.class.getName());
        }

        for (HourCost c : this.hourCosts) {
            if (c.getCode().equalsIgnoreCase(StringUtils.trim(code))) {
                return c;
            }
        }

        throw new InstanceNotFoundException(code, HourCost.class.getName());
    }
View Full Code Here


    public BigDecimal getPriceCostByTypeOfWorkHour(String code)
            throws InstanceNotFoundException {

        if (StringUtils.isBlank(code)) {
            throw new InstanceNotFoundException(code, HourCost.class.getName());
        }

        for (HourCost c : this.hourCosts) {
            if (c.getType().getCode().equalsIgnoreCase(StringUtils.trim(code))) {
                return c.getPriceCost();
            }
        }

        throw new InstanceNotFoundException(code, HourCost.class.getName());
    }
View Full Code Here

            if (l.getType().equals(type)) {
                return l;
            }
        }

        throw new InstanceNotFoundException(type, LabelType.class.getName());

    }
View Full Code Here

        query.setParameter("name", name);

        OrderElementTemplate orderElementTemplate = (OrderElementTemplate) query
                .uniqueResult();
        if (orderElementTemplate == null) {
            throw new InstanceNotFoundException(null, "OrderElemenetTemplate");
        }
        return orderElementTemplate;
    }
View Full Code Here

TOP

Related Classes of org.libreplan.business.common.exceptions.InstanceNotFoundException

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.