I have to create a domain for the energy transmission field, so I have Breaker
, Transformer
, Line
, Cubible
, Busbar
, Source
.
I'm trying to search for a domain implementation that conform to this specification:
Cubicle
containsBreaker
andTransformer
Breaker
andTransformer
andSource
have to be connected each other withLine
Cubicle
contains one or moreBusbar
Breakers
insideCubicle
must be interconnected with aBusbar
Breaker
can have max of twoLine
/Busbar
connected (one for each side)Transformer
can have max of two/threeLine
/Busbar
connected (one for each winding)Source
can have max of oneLine
connected- I have to propagate the
Energized
status between elements soLine
,Busbar
andTransformer
receive the status ofEnergized
and generate it's ownEnergized
status, Breaker can transfer theEnergized
status only ifStatus==Status.Closed
With this rules I have created my domain that fullfil each rule, BUT
I don't have a complete tree... I have to create Breakers, next I create a Busbar with List<Breaker>
, next I create a cubicle and insert the Busbar in List<Busbar>
.
But when I come to Nhibernate mapping... all fails because I have multiple reference between objects and objects must be created in particular order in order to connect to events and permit Energized
status propagation.
Any idea?