add method to get a user entity by name
This commit is contained in:
parent
d399c86e66
commit
efa6c246a3
1 changed files with 6 additions and 0 deletions
|
@ -67,6 +67,12 @@ public class UserService {
|
|||
});
|
||||
}
|
||||
|
||||
public OptionalEntity<User> getUserByName(final String username) {
|
||||
return userBhv.selectEntity(cb -> {
|
||||
cb.query().setName_Equal(username);
|
||||
});
|
||||
}
|
||||
|
||||
public void store(final User user) {
|
||||
if (StringUtil.isBlank(user.getSurname())) {
|
||||
user.setSurname(user.getName());
|
||||
|
|
Loading…
Add table
Reference in a new issue