例如:
.all
答案 0 :(得分:0)
RecordMapper
可以很容易地实现,如下所示:
fetch().map(record -> {
SysResources result = new SysResources();
result.setRoleId(record.get(SYS_ROLE_RESOURCS.ROLE_ID));
result.setResourcesId(record.get(SYS_ROLE_RESOURCS.RESOURCES_ID));
result.setPerms(record.get(SYS_ROLE_RESOURCS.PERMS));
return result;
});
fetch().map(new RecordMapper<Record, SysResources>() {
@Override
public SysResources map(Record record) {
SysResources result = new SysResources();
result.setRoleId(record.get(SYS_ROLE_RESOURCS.ROLE_ID));
result.setResourcesId(record.get(SYS_ROLE_RESOURCS.RESOURCES_ID));
result.setPerms(record.get(SYS_ROLE_RESOURCS.PERMS));
return result;
}
});