aggregation

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Christian Binder
    replied
    Yes, this should be okay. So you can add multiple Details to a Header.

    Leave a comment:


  • sridharvenkataramanan
    replied
    I hope i have solved this in the following way. is it right?

    i have used class details as aggregation with class header and added multiple values to the dictionary object pointing to the details
    like the followings.
    Dictionary<stri ng, Details> objDetails

    Leave a comment:


  • sridharvenkataramanan
    replied
    Thanks for the immediate response.

    If you could throw some more lights or a simple example for the same would be very much helpful,.

    :) thanks

    Leave a comment:


  • Christian Binder
    replied
    I hope, I've understood your problem correctly:

    If you get
    1,"x","101","ab ","mm"
    1,"x","102","mx ","zz"
    , you want to create one instance of Header-class (1, "x") and two instances of Details ("101","ab","mm " and "102","mx","zz" )

    Is that right?

    You could use a management-class, which holds all Headers and provides a method e.g. GetHeaderInstan ce(id, name).
    This method checks, if a instance of Header exists with given id and name (therefore it has a List with all instances of Header). If not, it creates one and stores it in the Header-List.

    Leave a comment:


  • sridharvenkataramanan
    started a topic aggregation

    aggregation

    i have a class where i am storing the error header information and another class to store the details about the errors like the following
    header
    ---------
    id, name

    details
    ---------
    field id
    changed value
    original value

    now i want to create an instance to header class through which i need to input values to details and well the single header class can have multiple details

    say
    1,"x","101","ab ","mm"
    1,"x","102","mx ","zz"

    something like the above.

    i have seen couple of examples like aggregation of header with details
    but they requires two instances.

    Could you please guide me to proceed in oops way....
Working...