#region Copyright and GPL
/*************************************************************************
 * dataMagus - The open source database learning software
 * Copyright (C) 2007 by all authors
 * Authors: Monika Schwitter (monsy@gmx.ch)
 *          Jürg Zgraggen (j.zgraggen@ejaz.net)
 *          HSLU (Hochschule Luzern - Technik+Architektur)
 * 
 *     This program is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 * 
 *     This program is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 * 
 *     You should have received a copy of the GNU General Public License
 *     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *************************************************************************/
#endregion
#region Using
using System;
using System.Collections.Generic;
using System.Text;
#endregion

namespace dataMagus.PlugIns.Generators.PostgreSql
{
	/// <summary>
	/// This class is used to hold all generator speceific data of a relationship.
	/// </summary>
    public class RelationshipGeneratorData
    {
        #region Enumerations
        /// <summary>
        /// Action of the referential integrity.
        /// </summary>
        public enum ReferentialIntegrityAction
        {
        	/// <summary>
        	/// NoAction
        	/// </summary>
            NoAction,
            
            /// <summary>
            /// Restrict
            /// </summary>
            Restrict,
            
            /// <summary>
            /// Cascade
            /// </summary>
            Cascade,
            
            /// <summary>
            /// SetNull
            /// </summary>
            SetNull,
            
            /// <summary>
            /// SetDefault
            /// </summary>
            SetDefault
        }
        #endregion

        #region Members
        /// <summary>
        /// Referential integrity on update.
        /// </summary>
        private ReferentialIntegrityAction _onUpdate = ReferentialIntegrityAction.NoAction;
        
        /// <summary>
        /// Referential integrity on delete.
        /// </summary>
        private ReferentialIntegrityAction _onDelete = ReferentialIntegrityAction.NoAction;
        #endregion

        #region Constructors / Destructors
        /// <summary>
        /// Default constructor.
        /// </summary>
        public RelationshipGeneratorData()
        { 
        }
        #endregion

        #region Properties
        /// <summary>
        /// Referential integrity on update.
        /// </summary>
        public ReferentialIntegrityAction OnUpdate
        {
            get { return this._onUpdate; }
            set { this._onUpdate = value; }
        }

        /// <summary>
        /// Referential integrity on delete.
        /// </summary>
        public ReferentialIntegrityAction OnDelete
        {
            get { return this._onDelete; }
            set { this._onDelete = value; }
        }
        #endregion
    }
}
