Interface TaskRepository
- All Known Implementing Classes:
InMemoryTaskRepository
public interface TaskRepository
Output port for task persistence.
This is the interface that use cases depend on. Implementations (adapters) provide the actual storage mechanism.
-
Method Summary
-
Method Details
-
save
Save a task (create or update).- Parameters:
task- The task to save- Returns:
- The saved task
-
findById
Find a task by ID.- Parameters:
id- The task ID- Returns:
- The task if found
-
findAll
Find all tasks.- Returns:
- List of all tasks
-
delete
Delete a task by ID.- Parameters:
id- The task ID- Returns:
- true if deleted, false if not found
-
exists
Check if a task exists.- Parameters:
id- The task ID- Returns:
- true if exists
-