Is there any pattern that promotes ease of writing the persistence metods? I've read about DAO, but it doesn't like what I want (I guess DAO is more when you need to change your database and you won't have [many] problems).
Avioding typing code is not a normal driver for choosing a pattern (though I share your pain
).
DAOs are good because they seperate the persistance implementation from your application. As you have already noted they are good if you want to change databases. They are also good if you decide you don't want to use a database at all, for example if you want to run
unit tests on your code with a hard coded data set. Or if you decide you want to replace JDBC with something else (such as Hibernate). It might not be immediately apparent that you will need to do this, but for the little extra effort you make you gain yourself a lot of freedom to rework your app.
If you are looking for ways to reduce the amount of code you have to personally write you might look at some of the modelling tools out there that have forward generation capabilities. With this you model your DAO, hit a button and the tool generates your code for you.
[ July 22, 2008: Message edited by: Paul Sturrock ]