/**
 * Narvaro: @VERSION@
 * Build Date: @DATE@
 * Commit Head: @HEAD@
 * JDK: @JDK@
 * ANT: @ANT@
 * 
 */

package edu.csus.ecs.moneybeets.narvaro.model;

import java.time.YearMonth;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.apache.log4j.Logger;

public class ParkMonth {

    private static final Logger LOG = Logger.getLogger(ParkMonth.class.getName());
    
    private final String parkName;
    
    private final Map<YearMonth, MonthData> monthDatas = new HashMap<YearMonth, MonthData>();
    
    public ParkMonth(final String parkName) {
        this.parkName = parkName;
    }
    
    public final String getParkName() {
        return parkName;
    }
    
    public MonthData getMonthData(final YearMonth yearMonth) {
        return monthDatas.get(yearMonth);
    }
    
    public Collection<MonthData> getAllMonthData() {
        return Collections.unmodifiableCollection(monthDatas.values());
    }
    
    /**
     * @param yearMonth The yearMonth used as a key.
     * @param monthData The data.
     * @return The previous value associated with key, or null if there was no mapping for key.
     */
    public MonthData putMonthData(final YearMonth yearMonth, final MonthData monthData) {
        return monthDatas.put(yearMonth, monthData);
    }
    
    /**
     * Inserts all of the pairs in the input map into the underlying map. Functionally
     * equivalent to iteration and insertion of each element.
     * 
     * @param m The map.
     */
    public void putAllMonthData(final Map<? extends YearMonth, ? extends MonthData> m) {
        monthDatas.putAll(m);
    }
    
}

@@ -149,16 +149,45 @@
 model;%0A%0A
+import java.math.BigDecimal;%0A
 import j
@@ -1700,10 +1700,2304 @@
  %7D%0A    %0A
+    /**%0A     * Convenience method to create a %3Ccode%3EMonthData%3C/code%3E and register it%0A     *   with this %3Ccode%3EParkMonth%3C/code%3E.%0A     *   %0A     * @param month%0A     * @param pduConversionFactor%0A     * @param pduTotals%0A     * @param pduSpecialEvents%0A     * @param pduAnnualDayUse%0A     * @param pduDayUse%0A     * @param pduSenior%0A     * @param pduDisabled%0A     * @param pduGoldenBear%0A     * @param pduDisabledVeteran%0A     * @param pduNonResOHVPass%0A     * @param pduAnnualPassSale%0A     * @param pduCamping%0A     * @param pduSeniorCamping%0A     * @param pduDisabledCamping%0A     * @param fduConversionFactor%0A     * @param fduTotals%0A     * @param fscTotalVehicles%0A     * @param fscTotalPeople%0A     * @param fscRatio%0A     * @param oMC%0A     * @param oATV%0A     * @param o4x4%0A     * @param oROV%0A     * @param oAQMA%0A     * @param oAllStarKarting%0A     * @param oHangtown%0A     * @param oOther%0A     * @param comment%0A     * @param form449%0A     */%0A    public void createAndPutMonthData(YearMonth month, BigDecimal pduConversionFactor,%0A            long pduTotals, long pduSpecialEvents, long pduAnnualDayUse,%0A            long pduDayUse, long pduSenior, long pduDisabled,%0A            long pduGoldenBear, long pduDisabledVeteran, long pduNonResOHVPass,%0A            long pduAnnualPassSale, long pduCamping, long pduSeniorCamping,%0A            long pduDisabledCamping, BigDecimal fduConversionFactor,%0A            long fduTotals, long fscTotalVehicles, long fscTotalPeople,%0A            BigDecimal fscRatio, long oMC, long oATV, long o4x4, long oROV,%0A            long oAQMA, long oAllStarKarting, long oHangtown, long oOther,%0A            String comment, long form449) %7B%0A        %0A        putMonthData(month, new MonthData(%0A                                month, pduConversionFactor, pduTotals, pduSpecialEvents, %0A                                pduAnnualDayUse, pduDayUse, pduSenior, pduDisabled, pduGoldenBear, %0A                                pduDisabledVeteran, pduNonResOHVPass, pduAnnualPassSale, pduCamping, %0A                                pduSeniorCamping, pduDisabledCamping, fduConversionFactor, fduTotals, %0A                                fscTotalVehicles, fscTotalPeople, fscRatio, oMC, oATV, o4x4, oROV, %0A                                oAQMA, oAllStarKarting, oHangtown, oOther, comment, form449));%0A    %7D%0A    %0A
 %7D%0A

Add convenience method to create and store MonthData