Interface CloseEndedAnswerRepository
- All Known Implementing Classes:
CloseEndedAnswerRepositoryImpl
public interface CloseEndedAnswerRepository
Interface for CloseEndedAnswerRepository.
- Version:
- 0.4.1
- Author:
- Davide Costantini
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(CloseEndedAnswer closeEndedAnswer) Inserts an instance of CloseEndedAnswer in the databaseget
(int id) Finds the CloseEndedAnswer identified byid
in the database.void
modify
(CloseEndedAnswer closeEndedAnswer) Updates a CloseEndedAnswer in the database using a new instance of CloseEndedAnswer.void
remove
(int id) Deletes from the database the CloseEndedAnswer identified byid
.
-
Method Details
-
add
Inserts an instance of CloseEndedAnswer in the database- Parameters:
closeEndedAnswer
- an instance of CloseEndedAnswer
-
get
Finds the CloseEndedAnswer identified byid
in the database.- Parameters:
id
- the id of the CloseEndedAnswer to be found- Returns:
- an instance of CloseEndedAnswer if there is a close-ended answer identified by
id
- Throws:
NotFoundException
- if no close-ended answer identified byid
has been found
-
remove
Deletes from the database the CloseEndedAnswer identified byid
.- Parameters:
id
- the id of the CloseEndedAnswer to be deleted- Throws:
NotFoundException
- if no close-ended answer identified byid
has been found
-
modify
Updates a CloseEndedAnswer in the database using a new instance of CloseEndedAnswer.- Parameters:
closeEndedAnswer
- the new instance of CloseEndedAnswer
-