Jbarrez, thanks for providing simple solution like customSqlExecution feature. Its a big helping hand for me. How do I customize mapper with my own List<ResultType> instead of List<Map<String, Object>>? Could some one give an example for how to implement it.
Update: I find a way for this.
public class TaskResultType{
private String name;
private String id;
public final void setName(final String name) {
this.name = name;
}
public final String getName() {
return name;
}
public final void setId(final String id) {
this.id = id;
}
public final String getId() {
return id;
}
}
and the usage of return type as follows:
CustomSqlExecution<MyTestMapper, List<TaskResultType>> customSqlExecution =
new AbstractCustomSqlExecution<MyTestMapper, List<TaskResultType>>(MyTestMapper.class) {
public List<TaskResultType> execute(final MyTestMapper customMapper) {
return customMapper.selectTasks();
}
};
List<TaskResultType> results = managementService.executeCustomSql(customSqlExecution);
-Swamy.