Enum Class Permissions
- All Implemented Interfaces:
Serializable
,Comparable<Permissions>
,Constable
Represents different permissions that can be assigned to a user or database.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionRepresents the permission for all operations.Represents the permission for executing a procedure or function in a database.Represents the permission for inserting data into a database.The SELECT variable represents the permission for querying or retrieving data from a database.Represents the permission for creating and managing triggers in a database.Represents the permission for updating data in a database. -
Method Summary
Modifier and TypeMethodDescriptionint
getValue()
Retrieves the value of a permission.static Permissions
Returns the enum constant of this class with the specified name.static Permissions[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
-
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
-
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
Represents the permission for creating and managing triggers in a database. The TRIGGER variable is a constant of the Permissions enum class and -
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
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
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
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 nameNullPointerException
- if the argument is null
-
getValue
public int getValue()Retrieves the value of a permission.- Returns:
- The value of the permission.
-