io.rtr.alchemy.example.mappers.UserMapper Maven / Gradle / Ivy
package io.rtr.alchemy.example.mappers;
import io.rtr.alchemy.example.dto.UserDto;
import io.rtr.alchemy.example.identities.User;
import io.rtr.alchemy.mapping.Mapper;
/**
* Maps to and from UserDto to User
*/
public class UserMapper implements Mapper {
@Override
public User fromDto(UserDto source) {
return new User(source.getName());
}
@Override
public UserDto toDto(User source) {
return new UserDto(source.getName());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy