@Target(value=PARAMETER)
@Retention(value=RUNTIME)
public @interface ResultSet
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) {
...
}
| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
ensureResultMapping
Whether to ensure that all entity properties are mapped to columns of a result set.
|
public abstract boolean ensureResultMapping
This value is used only if the result set is fetched as an entity or a entity list.
If true and there are some unmapped properties、 ResultMappingException is
thrown from the annotated method.