Class SqlAuthDataDao
java.lang.Object
tk.airshipcraft.commonlib.db.dao.impl.SqlAuthDataDao
- All Implemented Interfaces:
AuthDataDao
,GenericDao<AuthData,
UUID>
SQL implementation of the AuthDataDao interface.
This class is responsible for performing CRUD operations on AuthData entities in the database.
- Since:
- 2024-01-05
- Version:
- 1.0.0
- Author:
- notzune
-
Constructor Summary
ConstructorsConstructorDescriptionSqlAuthDataDao
(SqlConnectionManager connectionManager) Constructs an instance of SqlAuthDataDao with a given SqlConnectionManager. -
Method Summary
Modifier and TypeMethodDescriptionCreates a new AuthData record.void
deleteById
(UUID id) Deletes an existing AuthData record by its ID.findAll()
Finds all AuthData records.Finds an AuthData record by its ID.Updates an existing AuthData record.
-
Constructor Details
-
SqlAuthDataDao
Constructs an instance of SqlAuthDataDao with a given SqlConnectionManager.- Parameters:
connectionManager
- The connection manager responsible for managing database connections.
-
-
Method Details
-
findById
Finds an AuthData record by its ID.- Specified by:
findById
in interfaceGenericDao<AuthData,
UUID> - Parameters:
id
- the entity's identifier.- Returns:
- An
Optional<AuthData>
containing the AuthData if found, otherwise empty.
-
findAll
Finds all AuthData records.- Specified by:
findAll
in interfaceGenericDao<AuthData,
UUID> - Returns:
- A list of all AuthData records.
-
create
Creates a new AuthData record.- Specified by:
create
in interfaceAuthDataDao
- Specified by:
create
in interfaceGenericDao<AuthData,
UUID> - Parameters:
authData
- The AuthData object to create.- Returns:
- The created AuthData object.
-
update
Updates an existing AuthData record.- Specified by:
update
in interfaceAuthDataDao
- Specified by:
update
in interfaceGenericDao<AuthData,
UUID> - Parameters:
authData
- The AuthData object to update.- Returns:
- The updated AuthData object.
-
deleteById
Deletes an existing AuthData record by its ID.- Specified by:
deleteById
in interfaceAuthDataDao
- Specified by:
deleteById
in interfaceGenericDao<AuthData,
UUID> - Parameters:
id
- The ID of the AuthData record to delete.
-