I have seen a million examples of DAOs, and for the most part they all implement your basic CRUD operations for individual objects, perhaps several methods that return lists (like List getCustomers ()).
However, I have never seen an example in which there is a method that updates, deletes or creates several objects, for example: void update (List).
Are there methods that update multiple objects that are usually not part of the DAO, or are they just not used in the examples? I have a requirement in which I need to perform batch insertion, and calling myDAO.create () a hundred times is not very efficient.
I just want to make sure that I don’t miss anything before I go ahead and do what seems obvious.
Boden source
share