Examples of DayOfWeek


Examples of org.drools.planner.examples.nurserostering.domain.DayOfWeek

        return weekendDefinition.isWeekend(dayOfWeek) && weekendDefinition.getLastDayOfWeekend() != dayOfWeek;
    }

    public int getDistanceToLastDayOfWeekend() {
        WeekendDefinition weekendDefinition = employee.getContract().getWeekendDefinition();
        DayOfWeek dayOfWeek = shiftDate.getDayOfWeek();
        return dayOfWeek.getDistanceToNext(weekendDefinition.getLastDayOfWeekend());
    }
View Full Code Here

Examples of org.drools.planner.examples.nurserostering.domain.DayOfWeek

        return shiftDate.getDayIndex();
    }

    public boolean isWeekendAndNotFirstDayOfWeekend() {
        WeekendDefinition weekendDefinition = employee.getContract().getWeekendDefinition();
        DayOfWeek dayOfWeek = shiftDate.getDayOfWeek();
        return weekendDefinition.isWeekend(dayOfWeek) && weekendDefinition.getFirstDayOfWeekend() != dayOfWeek;
    }
View Full Code Here

Examples of org.drools.planner.examples.nurserostering.domain.DayOfWeek

        return weekendDefinition.isWeekend(dayOfWeek) && weekendDefinition.getFirstDayOfWeekend() != dayOfWeek;
    }

    public int getDistanceToFirstDayOfWeekend() {
        WeekendDefinition weekendDefinition = employee.getContract().getWeekendDefinition();
        DayOfWeek dayOfWeek = shiftDate.getDayOfWeek();
        return weekendDefinition.getFirstDayOfWeekend().getDistanceToNext(dayOfWeek);
    }
View Full Code Here

Examples of org.drools.planner.examples.nurserostering.domain.DayOfWeek

                    }
                    pattern.setId(id);
                    pattern.setCode(code);
                    pattern.setWeight(weight);
                    int patternEntryIndex = 0;
                    DayOfWeek firstDayOfweek = null;
                    for (Element patternEntryElement : patternEntryElementList) {
                        assertElementName(patternEntryElement, "PatternEntry");
                        Element shiftTypeElement = patternEntryElement.getChild("ShiftType");
                        boolean shiftTypeIsNone;
                        ShiftType shiftType;
                        if (shiftTypeElement.getText().equals("Any")) {
                            shiftTypeIsNone = false;
                            shiftType = null;
                        } else if (shiftTypeElement.getText().equals("None")) {
                            shiftTypeIsNone = true;
                            shiftType = null;
                        } else {
                            shiftTypeIsNone = false;
                            shiftType = shiftTypeMap.get(shiftTypeElement.getText());
                            if (shiftType == null) {
                                throw new IllegalArgumentException("The shiftType (" + shiftTypeElement.getText()
                                        + ") of pattern (" + pattern.getCode() + ") does not exist.");
                            }
                        }
                        Element dayElement = patternEntryElement.getChild("Day");
                        DayOfWeek dayOfWeek;
                        if (dayElement.getText().equals("Any")) {
                            dayOfWeek = null;
                        } else {
                            dayOfWeek = DayOfWeek.valueOfCode(dayElement.getText());
                            if (dayOfWeek == null) {
View Full Code Here

Examples of org.drools.planner.examples.nurserostering.domain.DayOfWeek

        private void readRequiredEmployeeSizes(NurseRoster nurseRoster, Element coverRequirementsElement) {
            List<Element> coverRequirementElementList = (List<Element>) coverRequirementsElement.getChildren();
            for (Element element : coverRequirementElementList) {
                if (element.getName().equals("DayOfWeekCover")) {
                    Element dayOfWeekElement = element.getChild("Day");
                    DayOfWeek dayOfWeek = DayOfWeek.valueOfCode(dayOfWeekElement.getText());
                    if (dayOfWeek == null) {
                        throw new IllegalArgumentException("The dayOfWeek (" + dayOfWeekElement.getText()
                                + ") of an entity DayOfWeekCover does not exist.");
                    }
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.schedule.attribute.DayOfWeek

        // Start parsing the values in the ScheduleExpression
        this.second = new Second(schedule.getSecond());
        this.minute = new Minute(schedule.getMinute());
        this.hour = new Hour(schedule.getHour());
        this.dayOfWeek = new DayOfWeek(schedule.getDayOfWeek());
        this.dayOfMonth = new DayOfMonth(schedule.getDayOfMonth());
        this.month = new Month(schedule.getMonth());
        this.year = new Year(schedule.getYear());
        if (schedule.getTimezone() != null && schedule.getTimezone().trim().isEmpty() == false) {
            // If the timezone ID wasn't valid, then Timezone.getTimeZone returns
View Full Code Here

Examples of org.jboss.as.ejb3.timerservice.schedule.attribute.DayOfWeek

        // Start parsing the values in the ScheduleExpression
        this.second = new Second(schedule.getSecond());
        this.minute = new Minute(schedule.getMinute());
        this.hour = new Hour(schedule.getHour());
        this.dayOfWeek = new DayOfWeek(schedule.getDayOfWeek());
        this.dayOfMonth = new DayOfMonth(schedule.getDayOfMonth());
        this.month = new Month(schedule.getMonth());
        this.year = new Year(schedule.getYear());
        if (schedule.getTimezone() != null && schedule.getTimezone().trim().isEmpty() == false) {
            // If the timezone ID wasn't valid, then Timezone.getTimeZone returns
View Full Code Here

Examples of org.jboss.ejb3.timer.schedule.attribute.DayOfWeek

      // Start parsing the values in the ScheduleExpression
      this.second = new Second(schedule.getSecond());
      this.minute = new Minute(schedule.getMinute());
      this.hour = new Hour(schedule.getHour());
      this.dayOfWeek = new DayOfWeek(schedule.getDayOfWeek());
      this.dayOfMonth = new DayOfMonth(schedule.getDayOfMonth());
      this.month = new Month(schedule.getMonth());
      this.year = new Year(schedule.getYear());
      if (schedule.getTimezone() != null && schedule.getTimezone().trim().isEmpty() == false)
      {
View Full Code Here

Examples of org.jboss.ejb3.timer.schedule.attribute.DayOfWeek

        // Start parsing the values in the ScheduleExpression
        this.second = new Second(schedule.getSecond());
        this.minute = new Minute(schedule.getMinute());
        this.hour = new Hour(schedule.getHour());
        this.dayOfWeek = new DayOfWeek(schedule.getDayOfWeek());
        this.dayOfMonth = new DayOfMonth(schedule.getDayOfMonth());
        this.month = new Month(schedule.getMonth());
        this.year = new Year(schedule.getYear());
        if (schedule.getTimezone() != null && schedule.getTimezone().trim().isEmpty() == false) {
            // If the timezone ID wasn't valid, then Timezone.getTimeZone returns
View Full Code Here

Examples of org.jboss.ejb3.timer.schedule.attribute.DayOfWeek

      // Start parsing the values in the ScheduleExpression
      this.second = new Second(schedule.getSecond());
      this.minute = new Minute(schedule.getMinute());
      this.hour = new Hour(schedule.getHour());
      this.dayOfWeek = new DayOfWeek(schedule.getDayOfWeek());
      this.dayOfMonth = new DayOfMonth(schedule.getDayOfMonth());
      this.month = new Month(schedule.getMonth());
      this.year = new Year(schedule.getYear());
      if (schedule.getTimezone() != null && schedule.getTimezone().trim().isEmpty() == false)
      {
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.