/*
 * Generated file - Do not edit!
 */
package com.alodar.example.interfaces;

import java.lang.*;

/**
 * Primary key for Customer.
 * @author XDOCLET 1.1.2
 * @xdoclet-generated at Aug 25, 2002 3:02:28 PM
 */
public class CustomerPK
   extends java.lang.Object
   implements java.io.Serializable
{
   static final long serialVersionUID = 4511468193799050073L;
   transient private int _hashCode = Integer.MIN_VALUE;
   transient private String value = null;

   public java.lang.Integer customerId;

   public CustomerPK()
   {
   }

   public CustomerPK( java.lang.Integer customerId )
   {
      this.customerId = customerId;
   }

   public java.lang.Integer getCustomerId()
   {
      return customerId;
   }

   public void setCustomerId(java.lang.Integer customerId)
   {
      this.customerId = customerId;
   }

   public int hashCode()
   {
      if( _hashCode == Integer.MIN_VALUE )
      {
         _hashCode += this.customerId.hashCode();
      }

      return _hashCode;
   }

   public boolean equals(Object obj)
   {
      if( !(obj instanceof com.alodar.example.interfaces.CustomerPK) )
         return false;

      com.alodar.example.interfaces.CustomerPK pk = (com.alodar.example.interfaces.CustomerPK)obj;
      boolean eq = true;

      if( obj == null )
      {
         eq = false;
      }
      else
      {
         if( this.customerId == null && ((com.alodar.example.interfaces.CustomerPK)obj).getCustomerId() == null )
         {
            eq = true;
         }
         else
         {
            if( this.customerId == null || ((com.alodar.example.interfaces.CustomerPK)obj).getCustomerId() == null )
            {
               eq = false;
            }
            else
            {
               eq = eq && this.customerId.equals( pk.customerId );
            }
         }
      }

      return eq;
   }

   public String toString()
   {
      if( value == null )
      {
         value = "[.";
         value += this.customerId+".";
         value += "]";
      }

      return value;
   }
}