How should I define my Java Objects?

Posted by HonorGod on Programmers See other posts from Programmers or by HonorGod
Published on 2012-12-18T12:09:56Z Indexed on 2012/12/18 17:14 UTC
Read the original article Hit count: 178

I have a data grid where I sort of show the following information -

All Guests
   Total Adults = 22
   Total Children = 27

    Confirmed
       Total Adults = 9
       Total Children = 13
        Country = Germany
                    Total Adults = 5
                    Total Childres = 6
            Friends
                Adults = 2
                Children = 2
            Relatives
                Adults = 3
                Children = 4
        Country = USA
                    Total Adults = 4
                    Total Childres = 7
            Friends
                Adults = 2
                Children = 5
            Relatives
                Adults = 2
                Children = 2

    Tentative
       Total Adults = 13
       Total Children - 14
        Country = Australia
                    Total Adults = 7
                    Total Childres = 8
            Friends
                Adults = 2
                Children = 3
            Relatives
                Adults = 5
                Children = 5
        Country = China
                    Total Adults = 6
                    Total Childres = 6
            Friends
                Adults = 2
                Children = 4
            Relatives
                Adults = 4
                Children = 2
    

And in the database what I have is data at the lowest level which is Friends / Relatives and the corresponding countries set as a look-up value which in indirectly connected to another look-up that can tell me if they fall under confirmed or tentative.

I guess my question is how do I layout my Java Object and perform the aggregations and give it back to the client.

I am not sure if I am clear with my question, but feel free to comment so I can update the question accordingly.

© Programmers or respective owner

Related posts about java

Related posts about design