14 lines
390 B
Java
14 lines
390 B
Java
package eu.eudat.elastic.converter;
|
|
|
|
import eu.eudat.commons.enums.DmpUserRole;
|
|
import org.springframework.core.convert.converter.Converter;
|
|
import org.springframework.data.convert.WritingConverter;
|
|
|
|
@WritingConverter
|
|
public class DmpUserRoleToShortConverter implements Converter<DmpUserRole, Short> {
|
|
@Override
|
|
public Short convert(DmpUserRole source) {
|
|
return source.getValue();
|
|
}
|
|
}
|