/********************************************************************
 * Copyright © 2004 VHA. All rights reserved
 ********************************************************************/
package gov.va.med.esr.ui.admin.action;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionMapping;



import gov.va.med.esr.common.model.lookup.Capability;
import gov.va.med.fw.ui.struts.AbstractForm;

public class HbpInformationForm extends AbstractForm {
    
  /**
     * 
     */
    private static final long serialVersionUID = 6377851385512256390L;

    //Set attributes
    private String planName = null;
    private String planCode= null;
    private String coverageCode = null;
    private String planType = null;
    private String description = null;
    private String effectiveDate = null;
    private String expirationDate = null;
    
    private String planNameId = null;
    
    private String planDefinitionId = null;
    private String descriptionDisplay = null;
    private String addOrEditOption = null;
    
    public HbpInformationForm () {
        super();
        initialize();
    }

    public void reset(ActionMapping mapping, HttpServletRequest request)
    {
        super.reset(mapping, request);
        initialize();
    }
    
  
  
    
    
    /*
    public void setAssignedCapabilities(List assignedCapabilities) {
        //Loop through the list and set the properties
        if (assignedCapabilities != null) {
            Collections.sort(assignedCapabilities);
            for (int i=0; i<assignedCapabilities.size(); i++) {
                Capability capability = (Capability) assignedCapabilities.get(i);
                setAssignedCapabilityCode(i,capability.getCode());
                setAssignedCapabilityName(i,capability.getName());  // Name or Description ??
                setAssignedCapabilityInd(i,Boolean.TRUE);  // Name or Description ??
            }
        }        
    }
    */
    
    private void initialize() {
        /*
        setPlanName(null);
        setPlanCode(null);
        setCoverageCode(null);
        setPlanType(null);
        setDescriptption(null);
        setActiveDate(null);
        setInactiveDate(null);
        setPlanNameId(null);
        setPlanDetailId(null);
        setPlanDetailDescription(null);
        setAddOrEditOption(null);
        */
        planName = null;
        planCode= null;
        coverageCode = null;
        planType = null;
        description = null;
        effectiveDate = null;
        expirationDate = null;
        planNameId = null;
        planDefinitionId = null;
        descriptionDisplay = null;
        addOrEditOption = null;                 
    }

    public String getPlanName() {
        return planName;
    }

    public void setPlanName(String planName) {
        this.planName = planName;
    }

    public String getPlanCode() {
        return planCode;
    }

    public void setPlanCode(String planCode) {
        this.planCode = planCode;
    }

    public String getCoverageCode() {
        return coverageCode;
    }

    public void setCoverageCode(String coverageCode) {
        this.coverageCode = coverageCode;
    }

    public String getPlanType() {
        return planType;
    }

    public void setPlanType(String planType) {
        this.planType = planType;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getEffectiveDate() {
        return effectiveDate;
    }

    public void setEffectiveDate(String effectiveDate) {
        this.effectiveDate = effectiveDate;
    }

    public String getExpirationDate() {
        return expirationDate;
    }

    public void setExpirationDate(String expirationDate) {
        this.expirationDate = expirationDate;
    }

    public String getPlanNameId() {
        return planNameId;
    }

    public void setPlanNameId(String planNameId) {
        this.planNameId = planNameId;
    }

    public String getAddOrEditOption() {
        return addOrEditOption;
    }

    public void setAddOrEditOption(String addOrEditOption) {
        this.addOrEditOption = addOrEditOption;
    }

    public String getPlanDefinitionId() {
        return planDefinitionId;
    }

    public void setPlanDefinitionId(String planDefinitionId) {
        this.planDefinitionId = planDefinitionId;
    }

    public String getDescriptionDisplay() {
        return descriptionDisplay;
    }

    public void setDescriptionDisplay(String descriptionDisplay) {
        this.descriptionDisplay = descriptionDisplay;
    }

    public void setDescriptionDisplay(String description, String coverageCode) {
        this.descriptionDisplay = this.coverageCode + "-" + this.description;
    }
    
    
}
