Class DMCalendar

Object
CalendarUtil
DMCalendar
All Implemented Interfaces:
DatamartContext.Calendar

public class DMCalendar extends CalendarUtil implements DatamartContext.Calendar
  • Constructor Details

    • DMCalendar

      public DMCalendar()
  • Method Details

    • timePeriodAsFilter

      public Filter timePeriodAsFilter(CalendarUtil.TimePeriod timePeriod, String dateDimFieldName)
      Description copied from interface: DatamartContext.Calendar
      Helper method to build a filter representing dateDimFieldName 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]; see CalendarUtil.TimePeriod for more details.
      Specified by:
      timePeriodAsFilter in interface DatamartContext.Calendar
      Parameters:
      timePeriod - CalendarUtil.TimePeriod that the dateDimFieldName 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

      public Filter getTimePeriodAsFilter(CalendarUtil.TimePeriod timePeriod, String dateDimFieldName)