package faqapp.struts.forms;

import java.io.Serializable;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;

import faqapp.AreaTO;
import faqapp.FAQTO;

/**
 * Struts FAQQueryForm bean. This form has the following fields,
 * with default values in square brackets:
 * <ul>
 * <li><b>action</b> - Form action
 * <li><b>mode</b> - Mode (list/query)
 * <li><b>areas</b> - Array of all Areas stored by FAQAction
 * <li><b>areaID</b> - Selected areaID
 * <li><b>internalFlag</b> - Selected internal flag [true]
 * <li><b>FAQs</b> - Array of all FAQs stored by FAQAction
 * <li><b>areaDesc</b> - Area description for selected areaID stored by FAQAction
 * </ul>
 */
public final class FAQQueryForm extends FAQAbstractForm implements Serializable {
    private String mode;
    private AreaTO[] areas;
    private int areaID;
    private boolean internalFlag = true;
    private FAQTO[] FAQs;
    private String areaDesc;

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }

    public AreaTO[] getAreas() {
        return areas;
    }

    public void setAreas(AreaTO[] areas) {
        this.areas = areas;
    }

    public int getAreaID() {
        return areaID;
    }

    public void setAreaID(int areaID) {
        this.areaID = areaID;
    }

    public boolean isInternalFlag() {
        return internalFlag;
    }

    public void setInternalFlag(boolean internalFlag) {
        this.internalFlag = internalFlag;
    }

    public FAQTO[] getFAQs() {
        return FAQs;
    }

    public void setFAQs(FAQTO[] FAQs) {
        this.FAQs = FAQs;
    }

    public String getAreaDesc() {
        return areaDesc;
    }

    public void setAreaDesc(String areaDesc) {
        this.areaDesc = areaDesc;
    }

    public void reset(ActionMapping mapping, HttpServletRequest request) {
        super.reset();
        mode = null;
        areas = null;
        areaID = 0;
        internalFlag = true;
        FAQs = null;
        areaDesc = null;
    }
}

