package faqapp;

import java.util.Collection;
import java.util.Date;
import javax.ejb.CreateException;
import javax.ejb.EJBLocalHome;
import javax.ejb.FinderException;

/**
 * This is the FAQBean's Local Home interface
 *
 * One create() method which corresponds to the ejbCreate() in bean class.
 **/
public interface FAQLocalHome extends EJBLocalHome {
    /**
     * Creates a FAQ
     * @param question: the question
     * @param answer: the answer
     * @param internalFlag: if this FAQ is internal only (true/false)
     * @param productVersion: product version
     * @param createdBy: userid of the creator
     * @param creationDate: the date this instance is created
     * @param modifiedBy: userid of the person who modified it last
     * @param modificationDate: last modification date
     * @param topics: associated topics
     * @param areas: associated areas
     * @return the newly created EJB Local Object.
     **/
    public FAQLocal create(String question, String answer, boolean internalFlag, String productVersion, String createdBy, Date creationDate, String modifiedBy, Date modificationDate, Collection topics, Collection areas) throws CreateException;

    /**
     * Finder methods. These are implemented by the container. We can
     * customize the functionality of these methods in the deployment
     * descriptor through EJB-QL.
     **/
    public FAQLocal findByPrimaryKey(Integer key) throws FinderException;

    public Collection findAll() throws FinderException;

    public Collection findByAreaID(Integer key) throws FinderException;
}
