473,767 Members | 2,302 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Data Repository Class & Inheritance Question

I have made a Data Repository Class that holds all the Methods for the
Objects that i use in my System such as Order,Client,et c

Example for what i want to do: In the Client Class I want to inherite
from the "DataReposi tory Class" **ONLY** the methods that is related to
the Client such as GetClientInfo() . and the Same for the Order Class i
want to inherite **ONLY** the methods related to the Order such as
GetOrderIno()

how to do this in OOP? if anyone is able do demostrate and example for
such CASE of Selective Inheritance that would be Very Helpful.

thanks

Sharing makes us all Better

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Dec 11 '05 #1
3 2306
Hello Dave,

The way to conform your request, u need to create facade classes with methods
only you need.
For example create ClientFacade, with one method that will redirect only
GetClientInfo() calls.
Your client should inherits from facade class.
The same for the Order class
DJ> I have made a Data Repository Class that holds all the Methods for
DJ> the Objects that i use in my System such as Order,Client,et c
DJ>
DJ> Example for what i want to do: In the Client Class I want to
DJ> inherite from the "DataReposi tory Class" **ONLY** the methods that
DJ> is related to the Client such as GetClientInfo() . and the Same for
DJ> the Order Class i want to inherite **ONLY** the methods related to
DJ> the Order such as GetOrderIno()

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Dec 11 '05 #2
Thanks Michael for your fast reply, But i am totally unfamiliar with the
facade classes approach, could u be more helpful if you support your
approach with a Code Snippet, That would be Really Helpful, Thanks in
foreward.

Sharing makes us all Better

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Dec 11 '05 #3
Hello Dave,

U have "DataRepository Class" with several methods and "ClientClas s" need
to see and use only DataRepositoryC lass::GetClient Info().

The way to do it - to create additional class "ClientFaca de" that will be
derived by ClientClass
ClientFacade class need contains at least one method GetClientInfo that will
call DataRepositoryC lass::GetClient Info().

DJ> Thanks Michael for your fast reply, But i am totally unfamiliar with
DJ> the facade classes approach, could u be more helpful if you support
DJ> your approach with a Code Snippet, That would be Really Helpful,
DJ> Thanks in foreward.

---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Dec 11 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
5887
by: mead | last post by:
What kind of classes is qualified as "concrete classes"? When should a member function in a class defined as "pure virtual" and when as "virtual"? Thanks!
10
5788
by: Zap | last post by:
Widespread opinion is that public data members are evil, because if you have to change the way the data is stored in your class you have to break the code accessing it, etc. After reading this (also copied below for easier reference): http://groups.google.it/groups?hl=en&lr=&safe=off&selm=6beiuk%24cje%40netlab.cs.rpi.edu&rnum=95 I don't agree anymore.
0
3731
by: TheCoder | last post by:
I am making a D-base with web conectivity for my class project. I have everything working but the subit button sends the data to the correct fields but afterwards it wants to reproduce new blank text boxes how do I stop this and how would I code it to redirect to a thank you page. All with out the help of a web server this has to br ran from the desktop and with in IE with a local directory. Pleas help I am stuck. here is the code! ...
5
1964
by: jqpdev | last post by:
Hello all... I'm coming from a Borland Delphi background. Delphi has a specific component called a Data Module. In the designer the Data Module behaves like a windows form. A developer can drop non-visual (controls) on the data module surface and wire them up and create procedures, functions, event procedures. In the source file (code behind file) the Data Module is a class, and the dropped components are public properties. The...
3
1936
by: Trammel | last post by:
Hi, I recently upgraded to VB.net from VB6.. and woah... I feel lost :¬O One of my reasons for upgrading is I was told that VB.net can do class inheritance and subclassing easier. Would someone be so kind as to provide a small demo about classes for some
3
1275
by: PJ6 | last post by:
First up, I know I'll get some good answers here, but in general, are there any newsgroups devoted to overall application architecture? Second, sorry for cross-posting but in this case I think it's appropriate, I want to hear answers from both sides. Instead of representing inheritance in the data model, in the particular project I'm working on now I've decided to do it in OO to keep it looser; each class gets its own table, because...
1
1411
by: DelphiLover | last post by:
Hi. I'm reading and reading, testing and testing, trying to figure out how to do things, how to do things according to best practises and how to do things in the best object oriented way. So... Best practises, in good object oriented fashion: how do I do it. I'm thinking making classes for data access. An Example that ALL books do - customer - and orders. So I'm thinking: Making a customer class
1
1801
by: Anthony Smith | last post by:
Let's say that I have some data like what is listed below. I simply want to get all of he text that is between the html tags. How would I do that with regular expressions or any kind of code. Also, I want to learn how to use regular expressions. What is a good site to get me started with php? <tr><td class="yfnc_h" nowrap="nowrap"><b><a href="/q/op? s=GME&amp;k=30.000000">30.00</a></b></td><td class="yfnc_h"><a href="/
5
2308
by: hanna88 | last post by:
hello, im having problem to copy the data from iostream& into string.and im not sure am i doing the right way by using getline.can anyone give hints how to solve this. here's to make things clear: //method that reads through the stream and breaks it into words and sentence
0
9571
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8835
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.