org.molgenis.data.security.auth.PasswordResetToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of molgenis-data-security Show documentation
Show all versions of molgenis-data-security Show documentation
Security data model and data layer security.
package org.molgenis.data.security.auth;
import static org.molgenis.data.security.auth.PasswordResetTokenMetadata.EXPIRATION_DATE;
import static org.molgenis.data.security.auth.PasswordResetTokenMetadata.ID;
import static org.molgenis.data.security.auth.PasswordResetTokenMetadata.TOKEN;
import static org.molgenis.data.security.auth.PasswordResetTokenMetadata.USER;
import java.time.Instant;
import org.molgenis.data.Entity;
import org.molgenis.data.meta.model.EntityType;
import org.molgenis.data.support.StaticEntity;
@SuppressWarnings("unused")
public class PasswordResetToken extends StaticEntity {
public PasswordResetToken(Entity entity) {
super(entity);
}
public PasswordResetToken(EntityType entityType) {
super(entityType);
}
public PasswordResetToken(String id, EntityType entityType) {
super(entityType);
setId(id);
}
public String getId() {
return getString(ID);
}
public void setId(String id) {
set(ID, id);
}
public User getUser() {
return getEntity(USER, User.class);
}
public void setUser(User user) {
set(USER, user);
}
public String getToken() {
return getString(TOKEN);
}
public void setToken(String token) {
set(TOKEN, token);
}
public Instant getExpirationDate() {
return getInstant(EXPIRATION_DATE);
}
public void setExpirationDate(Instant expirationDate) {
set(EXPIRATION_DATE, expirationDate);
}
}