This example shows a helper class that contains methods useful, when executing the queries for data. Every method here uses Java Generic's in order to be very flexible.
public <T> List<T> selectElements(AbstractDao<T, ?> dao) {
if (dao == null) {
return null;
}
...