All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.rtr.alchemy.example.mappers.UserMapper Maven / Gradle / Ivy

There is a newer version: 2.2.16
Show newest version
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