Class Admin


public class Admin extends Staff
Represents an administrator user in the system | Représente un utilisateur administrateur dans le système.
Author:
FIGUEIRAS Jossua
  • Constructor Details

    • Admin

      public Admin(int id, String name, String firstname, String hash, String username, boolean available)
      Creates an Admin instance using explicit values | Crée une instance Admin à partir de valeurs explicites.
      Parameters:
      id - the unique identifier of the admin | l'identifiant unique de l'administrateur
      name - the last name of the admin | le nom de famille de l'administrateur
      firstname - the first name of the admin | le prénom de l'administrateur
      hash - the hashed password | le mot de passe chiffré
      username - the login username | le nom d'utilisateur
      available - indicates if the admin account is active | indique si le compte administrateur est actif
    • Admin

      public Admin(ResultSet sqlResult)
      Creates an Admin instance from a SQL result set | Crée une instance Admin à partir d'un résultat SQL.
      Parameters:
      sqlResult - the SQL result set containing admin data | le résultat SQL contenant les données de l'administrateur
  • Method Details

    • getAdminById

      public static Admin getAdminById(int id)
      Retrieves an Admin by its unique identifier | Récupère un administrateur à partir de son identifiant unique.
      Parameters:
      id - the ID of the admin to retrieve | l'identifiant de l'administrateur à récupérer
      Returns:
      the Admin instance if found and valid or null if the staff member is not an admin| l'instance Admin si elle est trouvée et valide, ou null si le membre du personnel n'est pas un administrateur