package gov.va.med.esr.common.model.comms;

import java.io.Serializable;

import gov.va.med.esr.common.model.lookup.ComLetterType;

import gov.va.med.esr.common.model.lookup.ComLetterGeneratedType;
import gov.va.med.fw.model.AbstractKeyedEntity;



/**
 * A class that represents a row in the COMMS_TEMPLATE table. 
 * You can customize the behavior of this class by editing the class, {@link CommsTemplate()}.
 * WARNING: DO NOT EDIT THIS FILE. This is a generated file that is synchronized * by MyEclipse Hibernate tool integration.
 */
public class CommsTemplate extends AbstractKeyedEntity
    implements Serializable
{
    private static final long serialVersionUID = 2183277500364532752L;

    /** The cached hash code value for this instance.  Settting to 0 triggers re-calculation. */
    private int hashValue = 0;

    /** The value of the commsLetterType association. */
    private ComLetterType letterType;

    /** The value of the simple commsTemplateName property. */
    private java.lang.String commsTemplateName;

    /** The value of the simple commsTemplateFormNumber property. */
    private java.lang.String commsTemplateFormNumber;

    /** The value of the simple commsTemplateDesc property. */
    private java.lang.String commsTemplateDesc;


    /** The value of the simple generation type code property. */
    private ComLetterGeneratedType generationType;
    
    private java.util.List dataElementList;

	
    /**
     * Simple constructor of AbstractCommsTemplate instances.
     */
    public CommsTemplate()
    {
    }

    /**
     * Constructor of AbstractCommsTemplate instances given a simple primary key.
     * @param identifier
     */
    public CommsTemplate( java.math.BigDecimal identifier)
    {
        this.setIdentifier(identifier);
    }

    /**
     * Return the simple primary key value that identifies this object.
     * @return java.lang.Long
     */



    /**
     * Return the value of the COMMS_LETTER_TYPE_CODE column.
     * @return CommsLetterType
     */
    public ComLetterType getLetterType()
    {
        return this.letterType;
    }

    /**
     * Set the value of the COMMS_LETTER_TYPE_CODE column.
     * @param commsLetterType
     */
    public void setLetterType(ComLetterType letterType)
    {
        this.letterType = letterType;
    }

 
    /**
     * Return the value of the COMMS_TEMPLATE_NAME column.
     * @return java.lang.String
     */
    public java.lang.String getCommsTemplateName()
    {
        return this.commsTemplateName;
    }

    /**
     * Set the value of the COMMS_TEMPLATE_NAME column.
     * @param commsTemplateName
     */
    public void setCommsTemplateName(java.lang.String commsTemplateName)
    {
        this.commsTemplateName = commsTemplateName;
    }

    /**
     * Return the value of the COMMS_TEMPLATE_FORM_NUMBER column.
     * @return java.lang.String
     */
    public java.lang.String getCommsTemplateFormNumber()
    {
        return this.commsTemplateFormNumber;
    }

    /**
     * Set the value of the COMMS_TEMPLATE_FORM_NUMBER column.
     * @param commsTemplateFormNumber
     */
    public void setCommsTemplateFormNumber(java.lang.String commsTemplateFormNumber)
    {
        this.commsTemplateFormNumber = commsTemplateFormNumber;
    }

    /**
     * Return the value of the COMMS_TEMPLATE_DESC column.
     * @return java.lang.String
     */
    public java.lang.String getCommsTemplateDesc()
    {
        return this.commsTemplateDesc;
    }

    /**
     * Set the value of the COMMS_TEMPLATE_DESC column.
     * @param commsTemplateDesc
     */
    public void setCommsTemplateDesc(java.lang.String commsTemplateDesc)
    {
        this.commsTemplateDesc = commsTemplateDesc;
    }
    
    /**
     * @return Returns the generationType.
     */	
    public ComLetterGeneratedType getGenerationType() {
        return generationType;
    }
    /**
     * @param generationType The generationType to set.
     */
    public void setGenerationType(ComLetterGeneratedType generationType) {
        this.generationType = generationType;
    }
    /**
     * @return Returns the dataElementList.
     */
    public java.util.List getDataElementList() {
        return dataElementList;
    }
    /**
     * @param dataElementList The dataElementList to set.
     */
    public void setDataElementList(java.util.List dataElementList) {
        this.dataElementList = dataElementList;
    }
    /**
     * Implementation of the equals comparison on the basis of equality of the primary key values.
     * @param rhs
     * @return boolean
     */
    public boolean equals(Object rhs)
    {
        if (rhs == null)
            return false;
        if (! (rhs instanceof CommsTemplate))
            return false;
        CommsTemplate that = (CommsTemplate) rhs;
        if (this.getIdentifier() != null && that.getIdentifier() != null)
        {
            if (! this.getIdentifier().equals(that.getIdentifier()))
            {
                return false;
            }
        }
        return true;
    }

    /**
     * Implementation of the hashCode method conforming to the Bloch pattern with
     * the exception of array properties (these are very unlikely primary key types).
     * @return int
     */
    public int hashCode()
    {
        if (this.hashValue == 0)
        {
            int result = 17;
            int identifierValue = this.getIdentifier() == null ? 0 : this.getIdentifier().hashCode();
            result = result * 37 + identifierValue;
            this.hashValue = result;
        }
        return this.hashValue;
    }
	
}