A third-part mapper for spring-jdbc.
groupId | artifactId | version |
---|---|---|
cn.sel | dvw | 0.1 |
Special characters ( @:Annotation ⓒ:Normal Class ⓐ:Abstract Class )
Field Status | Corresponding Column Name |
---|---|
Annotated with @MProperty | Annotated Name: @MProperty#db_col_name() |
Not Annotated / Null / Empty | Field Name |
If the entities' names are as same as their corresponding db column names, then the annotations are redundant.
- ⓐObjectRowMapper
ObjectRowMapper mapper = new ObjectRowMapper<User>()
{
@Override
public void extend(User user)
{
// Do sth. as needed.
return user; // This modified instance is the actual result.
}
};
List<User> list = jdbcTemplate.query(sql, mapper, args...);
- ⓒSimpleObjectRowMapper
List<User> list = jdbcTemplate.query(sql, new SimpleObjectRowMapper<User>(User.class), args...);
See details in the src code :p
✉ sel8616@gmail.com || philshang@163.com
Ⓠ 117764756