First I would answer to your question. I use Maps and proxy objects in my UI layer. I pass the same to the business layer. I wanted to use the same in my DAO layer as well.
If I dont use a separate DAO object, I can
Improve performance as I avoid copy of data from Map / proxy object to DAO object.
I would avoid creating lot of objects and lot of java files.
If Hibernate can give it as a map (
while retrieving) and accept it as a map (
while saving), its more than enough. With the variable name as the key
Eg: For a user having 2 fields namely id and name, the map would contain
{userId=1232, userName=