Package net.pricefx.domain
Class DMCalendar
Object
CalendarUtil
DMCalendar
- All Implemented Interfaces:
DatamartContext.Calendar
-
Nested Class Summary
Nested classes/interfaces inherited from class CalendarUtil
CalendarUtil.TimePeriod, CalendarUtil.TimeUnit
-
Field Summary
Fields inherited from class CalendarUtil
ALT_DATE_PATTERN_1, ALT_DATE_PATTERN_2, ALT_DATETIME_PATTERN, DEFAULT, DEFAULT_DATE_PATTERN, DEFAULT_DATETIME_PATTERN, SIMPLEDATEFORMAT_PATTERN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetTimePeriodAsFilter
(CalendarUtil.TimePeriod timePeriod, String dateDimFieldName) timePeriodAsFilter
(CalendarUtil.TimePeriod timePeriod, String dateDimFieldName) Helper method to build a filter representingdateDimFieldName
in[timePeriod.startPeriod, timePeriod.endPeriod]
Note the inclusion on both ends; this is to accommodate the most frequent use case where the TimePeriod is a single period, for example InvoiceDate in [2015,2015].Methods inherited from class CalendarUtil
add, date, fileInfixTimestamp, fileInfixTimestamp, formatDate, formatDate, formatDateTime, formatDateTime, formatDateTime, getDay, getDaysDiff, getEndDate, getMonth, getQuarter, getStartDate, getTimePeriod, getTimePeriodByDate, getTimePeriodName, getTimePeriodName, getTimePeriodNames, getTimePeriods, getTimePeriods, getWeek, getYear, newTimePeriod, newTimePeriod, parseDate, parseDateTime, parseTimePeriod, time, today
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface DatamartContext.Calendar
add, getDaysDiff, getEndDate, getStartDate, getTimePeriod, getTimePeriodByDate, getTimePeriodNames, getTimePeriods, getTimePeriods, parseDate, parseDateTime
-
Constructor Details
-
DMCalendar
public DMCalendar()
-
-
Method Details
-
timePeriodAsFilter
Description copied from interface:DatamartContext.Calendar
Helper method to build a filter representingdateDimFieldName
in[timePeriod.startPeriod, timePeriod.endPeriod]
Note the inclusion on both ends; this is to accommodate the most frequent use case where the TimePeriod is a single period, for example InvoiceDate in [2015,2015]. An example of a non-singular period filter is [2015-Q1, 2015-Q2]; seeCalendarUtil.TimePeriod
for more details.- Specified by:
timePeriodAsFilter
in interfaceDatamartContext.Calendar
- Parameters:
timePeriod
-CalendarUtil.TimePeriod
that thedateDimFieldName
field needs to match.dateDimFieldName
- Datamart field of the type 'Date' to filter on.- Returns:
Filter
limiting the given date field to the given time period.
-
getTimePeriodAsFilter
-