DataObject constructor from two other DataObjects

From: Andrea Borgogelli Avveduti (borgogell..otmail.com)
Date: Fri Dec 02 2005 - 12:09:23 EST

  • Next message: Mike Kienenberger: "Re: DataObject constructor from two other DataObjects"

    Hi boys,
     
    in my example the ER schema has 3 tables:
     
    1) People (PK is a code like social security number: varchar(20))
    2) Schools (PK is a counter)
    3) Students (PK is people's social number and school's ID)
     
    ObjectOriented options:
     
    1) I can modelling the Student class with multiple-inheritance from People and Schools class
    2) I can modelling the Student class as stand alone class with some relations with the others two.
     
    The questione is:
     
    I have choose the second OO architectural option. So, how can I create an istance of Student from an istance o People and School.
     
    I'd like to write a method like this:
     
    Student student = new Student(onepeople, oneschool);
     
    ....but I only know the standard DataObject constructor:

    dataContext.createAndRegisterNewObject(ObjEntity.class)

    Any advices ?
     
    Thank u to all of u
     
    Ciao
     
    Andrea



    This archive was generated by hypermail 2.0.0 : Fri Dec 02 2005 - 12:09:24 EST