2020-04-01 17:16:06 +02:00
|
|
|
package eu.eudat.logic.mapper.elastic;
|
|
|
|
|
|
|
|
import eu.eudat.data.entities.UserInfo;
|
|
|
|
import eu.eudat.elastic.entities.Collaborator;
|
|
|
|
|
|
|
|
public class CollaboratorMapper {
|
|
|
|
|
2021-06-29 10:45:20 +02:00
|
|
|
public static Collaborator toElastic(UserInfo user, Integer role) {
|
2020-04-01 17:16:06 +02:00
|
|
|
Collaborator elastic = new Collaborator();
|
|
|
|
elastic.setId(user.getId().toString());
|
|
|
|
elastic.setName(user.getName());
|
2021-06-29 10:45:20 +02:00
|
|
|
elastic.setRole(role);
|
2020-04-01 17:16:06 +02:00
|
|
|
return elastic;
|
|
|
|
}
|
|
|
|
}
|