Hi guys, I like JSF and Hibernate but I have a a problem to make the right decision:
In fact, I have POJOs for Client, House, Problem and son on. and a Business delegate RentManager. and the programs might help the client to report one or more problems his/her house might have.
I want to get all clients, houses, and problems. Can RentManager do the job of querying the database through POJOs and leave POJOs without collections? if so, all utilities methods will be implemented in RentManager only? or do I have to do a duplication in POJOs? (DRY?)
this is the fragment of the program, I want to get help about
class Client{
//setters/getters/ constructor are here.
//I have also client.hbm.xml and works fine
}
class Problem{
//properties/setters/getters/ constructor
}
class House{
//properties/setters/getters/ constructor
}
class RentManager{
//List and ArrayList for houses, and problems,
//and clients + setters/getters/DataModel for these collections
// addProblem(), updateProblem(), ..
// addClient(), updateClient(), ...
// addHouse(), updateHouse(), ...
}
with the intension to use RentManager in my controller instead of accessing directly POJOs from controller. Is this correct approach? or do you guys have a suggestion? thanks for your help.