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.voiddeleteById(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:
findByIdin 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:
findAllin interfaceGenericDao<AuthData,UUID> - Returns:
- A list of all AuthData records.
-
create
Creates a new AuthData record.- Specified by:
createin interfaceAuthDataDao- Specified by:
createin interfaceGenericDao<AuthData,UUID> - Parameters:
authData- The AuthData object to create.- Returns:
- The created AuthData object.
-
update
Updates an existing AuthData record.- Specified by:
updatein interfaceAuthDataDao- Specified by:
updatein 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:
deleteByIdin interfaceAuthDataDao- Specified by:
deleteByIdin interfaceGenericDao<AuthData,UUID> - Parameters:
id- The ID of the AuthData record to delete.
-