List of usage examples for org.joda.time LocalTime minuteOfHour
public Property minuteOfHour()
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; }