package org.appfuse.model;

import java.io.Serializable;
import java.util.Date;


/**
 * This class is used to represent a resume's memberships and affiliations.
 *
 * <p>
 * <a href="Membership.java.html"><i>View Source</i></a>
 * </p>
 *
 * @author <a href="mailto:matt@raibledesigns.com">Matt Raible</a>
 * @version $Revision: 1.1 $ $Date: 2004/03/31 13:04:16 $
 *
 * @struts.form include-all="true" extends="BaseForm"
 * @hibernate.class table="membership"
 */
public class Membership extends BaseObject implements Serializable {
    //~ Instance fields ========================================================

    private Long id;
    private Long resumeId;
    private String organizationName;
    private String affiliation;
    private Date startDate;
    private Date endDate;

    //~ Methods ================================================================

    public void setId(Long id) {
        this.id = id;
    }

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

    public void setOrganizationName(String name) {
        this.organizationName = name;
    }

    /**
     * Returns the organizationName description.
     * @return String
     *
     * @struts.validator type="required" msgkey="errors.required"
     * @hibernate.property column="organization_name"
     */
    public String getOrganizationName() {
        return this.organizationName;
    }

    /**
     * @return Returns the endDate.
     * @struts.validator type="date" msgkey="errors.date"
     * @struts.validator-var name="datePatternStrict" value="MM/dd/yyyy"
     * @hibernate.property column="end_date"
     */
    public Date getEndDate() {
        return endDate;
    }

    /**
     * @param endDate The endDate to set.
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    /**
     * @return Returns the resumeId.
     * @hibernate.property column="resume_id"
     */
    public Long getResumeId() {
        return resumeId;
    }

    /**
     * @param resumeId The resumeId to set.
     */
    public void setResumeId(Long resumeId) {
        this.resumeId = resumeId;
    }

    /**
     * @return Returns the startDate.
     * @struts.validator type="date" msgkey="errors.date"
     * @struts.validator-var name="datePatternStrict" value="MM/dd/yyyy"
     * @hibernate.property column="start_date"
     */
    public Date getStartDate() {
        return startDate;
    }

    /**
     * @param startDate The startDate to set.
     */
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    /**
     * @return Returns the affiliation.
     * @struts.validator type="required" msgkey="errors.required"
     * @hibernate.property column="affiliation" length="50"
     */
    public String getAffiliation() {
        return affiliation;
    }

    /**
     * @param title The affiliation to set.
     */
    public void setAffiliation(String title) {
        this.affiliation = title;
    }

}