Example usage for org.joda.time LocalTime minuteOfHour

List of usage examples for org.joda.time LocalTime minuteOfHour

Introduction

In this page you can find the example usage for org.joda.time LocalTime minuteOfHour.

Prototype

public Property minuteOfHour() 

Source Link

Document

Get the minute of hour field property which provides access to advanced functionality.

Usage

From source file:org.apereo.portal.events.aggr.dao.jpa.JpaTimeDimensionDao.java

License:Apache License

@OpenEntityManager(unitName = PERSISTENCE_UNIT_NAME)
@Override// w  w  w  .  j  ava 2s  .  c  o  m
public TimeDimension getTimeDimensionByTime(LocalTime localTime) {
    final NaturalIdQuery<TimeDimensionImpl> query = this.createNaturalIdQuery(TimeDimensionImpl.class);
    query.using(TimeDimensionImpl_.time, localTime.minuteOfHour().roundFloorCopy());
    return query.load();
}

From source file:org.apereo.portal.events.aggr.dao.jpa.TimeDimensionImpl.java

License:Apache License

TimeDimensionImpl(LocalTime time) {
    this.id = -1;
    this.time = time.minuteOfHour().roundFloorCopy(); //truncate at minute level
    this.hour = this.time.getHourOfDay();
    this.minute = this.time.getMinuteOfHour();
    this.fiveMinuteIncrement = this.minute / 5;
}