
br.com.jhonsapp.finaluser.domain.AbstractPersonUser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of final-user Show documentation
Show all versions of final-user Show documentation
A bunch of classes that help developers building login and authentication.
The newest version!
package br.com.jhonsapp.finaluser.domain;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import br.com.jhonsapp.bootstrap.object.domain.generic.AbstractDomainObject;
import br.com.jhonsapp.util.code.SimpleCodeGenerator;
/**
* {@link AbstractPersonUser} is a subclass of {@link AbstractDomainObject} and an
* abstract implementation of {@link User}
*
* @see AbstractDomainObject
* @see User
*
* @author Jhonathan Camacho
* @author Jhonys Camacho
*
*/
@MappedSuperclass
public abstract class AbstractPersonUser extends AbstractDomainObject implements PersonUser {
/**
* Generated serial version id created at 21 April 2017.
*/
private static final long serialVersionUID = 3307423139550627963L;
@Column(name = "reset_password_code")
private String resetPasswordCode;
public AbstractPersonUser() {
super();
}
@Override
public String getResetPasswordCode() {
if (isResetPasswordCodeEmpty())
resetPasswordCode = SimpleCodeGenerator.generateCode(6);
return resetPasswordCode;
}
@Override
public boolean isResetPasswordCodeEmpty() {
return resetPasswordCode == null || resetPasswordCode.isEmpty();
}
@Override
public void clearResetPasswordCode() {
resetPasswordCode = "";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy