score:0

Accepted answer

It's a good idea to have POJOs, since they allow you to use their attributes instead of making an attribution for each attribute you want to use, just like you did here:

List<String> journals = jdbcTemplate.queryForList(query, params, String.class);

Even if it seems a kind of "redundant" thing, using POJOs helps you to have reuse aspect on you code. You can simply create methids that returns all the Publication attributes. In your case, this is a very simple entity with just 2 fields, but if this entity grows up, use POJOs could help you with the reuse aspect.

Here is a great aswer about advantages of using POJOs.


Related Query

More Query from same tag