Indicates a parameter that receives a result set fetched by stored functions or stored
procedures.
The annotated parameter type must be List and it must be one of parameters of the
method that is annotated with Function or Procedure.
@Dao
public interface EmployeeDao {
@Procedure
void fetchEmployees(@In Integer departmentId, @ResultSet List<Employee> employees);
}
EmployeeDao dao = new EmployeeDaoImpl(config);
List<Employee> employees = new ArrayList<Employee>();
dao.fetchEmployees(10, employees);
for (Employee e : employees) {
...
}
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether to ensure that all entity properties are mapped to columns of a result set.
-
Element Details
-
ensureResultMapping
boolean ensureResultMappingWhether to ensure that all entity properties are mapped to columns of a result set.This value is used only if the result set is fetched as an entity or a entity list.
If
trueand there are some unmapped properties,ResultMappingExceptionis thrown from the annotated method.- Returns:
- whether to ensure that all entity properties are mapped to columns of a result set
- Default:
- false
-