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

org.molgenis.data.security.auth.PasswordResetToken Maven / Gradle / Ivy

There is a newer version: 8.4.5
Show newest version
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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy