This content has been marked as final.
Show 2 replies
-
1. Re: what's a DAO
elmaroufy Dec 22, 2009 3:26 PM (in response to amira88)DAO is not necessarily a session bean, it may be a simple spring bean for example.
for the method updateClient, I do not think it will update the client :public Client updateClient(Client client) {
Client updatedClient = em.merge(client);
return updatedClient;
}
regarding deleteClient, it can be implemented like this :
public void deleteClient(Client client) {
em.remove(em.merge(client));
} -
2. Re: what's a DAO
pravumishra Jan 21, 2010 7:34 AM (in response to elmaroufy)DAO(Data Access Object) is a design patteren and you may get more information about it from internet.
It may have any kind of implementation by using plain JDBC, hibernate, entity bean , spring-hibernate or any kind of data access API currently available or comming in future.
Thanks and Regards,