package org.appfuse.model;

import java.util.List;


/**
 * Resume class
 *
 * This class is used to represent a Resume object
 *
 * <p>
 * <a href="Resume.java.html"><i>View Source</i></a>
 * </p>
 *
 * @author <a href="mailto:[email protected]">Matt Raible</a>
 * @version $Revision: 1.2 $ $Date: 2004/04/01 22:33:44 $
 *
 * @struts.form include-all="true" extends="BaseForm"
 * @hibernate.class table="resume"
 */
public class Resume extends BaseObject {
    //~ Instance fields ========================================================

    private Long id;
    private String name;
    private String description;
    private String objective;
    private Long userId;
    private String comments;
    private Long workStatusId;
    private WorkStatus workStatus;
    private List resumeSkills;
    private List educations;
    private List experiences;
    private List references;
    private List memberships;

    /**
     * Returns the id.
     * @return String
     *
     * @hibernate.id column="id"
     *  generator-class="increment" unsaved-value="null"
     */
    public Long getId() {
        return id;
    }

    /**
     * Returns the name.
     * @return String
     *
     * @hibernate.property column="name" 
     */
    public String getName() {
        return name;
    }

    /**
     * Returns the description.
     * @return String
     *
     * @hibernate.property column="description"
     */
    public String getDescription() {
        return description;
    }

    /**
     * Returns the objective.
     * @return String
     *
     * @hibernate.property column="objective" 
     */
    public String getObjective() {
        return objective;
    }

    /**
     * Returns the user.
     * @return User
     *
     * @hibernate.property column="user_id" not-null="true"
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * Sets the description.
     * @param description The description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * Sets the id.
     * @param id The id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * Sets the name.
     * @param name The name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Sets the objective.
     * @param objective The objective to set
     */
    public void setObjective(String objective) {
        this.objective = objective;
    }

    /**
     * Sets the user.
     * @param userId The user to set
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }
    
    /**
     * @return Returns the comments.
     * @hibernate.property column="comments" length="2000"
     */
    public String getComments() {
        return comments;
    }

    /**
     * @param comments The comments to set.
     */
    public void setComments(String comments) {
        this.comments = comments;
    }
    
    /**
     * @return Returns the workStatusId.
     * @struts.validator type="required"
     * @hibernate.property column="work_status_id"
     */
    public Long getWorkStatusId() {
        return this.workStatusId;
    }
    /**
     * @param workStatusId The workStatusId to set.
     */
    public void setWorkStatusId(Long workStatusId) {
        this.workStatusId = workStatusId;
    }

    /**
     * Returns the work status for the given id
     * @hibernate.many-to-one
     *  insert="false" update="false" cascade="none" column="work_status_id"
     *  outer-join="true"
     * @return a populated work status object (based on the workStatusId)
     */
    public WorkStatus getWorkStatus() {
        return workStatus;
    }

    public void setWorkStatus(WorkStatus workStatus) {
        this.workStatus = workStatus;
    }
    
    /**
     * Returns the resumeSkills associated with this resume.
     * @hibernate.bag name="resumeSkills" lazy="true" inverse="true"
     *  cascade="delete"
     * @hibernate.collection-key column="resume_id"
     * @hibernate.collection-one-to-many
     *  class="org.appfuse.model.ResumeSkill"
     * @return List of resumeSkills
     */
    public List getResumeSkills() {
        return resumeSkills;
    }

    /**
     * Sets the resumeSkills associated with this resume.
     * @param resumeSkills
     */
    public void setResumeSkills(List resumeSkills) {
        this.resumeSkills = resumeSkills;
    }

    /**
     * Returns the schools associated with this resume.
     * @hibernate.bag name="educations" lazy="true" inverse="true"
     *  cascade="none"
     * @hibernate.collection-key column="resume_id"
     * @hibernate.collection-one-to-many
     *  class="org.appfuse.model.Education"
     * @return List of schools
     */
    public List getEducations() {
        return educations;
    }

    public void setEducations(List educations) {
        this.educations = educations;
    }

    /**
     * Returns the work experiences associated with this resume.
     * @hibernate.bag name="experiences" lazy="true" inverse="true"
     *  cascade="delete"
     * @hibernate.collection-key column="resume_id"
     * @hibernate.collection-one-to-many
     *  class="org.appfuse.model.Experience"
     * @return List of work experiences
     */
    public List getExperiences() {
        return experiences;
    }

    public void setExperiences(List experiences) {
        this.experiences = experiences;
    }

    /**
     * Returns the references associated with this resume.
     * @hibernate.bag name="references" lazy="true" inverse="true"
     *  cascade="delete"
     * @hibernate.collection-key column="resume_id"
     * @hibernate.collection-one-to-many
     *  class="org.appfuse.model.Reference"
     * @return List of resumeSkills
     */
    public List getReferences() {
        return references;
    }

    public void setReferences(List references) {
        this.references = references;
    }

    /**
     * Returns the memberships associated with this resume.
     * @hibernate.bag name="memberships" lazy="true" inverse="true"
     *  cascade="delete"
     * @hibernate.collection-key column="resume_id"
     * @hibernate.collection-one-to-many
     *  class="org.appfuse.model.Membership"
     * @return List of resumeSkills
     */
    public List getMemberships() {
        return memberships;
    }

    public void setMemberships(List memberships) {
        this.memberships = memberships;
    }

}