Sebastian Janisch
,
Ranch Hand
I use it for configuration purposes.
I wrote a JdbcSupport API latelty, that does automatic bean mapping for a ResultSet.
As per convention, I matched the property names of the JavaBeans to the columns. For example:
would map to the sql columns firstName and lastName.
If these however do not match, for instance if the sql columns are names first_name and last_name, I used an annotation for the mapping:
I don't know if that is the best example, but I hope it makes it clear a bit.