Package org.apache.ibatis.annotations
Annotation Interface ResultType
This annotation can be used when a @Select method is using a ResultHandler. Those methods must have void return type,
so this annotation can be used to tell MyBatis what kind of object it should build for each row.
How to use:
public interface UserMapper { @ResultType(User.class) @Select("SELECT id, name FROM users WHERE name LIKE #{name} || '%' ORDER BY id") void collectByStartingWithName(String name, ResultHandler<User> handler); }
- Since:
- 3.2.0
- Author:
- Jeff Butler
-
Required Element Summary
-
Element Details
-
value
Class<?> valueReturns the return type.- Returns:
- the return type
-