- Type Parameters:
T- The entity type this repository managesI- The type of the entity's identifier
- All Known Implementing Classes:
AbstractRepository,ConfigValueRepository,MemberRepository,PointsRepository,TaskAssignmentRepository,TaskRepository
public interface BaseRepository<T,I>
Defines core data access operations for entity persistence.
Provides standard CRUD methods that all repositories must implement.
-
Method Summary
-
Method Details
-
findById
Finds an entity by its identifier.- Parameters:
id- The entity identifier- Returns:
- An Optional containing the found entity or empty if not found
-
findAll
Retrieves all entities of the managed type.- Returns:
- A list of all entities
-
save
Persists an entity to the database. Creates a new record if the entity has no ID, otherwise updates the existing record.- Parameters:
entity- The entity to save- Returns:
- The saved entity with any database-generated values (like ID) populated
-
deleteById
Removes an entity from the database.- Parameters:
id- The identifier of the entity to delete
-