//------------------------------------------------------------------------------
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using NHibernate template.
// Code is generated on: 18.06.2012 16:17:51
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------

using System;
using System.Collections;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Collections.Generic;

namespace ComponentID
{

    /// <summary>
    /// There are no comments for ComponentID.Person, ComponentID in the schema.
    /// </summary>
    public partial class Person {

        private KeyType _Key;

        private System.DateTime _BirthDay;

        private string _Address;

        private Contact _Contact;
    
        #region Extensibility Method Definitions
        
        partial void OnCreated();

        public override bool Equals(object obj)
        {
          Person toCompare = obj as Person;
          if (toCompare == null)
          {
            return false;
          }

          if (!Object.Equals(this.Key, toCompare.Key))
            return false;
          
          return true;
        }

        public override int GetHashCode()
        {
          int hashCode = 13;
          hashCode = (hashCode * 7) + Key.GetHashCode();
          return hashCode;
        }
        
        #endregion

        public Person()
        {
            this._Key = new KeyType();
            OnCreated();
        }

    
        /// <summary>
        /// There are no comments for Key in the schema.
        /// </summary>
        public virtual KeyType Key
        {
            get
            {
                return this._Key;
            }
            set
            {
                this._Key = value;
            }
        }

    
        /// <summary>
        /// There are no comments for BirthDay in the schema.
        /// </summary>
        public virtual System.DateTime BirthDay
        {
            get
            {
                return this._BirthDay;
            }
            set
            {
                this._BirthDay = value;
            }
        }

    
        /// <summary>
        /// There are no comments for Address in the schema.
        /// </summary>
        public virtual string Address
        {
            get
            {
                return this._Address;
            }
            set
            {
                this._Address = value;
            }
        }

    
        /// <summary>
        /// There are no comments for Contact in the schema.
        /// </summary>
        public virtual Contact Contact
        {
            get
            {
                return this._Contact;
            }
            set
            {
                this._Contact = value;
            }
        }
    }

    /// <summary>
    /// There are no comments for ComponentID.Contact, ComponentID in the schema.
    /// </summary>
    public partial class Contact {

        private KeyType _Key;

        private string _Phone;

        private Person _Person;
    
        #region Extensibility Method Definitions
        
        partial void OnCreated();

        public override bool Equals(object obj)
        {
          Contact toCompare = obj as Contact;
          if (toCompare == null)
          {
            return false;
          }

          if (!Object.Equals(this.Key, toCompare.Key))
            return false;
          
          return true;
        }

        public override int GetHashCode()
        {
          int hashCode = 13;
          hashCode = (hashCode * 7) + Key.GetHashCode();
          return hashCode;
        }
        
        #endregion

        public Contact()
        {
            this._Key = new KeyType();
            OnCreated();
        }

    
        /// <summary>
        /// There are no comments for Key in the schema.
        /// </summary>
        public virtual KeyType Key
        {
            get
            {
                return this._Key;
            }
            set
            {
                this._Key = value;
            }
        }

    
        /// <summary>
        /// There are no comments for Phone in the schema.
        /// </summary>
        public virtual string Phone
        {
            get
            {
                return this._Phone;
            }
            set
            {
                this._Phone = value;
            }
        }

    
        /// <summary>
        /// There are no comments for Person in the schema.
        /// </summary>
        public virtual Person Person
        {
            get
            {
                return this._Person;
            }
            set
            {
                this._Person = value;
            }
        }
    }

}

namespace ComponentID
{

    /// <summary>
    /// There are no comments for ComponentID.KeyType, ComponentID in the schema.
    /// </summary>
    public partial class KeyType {

        private string _FirstName;

        private string _LastName;
    
        #region Extensibility Method Definitions
        
        partial void OnCreated();

        public override bool Equals(object obj)
        {
          KeyType toCompare = obj as KeyType;
          if (toCompare == null)
          {
            return false;
          }

          if (!Object.Equals(this.FirstName, toCompare.FirstName))
            return false;
          if (!Object.Equals(this.LastName, toCompare.LastName))
            return false;
          
          return true;
        }

        public override int GetHashCode()
        {
          int hashCode = 13;
          hashCode = (hashCode * 7) + FirstName.GetHashCode();
          hashCode = (hashCode * 7) + LastName.GetHashCode();
          return hashCode;
        }
        
        #endregion

        public KeyType()
        {
            OnCreated();
        }

    
        /// <summary>
        /// There are no comments for FirstName in the schema.
        /// </summary>
        public virtual string FirstName
        {
            get
            {
                return this._FirstName;
            }
            set
            {
                this._FirstName = value;
            }
        }

    
        /// <summary>
        /// There are no comments for LastName in the schema.
        /// </summary>
        public virtual string LastName
        {
            get
            {
                return this._LastName;
            }
            set
            {
                this._LastName = value;
            }
        }
    }

}
