/*
 * Generated by XDoclet - Do not edit!
 */
package test.ejb.cmr;

/**
 * Data object for Language.
 * @xdoclet-generated at 16-04-05
 * @copyright The XDoclet Team
 * @author XDoclet
 * @version 1.2.3
 */
public class LanguageData
   extends java.lang.Object
   implements java.io.Serializable
{
   private java.lang.Integer languageId;
   private java.lang.Integer languageCodeIdFk;
   private java.lang.String name;

  /* begin value object */

  /* end value object */

   public LanguageData()
   {
   }

   public LanguageData( java.lang.Integer languageId,java.lang.Integer languageCodeIdFk,java.lang.String name )
   {
      setLanguageId(languageId);
      setLanguageCodeIdFk(languageCodeIdFk);
      setName(name);
   }

   public LanguageData( LanguageData otherData )
   {
      setLanguageId(otherData.getLanguageId());
      setLanguageCodeIdFk(otherData.getLanguageCodeIdFk());
      setName(otherData.getName());

   }

   public java.lang.Integer getPrimaryKey() {
     return  getLanguageId();
   }

   public java.lang.Integer getLanguageId()
   {
      return this.languageId;
   }
   public void setLanguageId( java.lang.Integer languageId )
   {
      this.languageId = languageId;
   }

   public java.lang.Integer getLanguageCodeIdFk()
   {
      return this.languageCodeIdFk;
   }
   public void setLanguageCodeIdFk( java.lang.Integer languageCodeIdFk )
   {
      this.languageCodeIdFk = languageCodeIdFk;
   }

   public java.lang.String getName()
   {
      return this.name;
   }
   public void setName( java.lang.String name )
   {
      this.name = name;
   }

   public String toString()
   {
      StringBuffer str = new StringBuffer("{");

      str.append("languageId=" + getLanguageId() + " " + "languageCodeIdFk=" + getLanguageCodeIdFk() + " " + "name=" + getName());
      str.append('}');

      return(str.toString());
   }

   public boolean equals( Object pOther )
   {
      if( pOther instanceof LanguageData )
      {
         LanguageData lTest = (LanguageData) pOther;
         boolean lEquals = true;

         if( this.languageId == null )
         {
            lEquals = lEquals && ( lTest.languageId == null );
         }
         else
         {
            lEquals = lEquals && this.languageId.equals( lTest.languageId );
         }
         if( this.languageCodeIdFk == null )
         {
            lEquals = lEquals && ( lTest.languageCodeIdFk == null );
         }
         else
         {
            lEquals = lEquals && this.languageCodeIdFk.equals( lTest.languageCodeIdFk );
         }
         if( this.name == null )
         {
            lEquals = lEquals && ( lTest.name == null );
         }
         else
         {
            lEquals = lEquals && this.name.equals( lTest.name );
         }

         return lEquals;
      }
      else
      {
         return false;
      }
   }

   public int hashCode()
   {
      int result = 17;

      result = 37*result + ((this.languageId != null) ? this.languageId.hashCode() : 0);

      result = 37*result + ((this.languageCodeIdFk != null) ? this.languageCodeIdFk.hashCode() : 0);

      result = 37*result + ((this.name != null) ? this.name.hashCode() : 0);

      return result;
   }

}
