Click here to Skip to main content
Click here to Skip to main content
Articles » Database » Database » SQL » Downloads
 
Add your own
alternative version

A Model to Represent Directed Acyclic Graphs (DAG) on SQL Databases

, 14 Jan 2008
Addressing the general problem of representing directed acyclic graphs (DAGs) in SQL databases
#region copyright

// Copyright (C) 2008 Kemal ERDOGAN
// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, version 3 of the License.
// 
// 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 Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#endregion

namespace ADSync.Objects {
    using Afcas.Objects;

    internal struct ADPrincipal {
        //these two are not saved in SQL database
        private readonly string _ADPath;
        private readonly string _Description;
        private readonly string _DisplayName;
        private readonly string _Email;
        private readonly string[ ] _GroupPaths;
        private readonly string _Id;
        private readonly string _Name;
        private readonly PrincipalType _PrincipalType;


        public ADPrincipal( string id,
                            string name,
                            string adPath,
                            PrincipalType principalType,
                            string email,
                            string displayName,
                            string description,
                            string[ ] groupPaths ) {
            _Id = id;
            _Name = name;
            _ADPath = adPath;
            _PrincipalType = principalType;
            _Email = email;
            _DisplayName = displayName;
            _Description = description;
            _GroupPaths = groupPaths;
        }

        public string Id {
            get {
                return _Id;
            }
        }

        public string ADPath {
            get {
                return _ADPath;
            }
        }

        public string Name {
            get {
                return _Name;
            }
        }

        public PrincipalType PrincipalType {
            get {
                return _PrincipalType;
            }
        }

        public string DisplayName {
            get {
                return _DisplayName;
            }
        }

        public string Email {
            get {
                return _Email;
            }
        }

        public string Description {
            get {
                return _Description;
            }
        }

        public string[ ] GroupPaths {
            get {
                return _GroupPaths;
            }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Kemal Erdogan

France France
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 14 Jan 2008
Article Copyright 2008 by Kemal Erdogan
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid