Examples of TypeOfWorkHours


Examples of org.libreplan.business.costcategories.entities.TypeOfWorkHours

    private void createPredicateLines(Collection<OrderElement> orderElements) {
        String type = filterType.getValue();
        Resource resource = getSelectedResource();
        Date startDate = filterStartDateLine.getValue();
        Date finishDate = filterFinishDateLine.getValue();
        TypeOfWorkHours hoursType = getSelectedHoursType();

        predicates.clear();
        for (OrderElement each : orderElements) {
            predicates.addAll(createWRLPredicates(type, resource, startDate,
                    finishDate, each, hoursType));
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.TypeOfWorkHours

    }

    public final static TypeOfWorkHours toEntity(
            TypeOfWorkHoursDTO typeOfWorkHoursDTO) {

        TypeOfWorkHours typeOfWorkHours = TypeOfWorkHours.createUnvalidated(
                StringUtils.trim(typeOfWorkHoursDTO.code), StringUtils
                        .trim(typeOfWorkHoursDTO.name),
                typeOfWorkHoursDTO.enabled, typeOfWorkHoursDTO.defaultPrice);

        return typeOfWorkHours;
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.TypeOfWorkHours

            hourCost.setEndDate(DateConverter.toLocalDate(hourCostDTO.endDate));
        }

        if (hourCostDTO.type != null) {
            try {
                TypeOfWorkHours typeOfWorkHours = Registry
                        .getTypeOfWorkHoursDAO().findUniqueByCode(
                                hourCostDTO.type);
                hourCost.setType(typeOfWorkHours);
            } catch (InstanceNotFoundException e) {
                throw new ValidationException(
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.TypeOfWorkHours

            hourCost.setEndDate(DateConverter.toLocalDate(hourCostDTO.endDate));
        }

        if (hourCostDTO.type != null) {
            try {
                TypeOfWorkHours typeOfWorkHours = Registry
                        .getTypeOfWorkHoursDAO().findUniqueByCode(
                                hourCostDTO.type);
                hourCost.setType(typeOfWorkHours);
            } catch (InstanceNotFoundException e) {
                throw new ValidationException(
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.TypeOfWorkHours

            row.appendChild(lbHoursType);
            return;
        }

        // First time is rendered, select first item
        TypeOfWorkHours type = hourCost.getType();
        if (hourCost.isNewObject() && type == null) {
            Listitem item = lbHoursType.getItemAtIndex(0);
            item.setSelected(true);
            setHoursType(hourCost, item);
        } else {
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.TypeOfWorkHours

        row.appendChild(lbHoursType);
    }

    private void setHoursType(HourCost hourCost, Listitem item) {
        TypeOfWorkHours value = item != null ? (TypeOfWorkHours) item
                .getValue() : null;
        hourCost.setType(value);
        if (value != null) {
            final BigDecimal defaultPrice = value.getDefaultPrice();
            final Decimalbox dbPricePerHour = (Decimalbox) item.getParent().getNextSibling();
            hourCost.setPriceCost(defaultPrice);
            if (dbPricePerHour != null) {
                dbPricePerHour.setValue(defaultPrice);
            }
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.TypeOfWorkHours

        Configuration configuration = configurationDAO.getConfiguration();

        // TypeOfWorkHoursBootstrap creates the TypeOfWorkHours objects
        // specified by PredefinedWorkReportTypes if there isn't any
        // TypeOfWorkHours in the database
        TypeOfWorkHours typeOfWorkHours;
        try {
            typeOfWorkHours = typeOfWorkHoursDAO
                    .findUniqueByName(PredefinedWorkReportTypes.DEFAULT
                            .getName());
        } catch (InstanceNotFoundException e) {
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.TypeOfWorkHours

        return typeOfWorkHoursDAO.findActive();
    }

    @Override
    public boolean entryMatchesText(Object obj, String text) {
        TypeOfWorkHours typeOfWorkHours = (TypeOfWorkHours) obj;
        text = StringUtils.trim(text.toLowerCase());
        return checkContainsText(typeOfWorkHours.getName(), text);
    }
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.TypeOfWorkHours

        return original.toLowerCase().contains(text);
    }

    @Override
    public String objectToString(Object obj) {
        TypeOfWorkHours typeOfWorkHours = (TypeOfWorkHours) obj;
        return typeOfWorkHours.getName();
    }
View Full Code Here

Examples of org.libreplan.business.costcategories.entities.TypeOfWorkHours

        return dao.findActive();
    }

    @Override
    public String _toString(Object value) {
        final TypeOfWorkHours type = (TypeOfWorkHours) value;
        return (type != null) ? type.getName() : "";
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.