Hello Froestel:
Thank you so much for taking the time to reply. You gave me some good pointers and I think that I can make some use of it
as explained in here:
http://java.boot.by/scbcd5-guide/apes05.htmlHowever, I am not sure if I will go that route because of other issues. Example: (Based on the example they give on the link above: Person & Employee).
Now, let's say that Person also has a collection objects (say, cars) represented by Car .. so in Person we would have
class Person{
@<Collection mapping goes here>
List<Car> getCars() {..}
}
Now, assumme also that Employees have a collection of Trucks .. thus we have
class Trucks extends Cars
{
...
}
Then the employee class would be:
class Employee extends Person
{
List<Truck> getTrucks()
{
}
}
..
I think that at this point, we would have 2 * n quesries for the collections to be populated. (First, the base class for List<Car> then for the parent class for List<Truck>... and this is the situation we have....
I believe it to be very unusual for the application to be like that... but that is what we have.. an application that runs by itslef, but this app also can be used as a lib for yet another app that sits on to of it and "tries" to re-use the domain
objects of the lib.
I wonder is there is a better approach.
Thanks again.
Harring.