Examples of LocalTime


Examples of org.joda.time.LocalTime

        this.departureMinute = time.getMinuteOfHour();
    }

    @JsonIgnore
    public LocalTime getDepartureTime() {
        return new LocalTime(departureHour, departureMinute);
    }
View Full Code Here

Examples of org.joda.time.LocalTime

        this.arrivalMinute = time.getMinuteOfHour();
    }

    @JsonIgnore
    public LocalTime getArrivalTime() {
        return new LocalTime(arrivalHour, arrivalMinute);
    }
View Full Code Here

Examples of org.joda.time.LocalTime

        return localTime.toString();
    }

    @Override
    public LocalTime unmarshal(String localTimeStr) throws Exception {
        return new LocalTime(localTimeStr);
    }
View Full Code Here

Examples of org.joda.time.LocalTime

        WorkReportDTO workReportDTO = createWorkReportDTO(workReportTypeCode3);
        WorkReportLineDTO workReportLineDTO = workReportDTO.workReportLines
                .iterator().next();

        int hours = 12;
        LocalTime start = new LocalTime(8, 0);
        LocalTime end = start.plusHours(hours);
        workReportLineDTO.clockStart = DateConverter
                .toXMLGregorianCalendar(start);
        workReportLineDTO.clockFinish = DateConverter
                .toXMLGregorianCalendar(end);
View Full Code Here

Examples of org.joda.time.LocalTime

        if (date == null) {
            return null;
        } else {
            if (isDefined(date.getHour()) && isDefined(date.getMinute())
                    && isDefined(date.getSecond())){
                return new LocalTime(date.getHour(), date.getMinute(), date
                    .getSecond());
            }
            return null;
        }
View Full Code Here

Examples of org.joda.time.LocalTime

    public HoursWorkedPerResourceDTO(Resource resource,
            WorkReportLine workReportLine) {

        this.workerName = resource.getName();
        this.date = workReportLine.getDate();
        LocalTime clockStart = workReportLine.getClockStart();
        this.clockStart = (clockStart != null) ? clockStart.toString("HH:mm")
                : "";
        LocalTime clockFinish = workReportLine.getClockFinish();
        this.clockFinish = (clockFinish != null) ? clockFinish
                .toString("HH:mm") : "";
        this.effort = workReportLine.getEffort();
        this.orderElementCode = workReportLine.getOrderElement().getCode();
        this.orderElementName = workReportLine.getOrderElement().getName();
        this.descriptionValues = descriptionValuesAsString(workReportLine.getDescriptionValues());
View Full Code Here

Examples of org.joda.time.LocalTime

        workReport.addWorkReportLine(workReportLine);

        workReportLine.setEffort(EffortDuration.hours(10));
        assertNull(workReportLine.getEffort());

        LocalTime start = new LocalTime(8, 0);
        LocalTime end = start.plusHours(8);

        workReportLine.setClockStart(start);
        workReportLine.setClockFinish(end);

        assertThat(workReportLine.getEffort(), equalTo(EffortDuration.hours(8)));
View Full Code Here

Examples of org.joda.time.LocalTime

        WorkReportLine workReportLine = givenBasicWorkReportLine(workReport);
        workReport.addWorkReportLine(workReportLine);

        workReportLine.setEffort(EffortDuration.hours(10));
        LocalTime start = new LocalTime(8, 0);
        LocalTime end = start.plusHours(8);

        workReportLine.setClockStart(start);
        workReportLine.setClockFinish(end);

        assertThat(workReportLine.getEffort(), equalTo(EffortDuration.hours(8)));
View Full Code Here

Examples of org.joda.time.LocalTime

        earliestDate = newEarliestDate;

        // Input field validation - date should be _after_ minimumDate (not the same)
        LocalDate minimumDate = newEarliestDate.minusDays( 1 );
        Date convertedMinimumDate = new DateTime( minimumDate.toDateTime( new LocalTime() ) ).toDate();
        add( DateValidator.minimum( convertedMinimumDate ) );

        return this;
    }
View Full Code Here

Examples of org.joda.time.LocalTime

                        destination = locationList.get( random.nextInt( locationSize ) );
                    }
                    while( destination.equals( origin ) );

                    deadline = new LocalDate().plusDays( 35 + random.nextInt( 10 ) )
                        .toDateTime( new LocalTime() )
                        .toDate();

                    // Build sortable random tracking ids
                    uuid = UUID.randomUUID().toString().toUpperCase();
                    id = ( i + 11 ) + "-" + uuid.substring( 0, uuid.indexOf( "-" ) );
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.