Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i have some problem in my attempt to create domain model of this situation:

Auditor want to create analysis on process or on structure and register relative result

There is a catalog of controls, processes and structures

A single analysis may involve many processes or many structures and process and structure are attached:

I can have many structures involved in a process and a structure can have many processes

On a structure or a process can be done many controls

Controls are hierarchically organized

Example of what auditor can do:

1)
Create one analysis,
elect a list of process, for each one link the relative structures
for each process link a list of controls
for each <process,> indicate some information (over 20 different fields which describe how to do control on the specific process)
for each <process,> register the result (over 20 field for specification of the result)

2)
Same as 1 but with structure and not process

P.S.
An analysis can be made on Process only or on structure only

I think to use this model:


Society
-ID
-Description

ObjectOnControl
-ID
-Description
-Society

Strucure (inherits from ObjectOnControl)
-listOfProcesses

Process (inherits from ObjectOnControl)
- listOfStructures

Control
- ID
- Description
- ParentControl

Result
-ID
- n other string field

ObjectControlled
- ObjectOnControl
- Control
- Result

Analisys
- ID
- listOfObjectControlled
- auditor




But I don't like this things:

1) Strucure and Process reference each other
2) ObjectControlled is there only for mapping the relationship between Control and Object with the Result property. it's very difficult to give it a name
3) Society is a service object, only need it for populating menu and reporting. But the user have to maintain it for adding/editing/deleting so i need the key
but i would like to render it a Value Object


Thankyou for help

additional information copied from comment below
perhaps i have not explained well myself but i'm doing it as i wrote above and i come here to compare with community to see if there are better roads to do it.

I put the example just to explain better but we can very well be only on a theoretical:
-) there are best practices on how to map entities that refer each other?
-) lookup object that must be maintained can be modeled as Value Object?
Posted
Updated 4-Sep-13 23:10pm
v4

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900