Package org.joda.time

Examples of org.joda.time.LocalDate.compareTo()


        LocalDate min = periodicity.getStart(workReportDate);
        LocalDate max = periodicity.getEnd(workReportDate);

        for (WorkReportLine line : workReportLines) {
            LocalDate date = LocalDate.fromDateFields(line.getDate());
            if ((date.compareTo(min) < 0) || (date.compareTo(max) > 0)) {
                return false;
            }
        }
        return true;
    }
View Full Code Here


        final List<WorkReportLine> workReportLines = workReportLineDAO
                .findByOrderElementAndChildren(order);

        for (WorkReportLine workReportLine : workReportLines) {
            final LocalDate workReportLineDate = new LocalDate(workReportLine.getDate());
            if (date == null || workReportLineDate.compareTo(date) <= 0) {
                result = EffortDuration.sum(result, workReportLine.getEffort());
            }
        }
        return result;
    }
View Full Code Here

        for (AdvanceMeasurement advanceMeasurement : advanceAssignment
                .getAdvanceMeasurements()) {
            LocalDate oldDate = advanceMeasurement.getDate();
            if (oldDate != null
                    && !newAdvanceMeasurement.equals(advanceMeasurement)
                    && oldDate.compareTo(new LocalDate(value)) == 0) {
                return false;
            }
        }
        return true;
    }
View Full Code Here

            return result;
        }

        for (WorkReportLine workReportLine : workReportLines) {
            final LocalDate workReportLineDate = new LocalDate(workReportLine.getDate());
            if (date == null || workReportLineDate.compareTo(date) <= 0) {
                result = EffortDuration.sum(result, workReportLine.getEffort());
            }
        }
        return result;
    }
View Full Code Here

            return result;
        }

        for (WorkReportLine workReportLine : workReportLines) {
            final LocalDate workReportLineDate = new LocalDate(workReportLine.getDate());
            if (date == null || workReportLineDate.compareTo(date) <= 0) {
                result = EffortDuration.sum(result, workReportLine.getEffort());
            }
        }
        return result;
    }
View Full Code Here

            previousDay = day;
            previousValue = value;
        }

        if (previousDay.compareTo(finish) < 0) {
            fillValues(result, previousDay, finish, previousValue,
                    previousValue);
        }

        return result;
View Full Code Here

    }

    @Override
    public void updateException(CalendarExceptionType type,
            LocalDate startDate, LocalDate endDate, Capacity capacity) {
        for (LocalDate date = new LocalDate(startDate); date
                .compareTo(new LocalDate(endDate)) <= 0; date = date
                .plusDays(1)) {
            if (baseCalendar.getOwnExceptionDay(date) != null) {
                if (type == null) {
                    getBaseCalendar().removeExceptionDay(date);
View Full Code Here

        final List<WorkReportLine> workReportLines = workReportLineDAO
                .findByOrderElementAndChildren(task.getOrderElement());

        for (WorkReportLine workReportLine : workReportLines) {
            final LocalDate workReportLineDate = new LocalDate(workReportLine.getDate());
            if (date == null || workReportLineDate.compareTo(date) <= 0) {
                result.plus(workReportLine.getEffort());
            }
        }
        return result;
    }
View Full Code Here

        LocalDate latestDate = bean.getPastRequestDate();
        if (bean.getPastPaymentDate() == null) {
            bean.setPastPaymentDate(latestDate);
        } else {
            latestDate = (latestDate.compareTo(bean.getPastPaymentDate()) < 0) ? bean.getPastPaymentDate() : latestDate;
        }
        if (bean.getPastEmissionDate() == null) {
            bean.setPastEmissionDate(latestDate);
        } else {
            latestDate = (latestDate.compareTo(bean.getPastEmissionDate()) < 0) ? bean.getPastEmissionDate() : latestDate;
View Full Code Here

            latestDate = (latestDate.compareTo(bean.getPastPaymentDate()) < 0) ? bean.getPastPaymentDate() : latestDate;
        }
        if (bean.getPastEmissionDate() == null) {
            bean.setPastEmissionDate(latestDate);
        } else {
            latestDate = (latestDate.compareTo(bean.getPastEmissionDate()) < 0) ? bean.getPastEmissionDate() : latestDate;
        }
        if (bean.getPastDispatchDate() == null) {
            bean.setPastDispatchDate(latestDate);
        }
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.