Click here to Skip to main content
15,895,740 members
Articles / Desktop Programming / WPF

DBTool for Oracle - Part 1

Rate me:
Please Sign up or sign in to vote.
4.92/5 (45 votes)
13 Apr 2014CPOL18 min read 138.2K   5.1K   88  
Enhance productivity and reliability, write your own tools.
using System;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using System.Runtime.Serialization;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;


using Harlinn.Oracle.DBTool.Example.Common;
using Harlinn.Oracle.DBTool.Example.Types;

namespace Harlinn.Oracle.DBTool.Example.Types.Operations
{

    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class GetAllTagTypesRequest : OperationRequest
    {

        public GetAllTagTypesRequest()
        {
        }

        public GetAllTagTypesRequest(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.GetAllTagTypes;
            }
        }

    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class GetAllTagTypesReply : OperationReply
    {

        private List<TagTypeElementData> result;
        public GetAllTagTypesReply()
        {
        }

        public GetAllTagTypesReply(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.GetAllTagTypes;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public List<TagTypeElementData> Result
        {
            get
            {
                return result;
            }
            set
            {
                this.result = value;
            }
        }

    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class GetTagTypeByIdRequest : OperationRequest
    {

        private long id;

        public GetTagTypeByIdRequest()
        {
        }

        public GetTagTypeByIdRequest(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.GetTagTypeById;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class GetTagTypeByIdReply : OperationReply
    {

        private TagTypeElementData result;
        private long id;

        public GetTagTypeByIdReply()
        {
        }

        public GetTagTypeByIdReply(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.GetTagTypeById;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public TagTypeElementData Result
        {
            get
            {
                return result;
            }
            set
            {
                this.result = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class GetTagTypeByNameRequest : OperationRequest
    {

        private string name;

        public GetTagTypeByNameRequest()
        {
        }

        public GetTagTypeByNameRequest(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.GetTagTypeByName;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                this.name = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class GetTagTypeByNameReply : OperationReply
    {

        private TagTypeElementData result;
        private string name;

        public GetTagTypeByNameReply()
        {
        }

        public GetTagTypeByNameReply(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.GetTagTypeByName;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public TagTypeElementData Result
        {
            get
            {
                return result;
            }
            set
            {
                this.result = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                this.name = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class InsertTagTypeRequest : OperationRequest
    {

        private Guid clientId;
        private long id;
        private string name;
        private string description;
        private string comments;

        public InsertTagTypeRequest()
        {
        }

        public InsertTagTypeRequest(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.InsertTagType;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public Guid ClientId
        {
            get
            {
                return clientId;
            }
            set
            {
                this.clientId = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                this.name = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Description
        {
            get
            {
                return description;
            }
            set
            {
                this.description = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Comments
        {
            get
            {
                return comments;
            }
            set
            {
                this.comments = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class InsertTagTypeNotification : OperationNotification
    {

        private Guid clientId;
        private long id;
        private string name;
        private string description;
        private string comments;

        public InsertTagTypeNotification()
        {
        }

        public InsertTagTypeNotification(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.InsertTagType;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public Guid ClientId
        {
            get
            {
                return clientId;
            }
            set
            {
                this.clientId = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                this.name = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Description
        {
            get
            {
                return description;
            }
            set
            {
                this.description = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Comments
        {
            get
            {
                return comments;
            }
            set
            {
                this.comments = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class InsertTagTypeReply : OperationReply
    {

        private Guid clientId;
        private long id;
        private string name;
        private string description;
        private string comments;


        public InsertTagTypeReply()
        {
        }

        public InsertTagTypeReply(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.InsertTagType;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public Guid ClientId
        {
            get
            {
                return clientId;
            }
            set
            {
                this.clientId = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                this.name = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Description
        {
            get
            {
                return description;
            }
            set
            {
                this.description = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Comments
        {
            get
            {
                return comments;
            }
            set
            {
                this.comments = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class UpdateTagTypeRequest : OperationRequest
    {

        private Guid clientId;
        private long id;
        private string name;
        private string description;
        private string comments;

        public UpdateTagTypeRequest()
        {
        }

        public UpdateTagTypeRequest(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.UpdateTagType;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public Guid ClientId
        {
            get
            {
                return clientId;
            }
            set
            {
                this.clientId = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                this.name = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Description
        {
            get
            {
                return description;
            }
            set
            {
                this.description = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Comments
        {
            get
            {
                return comments;
            }
            set
            {
                this.comments = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class UpdateTagTypeNotification : OperationNotification
    {

        private Guid clientId;
        private long id;
        private string name;
        private string description;
        private string comments;

        public UpdateTagTypeNotification()
        {
        }

        public UpdateTagTypeNotification(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.UpdateTagType;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public Guid ClientId
        {
            get
            {
                return clientId;
            }
            set
            {
                this.clientId = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                this.name = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Description
        {
            get
            {
                return description;
            }
            set
            {
                this.description = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Comments
        {
            get
            {
                return comments;
            }
            set
            {
                this.comments = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class UpdateTagTypeReply : OperationReply
    {

        private Guid clientId;
        private long id;
        private string name;
        private string description;
        private string comments;


        public UpdateTagTypeReply()
        {
        }

        public UpdateTagTypeReply(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.UpdateTagType;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public Guid ClientId
        {
            get
            {
                return clientId;
            }
            set
            {
                this.clientId = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                this.name = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Description
        {
            get
            {
                return description;
            }
            set
            {
                this.description = value;
            }
        }


        [DataMember(EmitDefaultValue=false)]
        public string Comments
        {
            get
            {
                return comments;
            }
            set
            {
                this.comments = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class DeleteTagTypeRequest : OperationRequest
    {

        private Guid clientId;
        private long id;

        public DeleteTagTypeRequest()
        {
        }

        public DeleteTagTypeRequest(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.DeleteTagType;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public Guid ClientId
        {
            get
            {
                return clientId;
            }
            set
            {
                this.clientId = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class DeleteTagTypeNotification : OperationNotification
    {

        private Guid clientId;
        private long id;

        public DeleteTagTypeNotification()
        {
        }

        public DeleteTagTypeNotification(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.DeleteTagType;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public Guid ClientId
        {
            get
            {
                return clientId;
            }
            set
            {
                this.clientId = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


    }


    [DataContract(Namespace = Constants.Namespace)]
    [Serializable]
    public class DeleteTagTypeReply : OperationReply
    {

        private int result;
        private Guid clientId;
        private long id;


        public DeleteTagTypeReply()
        {
        }

        public DeleteTagTypeReply(Guid requestId)
            : base(requestId)
        {
        }

        public override ServiceOperation ServiceOperation
        {
            get
            {
                return ServiceOperation.DeleteTagType;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public Guid ClientId
        {
            get
            {
                return clientId;
            }
            set
            {
                this.clientId = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public int Result
        {
            get
            {
                return result;
            }
            set
            {
                this.result = value;
            }
        }

        [DataMember(EmitDefaultValue=false)]
        public long Id
        {
            get
            {
                return id;
            }
            set
            {
                this.id = value;
            }
        }


    }

}


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)


Written By
Architect Sea Surveillance AS
Norway Norway
Chief Architect - Sea Surveillance AS.

Specializing in integrated operations and high performance computing solutions.

I’ve been fooling around with computers since the early eighties, I’ve even done work on CP/M and MP/M.

Wrote my first “real” program on a BBC micro model B based on a series in a magazine at that time. It was fun and I got hooked on this thing called programming ...

A few Highlights:

  • High performance application server development
  • Model Driven Architecture and Code generators
  • Real-Time Distributed Solutions
  • C, C++, C#, Java, TSQL, PL/SQL, Delphi, ActionScript, Perl, Rexx
  • Microsoft SQL Server, Oracle RDBMS, IBM DB2, PostGreSQL
  • AMQP, Apache qpid, RabbitMQ, Microsoft Message Queuing, IBM WebSphereMQ, Oracle TuxidoMQ
  • Oracle WebLogic, IBM WebSphere
  • Corba, COM, DCE, WCF
  • AspenTech InfoPlus.21(IP21), OsiSoft PI


More information about what I do for a living can be found at: harlinn.com or LinkedIn

You can contact me at espen@harlinn.no

Comments and Discussions