//------------------------------------------------------------------------------
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using NHibernate template.
// Code is generated on: 19.06.2012 17:45:24
//
// 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 ExtraColumnsComponent
{

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

        private int _FactoryID;

        private string _FactoryName;

        private Iesi.Collections.Generic.ISet<CompanyFactoryType> _Companies;
    
        #region Extensibility Method Definitions
        
        partial void OnCreated();

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

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

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

        public Factory()
        {
            this._Companies = new Iesi.Collections.Generic.HashedSet<CompanyFactoryType>();
            OnCreated();
        }

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

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

    
        /// <summary>
        /// There are no comments for Companies in the schema.
        /// </summary>
        public virtual Iesi.Collections.Generic.ISet<CompanyFactoryType> Companies
        {
            get
            {
                return this._Companies;
            }
            set
            {
                this._Companies = value;
            }
        }
    }

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

        private int _CompanyID;

        private string _CompanyName;

        private Iesi.Collections.Generic.ISet<CompanyFactoryType> _Factories;
    
        #region Extensibility Method Definitions
        
        partial void OnCreated();

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

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

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

        public Company()
        {
            this._Factories = new Iesi.Collections.Generic.HashedSet<CompanyFactoryType>();
            OnCreated();
        }

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

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

    
        /// <summary>
        /// There are no comments for Factories in the schema.
        /// </summary>
        public virtual Iesi.Collections.Generic.ISet<CompanyFactoryType> Factories
        {
            get
            {
                return this._Factories;
            }
            set
            {
                this._Factories = value;
            }
        }
    }

}

namespace ExtraColumnsComponent
{

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

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

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

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

        public override int GetHashCode()
        {
          int hashCode = 13;
          return hashCode;
        }
        
        #endregion

        public CompanyFactoryType()
        {
            OnCreated();
        }

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

        #region Ends of the many-to-many association 'Company_Factory'

    
        /// <summary>
        /// There are no comments for Companies in the schema.
        /// </summary>
        public Company Companies
        {
            get;
            set;
        }

    
        /// <summary>
        /// There are no comments for Factories in the schema.
        /// </summary>
        public Factory Factories
        {
            get;
            set;
        }

        #endregion
    }

}
