public String getDurationMapping(TimePeriod.Duration duration) {
        switch (duration) {
            case DAYS:
                return day;
            case MONTHS:
                return month;
            case YEARS:
                return year;
            default:
                //this won't get hit since persisted aggregators only will be created days and upward.
                return "";
        }
    }
This class represents the duration objects that needed to pass in to time conversion function for each database type
inorder to normalize the AGG_EVENT_TIMESTAMP
modules/siddhi-core/src/main/java/io/siddhi/core/aggregation/persistedaggregation/config/DBAggregationTimeConversionDurationMapping.java