Enum Class Permissions

java.lang.Object
java.lang.Enum<Permissions>
io.github.coho04.mysql.entities.enums.Permissions
All Implemented Interfaces:
Serializable, Comparable<Permissions>, Constable

public enum Permissions extends Enum<Permissions>
Represents different permissions that can be assigned to a user or database.
  • Enum Constant Details

    • ALL

      public static final Permissions ALL
      Represents the permission for all operations. The variable is a constant of the Permissions enum class and has a value of 0. It represents the permission that grants all operations to a user or database. Use this permission to assign all available permissions to a user or database. Example usage: Permissions allPermission = Permissions.ALL; int permissionValue = allPermission.getValue();
    • DELETE

      public static final Permissions DELETE
    • INSERT

      public static final Permissions INSERT
      Represents the permission for inserting data into a database. The INSERT variable is a constant of the Permissions enum class and has a value of 2. It represents the permission that allows a user or database to insert data into tables. Example usage: Permissions insertPermission = Permissions.INSERT; int permissionValue = insertPermission.getValue();
    • REFERENCES

      public static final Permissions REFERENCES
    • SELECT

      public static final Permissions SELECT
      The SELECT variable represents the permission for querying or retrieving data from a database. The SELECT variable is a constant of the Permissions enum class and has a value of 4. It represents the permission that allows a user or database to execute SELECT statements on tables and views, retrieving data from specific columns or all columns. Example usage: Permissions selectPermission = Permissions.SELECT; int permissionValue = selectPermission.getValue();
    • TRIGGER

      public static final Permissions TRIGGER
      Represents the permission for creating and managing triggers in a database. The TRIGGER variable is a constant of the Permissions enum class and
    • UPDATE

      public static final Permissions UPDATE
      Represents the permission for updating data in a database. The UPDATE variable is a constant of the Permissions enum class and has a value of 6. It represents the permission that allows a user or database to execute UPDATE statements on tables, modifying data. Example usage: Permissions updatePermission = Permissions.UPDATE; int permissionValue = updatePermission.getValue();
    • EXECUTE

      public static final Permissions EXECUTE
      Represents the permission for executing a procedure or function in a database. The EXECUTE variable is a constant of the Permissions enum class and has a value of 7. It represents the permission that allows a user or database to execute stored procedures or functions. This permission enables the user or database to invoke pre-defined logic in the database. Example usage: Permissions executePermission = Permissions.EXECUTE; int permissionValue = executePermission.getValue();
  • Method Details

    • values

      public static Permissions[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Permissions valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public int getValue()
      Retrieves the value of a permission.
      Returns:
      The value of the permission.