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

io.robe.admin.dto.UserDTO Maven / Gradle / Ivy

There is a newer version: 0.5.0.0-1039
Show newest version
package io.robe.admin.dto;

import io.robe.admin.hibernate.entity.User;

/**
 * DTO class for User Entity. Used for transfer operations and converts role entity to roleOid .
 */
public class UserDTO extends User {

    private String username;
    private String ticket;
    private String newPassword;

    /**
     * Default constructor.
     */
    public UserDTO() {
        super();
    }

    /**
     * Constructor with Entity parameter.
     *
     * @param entity Entity to convert DTO
     */
    public UserDTO(User entity) {
        setOid(entity.getOid());
        setLastUpdated(entity.getLastUpdated());
        setEmail(entity.getEmail());
        setName(entity.getName());
        setSurname(entity.getSurname());
        setPassword(entity.getPassword());
        setActive(entity.isActive());
        setRoleOid(entity.getRoleOid());
    }

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    public String getTicket() {
        return ticket;
    }

    public void setTicket(String ticket) {
        this.ticket = ticket;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy