Exemple #1
0
 public static Builder fromUser(final User in) {
   return User.builder(in.context, in.enterprise, in.role)
       .active(in.isActive())
       .authType(in.getAuthType())
       .description(in.getDescription())
       .email(in.getEmail())
       .locale(in.getLocale())
       .name(in.getName(), in.getSurname())
       .nick(in.getNick())
       .password(in.getPassword());
 }
Exemple #2
0
    public User build() {
      UserDto dto = new UserDto();
      dto.setActive(active);
      dto.setAuthType(authType);
      dto.setDescription(description);
      dto.setEmail(email);
      dto.setLocale(locale);
      dto.setName(name);
      dto.setNick(nick);
      dto.setPassword(password);
      dto.setSurname(surname);
      User user = new User(context, dto);
      user.enterprise = enterprise;
      user.role = role;

      return user;
    }