Modelling Individuals and Organizations

I'm developing an application where a user can either act as an individual, or as a member of an organization, and I'm having some trouble modelling this so support the various systems.
To explain the rules, users log in and peform actions, but these actions may be in their own name, or performed on behalf of their organization. An individual can only peform the former, while a member of an organization can act on their own behalf or on behalf of their organization. A user can only be a member of a single organization.
And to clarify, an organization is a different beast than an individual. Primarily because it isn't a different type of individual, but instead a collection of individuals that operates as an independent identity in the system. It also supports a range of member-management functionality (payroll, for example) because of that. While it doesn't do anything itself, since it's members perform actions for it, it is the organization that is considered to have performed the action when the dust settles.
So now much of the objects within the system can have a parent that is either an individual or an organization, and several UI screens apply to both scenarios equally, with very minor differences (sometimes with no difference at all).
This leads to a host of implementation details. Let's say both individuals and organizations can buy widgets as one of many actions they both share. Now we must support the concept of widgets belonging to either an individual or an organization. Business logic must be able to handle both scenarios, ideally with minimal duplication, and persistence has to take into account that the parent relationship of widgets isn't bound to a single type, but one of two (individuals or orgs). Most of the systems in the application must deal with this issue.
I know this is a very abstract question, but I'm at an abstract phase of the design. Has anyone dealt with this type of model, and what techniques have been used to architect it?
Thanks to everyone in advance!

I think you'll need some others. There's a
many-to-many relationship between
Individuals and Organizations. True enough. I already have an object representing the relationship and attributes related to it (date, role, etc).
Can be complex. I've seen it done badly.
I don't think Party is necessarily trivial, even
if the idea is simple.Certainly isn't trivial. All sorts of new issues arrise. For example, with the proposed table layout, Parties, Individuals, and Organizations all have different ID's, and that needs to be reconciled.
Situations arise where your working with a system that references Parties, but you want to access more detailed information about the Person or Organization, perhaps for display purposes. Now you have to figure out how to get the derived type with just a Party ID. Doable, but I'd prefer to avoid a blind search through the Person and Organization tables.
What if the Party table referenced the sub-type? Perhaps a column that maps to an enum in code such as PartyType.Person and PartyType.Organization. Mappers like Hibernate could use this information to automatically create an object of the derived type when you load a Party.
Anyone know of any open-source Java or .NET projects that solve these problems? I'd love to see code.

Similar Messages

  • I am trying to use java  file as Model layer and jsf as presentation layer

    I am trying to use java file as Model layer and jsf as presentation layer and need some help
    I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
    I create java file
    package oracle.model;
    import java.sql.;*
    import java.util.;*
    *public class TableBean {*
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    *public List getperInfoAll() {*
    perInfoAll.add(0,new perInfo("name","username","blablabla"));
    return perInfoAll;
    *public class perInfo {*
    String uname;
    String firstName;
    String lastName;
    *public perInfo(String firstName,String lastName,String uname) {*
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    *public String getUname() {*
    return uname;
    *public String getFirstName() {*
    return firstName;
    *public String getLastName() {*
    return lastName;
    right click on the file and choose 'create data control'
    then i wrote the jsf file:
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<f:view>*
    *<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
    var="item" bgcolor="#F1F1F1" border="10"
    cellpadding="5" cellspacing="3" rows="4" width="50%"
    dir="LTR" frame="hsides" rules="all"
    *>*
    *<f:facet name="header">*
    *<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
    *</f:facet>*
    *<h:column id="c2">*
    *<f:facet name="header">*
    *<h:outputText value="First Name" id="ot1"/>*
    *</f:facet>*
    *<h:outputText style="" value="#{item.firstName}"*
    id="ot2"/>
    *</h:column>*
    *<h:column id="c4">*
    *<f:facet name="header">*
    *<h:outputText value="Last Name" id="ot9"/>*
    *</f:facet>*
    *<h:outputText value="#{item.lastName}" id="ot8"/>*
    *</h:column>*
    *<h:column id="c3">*
    *<f:facet name="header">*
    *<h:outputText value="Username" id="ot7"/>*
    *</f:facet>*
    *<h:outputText value="#{item.uname}" id="ot4"/>*
    *</h:column>*
    *<f:facet name="footer">*
    *<h:outputText value="The End" id="ot3"/>*
    *</f:facet>*
    *</h:dataTable>*
    *</center>*
    *</af:document>*
    *</f:view>*
    but nothing is appear in my table
    I know that there is something wrong in calling the binding object
    I need help pls and where can i find some help to deal with another tag types
    thanks

    i dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
    and this code is generated
    *<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
    *"http://www.w3.org/TR/html4/loose.dtd">*
    *<%@ page contentType="text/html;charset=UTF-8"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
    *<f:view>*
    *<af:document id="d1">*
    *<af:messages id="m1"/>*
    *<af:form id="f1">*
    *<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
    *rows="#{bindings.perInfoAll1.rangeSize}"*
    *emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
    *fetchSize="#{bindings.perInfoAll1.rangeSize}"*
    *rowBandingInterval="0"*
    *selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
    *rowSelection="multiple" id="t1">*
    *<af:column sortProperty="uname" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.uname.label}"*
    *id="c1">*
    *<af:inputText value="#{row.bindings.uname.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.uname.label}"*
    *required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
    *id="it3">*
    *<f:validator binding="#{row.bindings.uname.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="firstName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
    *id="c2">*
    *<af:inputText value="#{row.bindings.firstName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.firstName.label}"*
    *required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
    *id="it2">*
    *<f:validator binding="#{row.bindings.firstName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="lastName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
    *id="c3">*
    *<af:inputText value="#{row.bindings.lastName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.lastName.label}"*
    *required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{row.bindings.lastName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *</af:table>*
    *</af:form>*
    *</af:document>*
    *</f:view>*
    but when run it i see the following errors
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    :(

  • Hello, Im new to this website. Im having issues with my Macbook. I have the old 2009 model Macbook and it is our schools macbook. The school just upgraded these MacBooks to OSX Mavericks and when i try to open Minecraft it won't let me. It says no jd

    Hello, Im new to this website. Im having issues with my Macbook. I have the old 2009 model Macbook and it is our schools macbook. The school just upgraded these MacBooks to OSX Mavericks and when i try to open Minecraft it won't let me. It says no jdk installed. I also try to install Java SE runtime but half way through the Software Update it says cant download software because of network problem but I'm connected to the internet and i can browse stuff just fine. Can any one help with my problems. P.S. I don't know the administrator password or stuff like that. And yes we are allowed to play games and stuff on these laptops but only at home not at school so don't tell me i need to focus on school and not games. 

    Since you updated the operating system, it is probably Minecraft is missing certain files that ware remove or are not longer comparable with the new version of the OSX. what I recommend, is to check is there is an update for Minecraft and install that. If there is not update available, probably the best thing will be reinstalling Minecraft. Hope this will help you.   

  • I have an apple TV Model A1427 and do not have an icon for youtube. How can I add youtube to the home page?

    I have an apple TV Model A1427 and do not have an icon for youtube. How can I add youtube to the home page?

    Have icon but cannot connect - Please Help.
    Mine is Gen. 2 - Model MC572C/A. I have the YouTube icon but cannot access YouTube.  Message says "No content was found - There is a problem communicating with YouTube. Try again later."  This problem has been for at least 1 month now.  Any ideas?

  • How do I import an old iphoto library from an external hard disk while keeping my editing and organization in tact?

    I am running iPhoto '08 on a MacBook Pro 2.2 GHz Intel C2D (MacBook Pro 3,1). I backed up my hard drive contents onto an external hard drive, then formatted my computer and installed Mountain Lion. I then re-installed iPhoto '08 and ran all the updates. Now, I would like to import my old library from the external disk onto my computer without losing my editing and organization; however, when I select "import to library" from iPhoto, the old iPhoto library is not a selectable option.
    I know how to "show package contents" and import directly from the Original and Modified folders, but I don't want to lose my organization. Can I simply drag the content of those folders into my new Original and Modified folders? Will iPhoto read that correctly?
    I tried to open the old library from the external disk, thinking to export them all to a folder and import from there, but that just opened my new library and none of the old photos were imported or available.
    I'm running out of ideas and would appreciate any help you guys can give. Thanks!!

    You don't import it.
    Just drag the iphoto Library from the external to the Pictures Folder.
    Then open it:
    Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Choose Library'
    Never import one Library to another. Every version and thumbnail is imported like a distinct photo, you lose all your Albums, Keywords etc., the link between Original and Previews is destroyed, the non-destructive editing feature is ruined and so on. In summary: it's mess.

  • I recently got an Ipod touch model A1213 and I cannot figure out how to get apps on it. I have tried everything and when I try to update software, it says Im already up to date, but my software version is only 1.1.5. How do i fix it?

    I recent recieved and Ipod touch model A1213 and i cannot figure out how to get apps on it. I have tried everything i can think of and when i try to update my ipod software it tells me that its already up to date. even though its only 1.1.5. How do i fix it?

    You have a 1st generation iPod Touch.
    It can be updated to 3.1.3 by purchase. See here Purchasing iOS 3.1 Software Update for iPod touch (1st generation)

  • CIF - Integration model name and APO application

    Hi Experts,
    In the CFM1 Transaction, there are 3 mandatory inputs are Model name, Logical system and APO application.
    Logical systems are customized in CFC1 transaction. I couldn't trace the model name and application creation.
    What is the transaction to customize/Create the new Model name and APO application.
    Hope this is very simple question to you and expect your soon.
    Thanks,
    Saravanan V

    Hi Somnath,
    Thanks for ur reply.
    First I saved the selection as variant. But it was not updated in the IM table.
    Then I tried to generate the model and now I can see the details when I use the F4 help.
    So, to create a integration model need to generate the variant once.
    Thanks for the confirmation.
    Thanks,
    Saravanan V

  • What is the difference between APPLE TV  models 30850MD199LLA and 300024854433?

    What is the difference between APPLE TV  models 30850MD199LLA and 300024854433?

    MD199 is as shown below. The other number is not an Apple model number.
    OVERVIEW
    Introduced     March 2012 (A1427) March 2013 (A1469)
    Discontinued     --
    Model Identifier     AppleTV3,1 (A1427) or AppleTV3,2 (A1469)
    Model Number     A1427 or A1469
    EMC     2528
    Order Number     MD199LL/A

  • How to determine the Country and Organization from IP

    Hi,
    I would like to determine the Country and Organization from a given IP. I have to write a JSP, which when given the IP address gives the country and the organization to which the IP belongs. The organization may be the ISP, or a MNC or any other corporate/government body, or it may be of an individual. I have to do it progamitically from inside a JSP?
    Any suggestions anybody
    Thanks in Advance for your reply

    even when tracking IP's, if it is static you can narrow it down pretty far - if it's dynamic, you can only narrow it down to a specific part of the country.

  • Moving Photoshop Elements and Organizer to a new PC (after HDD failure)

    Hi all,
    My PC died recently, and suddenly. Thankfully I had a drive backing everything up so I have a complete mirror of my harddrive on an external drive. I have now bought a new PC and have installed PSE9 (with PE9 and Organizer) onto it.
    I would like to be able to rebuild all my catalogs and albums, and have all my keywords etc, in my new installation, using the files I have in my back-up drive. There are thousands of photos, going back about 10 years, and it took about three solid weeks to tag them all and fix their dates etc.  Can someone please tell me which files I need to copy over into my new installation, and where they should go? The drive names on my new machine will probably be different to the ones I used on my old machine, but beneath that all files are in the same folder structure as they were on my old (now dead) machine. The dead machine ran Vista, and I'm now on Win7.
    Please let me know if there's any further information I need to provide.
    Thanks in advance.
    DNL

    Where I am not clear is why a full drive backup (that includes a copy of the catalog, using a 3rd party drive backup tool) led to a situation where the catalog info could not be completely restored to a new PC.
    Let's have a look at the result of the complete restoration of a drive.
    - Case one : There has been a mirror copy on the second drive
    - case two : you have a clone of your disk (I supose it's uptodate at the time of crash...)
    In both cases:
    The media files are all identical.
    The catalogs are identical.
    But... there is a difference.
    A cloning utility is also able to restore the original drive serial number used by Windows to recognize the different drives.
    In the mirrored drive, the serial number is different from the original one.
    the catalog contains for each media file:
    - the full path : root folder/subfolder 1/sub-subfolder... file name with extension.
    - the identification of the drive (serial number plus drive letter)
    When the Organizer reads the data in the catalog and wants to access a file via the operating system, it will find all files in the clone, and all files in the the mirrored version will be missing. Then you need to reconnect as mentionned in a previous post. And that's a lot of painful work
    So, assuming your mirrored version is strictly ok, the catalog is fooled by the change of drive serial number. You can either have Windows to assign the old serial number or use an sqlite management software to edit that information in the database : catalog.psexxdb.
    What I don't know is if the background processes in charge of the accessory jobs of the Organizer (watched folders, face recognition, autoanalysis...) will be correctly restored in a crash situation. So you might lose some information or have to wait for the Organizer to rebuild some of the missing information.
    My suggestion to backup also the catalog was to avoid a situation where the user has a syncing software in charge of the media folders only. You are right that the catalog was also backed up in the case of the original poster.

  • I have an older macbook model a1181 and i want to delete everything from it and start from zero?

    I bought a macbook model a1181 and I want to delete all the information cause its missing some icons that I cant seem to fibd anywhere in the computer.

    Insert a compatible Mac OS X install DVD, restart the computer with the C key held down, use the Disk Utility to erase the partition with Mac OS X installed, and then install a fresh OS onto it.
    (107814)

  • PSE 8.0 Will Not Open (Including Editor and Organizer)

    I have been using PSE 8.0 for three or four years now, and I have never experienced any problems with it. Today, after installed a Wacom Intuos Creative Pen Tablet, my PSE 8.0 would not open-- nor would Editor and Organizer. I tried uninstalling and reinstalling the program, renaming certain files (as read in other answers), creating shortcuts to bypass the Welcome Screen (which also will not appear), among other solutions that I read about for similar problems. Whenever I attempt to open Organizer, a crash report appears, stating that the program has quit unexpectedly--that's all it says. If I try to open PSE 8 or Editor, the circle next to my cursor appears for a moment, but soon it disappears without a single pop-up or explanation as to why the program won't open. Since I cannot access the Welcome Screen, I cannot locate the Preference file to change the name/delete it.  If it matters, I use Windows 7.
    Any and all help is appreciated. I'm going a bit insane without my lovely Photoshop to doodle in. ;n;
    Thank you,
    ~ Mongoose

    EDIT: I found the Preferences within the PSE folder, and I renamed it; afterwards, I tried to open PSE again. It reset the Preferences, yet it is still telling me that PSE has unexpectedly quit. /EDIT
    I went into the PSE folder and attempted the "three finger salute" while clicking on Organizer, but all it brought up were the Organizer Properties.
    Also, within the past hour, PSE has been randomly popping multiple times up to inform me that it unexpectedly quit, yet I have not tried to open it recently. I am not sure if that is important or not.

  • HT1977 I'm a iPhone 4s and new iPad 3 owner.  I'd like the apps and organization I've invested in the iphone to be exactly transfered to the ipad.  Is this possible?  Will all the applications and folders match exactly?  Thank you for your help

    I'm a iPhone 4s and new iPad 3 owner.  I'd like the apps and organization time I've invested in the iphone to be exactly transfered to the ipad.  Is this possible?  Will all the applications and folders match exactly?  Thank you for your help

    Restore the latest iPhone backup you made to the iPad.

  • I have just received two white I Phones 4 Model MC611LL and they bring along the Face Time feature. I own an older I Phone 4 model MC610 LL and it doesn´t have the Face Time feature. How should I get it?.

    I have just received two white I Phones 4 Model MC611LL and they have the Face Time Feature included. I own an older version of I Phone 4 Model MC610LL and it doesn´t have the Face Time feature included. How can I get it?.

    Where did you get the old one? If it came from the Middle East, FaceTime was removed from those due to government regulations. It can NOT be added back to them.

  • I need to sort and organize all my email addresses in apple mail? - where are they and how can I organize and copy them ? urgent help needed please

    really need urgent help - where do I find the entire list of all my email addresses? and how do I sort and organize them into folders ?

    really need urgent help - where do I find the entire list of all my email addresses? and how do I sort and organize them into folders ?

Maybe you are looking for