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

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

  /* begin value object */

  /* end value object */

   public CountryData()
   {
   }

   public CountryData( java.lang.Integer countryId,java.lang.Integer ownerIdFk,java.lang.String name )
   {
      setCountryId(countryId);
      setOwnerIdFk(ownerIdFk);
      setName(name);
   }

   public CountryData( CountryData otherData )
   {
      setCountryId(otherData.getCountryId());
      setOwnerIdFk(otherData.getOwnerIdFk());
      setName(otherData.getName());

   }

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

   public java.lang.Integer getCountryId()
   {
      return this.countryId;
   }
   public void setCountryId( java.lang.Integer countryId )
   {
      this.countryId = countryId;
   }

   public java.lang.Integer getOwnerIdFk()
   {
      return this.ownerIdFk;
   }
   public void setOwnerIdFk( java.lang.Integer ownerIdFk )
   {
      this.ownerIdFk = ownerIdFk;
   }

   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("countryId=" + getCountryId() + " " + "ownerIdFk=" + getOwnerIdFk() + " " + "name=" + getName());
      str.append('}');

      return(str.toString());
   }

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

         if( this.countryId == null )
         {
            lEquals = lEquals && ( lTest.countryId == null );
         }
         else
         {
            lEquals = lEquals && this.countryId.equals( lTest.countryId );
         }
         if( this.ownerIdFk == null )
         {
            lEquals = lEquals && ( lTest.ownerIdFk == null );
         }
         else
         {
            lEquals = lEquals && this.ownerIdFk.equals( lTest.ownerIdFk );
         }
         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.countryId != null) ? this.countryId.hashCode() : 0);

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

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

      return result;
   }

}
