Interface CloseEndedAnswerRepository
- All Known Implementing Classes:
CloseEndedAnswerRepositoryImpl
public interface CloseEndedAnswerRepository
Interface for CloseEndedAnswerRepository.
- Version:
- 0.4.1
- Author:
- Davide Costantini
-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(CloseEndedAnswer closeEndedAnswer) Inserts an instance of CloseEndedAnswer in the databaseget(int id) Finds the CloseEndedAnswer identified byidin the database.voidmodify(CloseEndedAnswer closeEndedAnswer) Updates a CloseEndedAnswer in the database using a new instance of CloseEndedAnswer.voidremove(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 byidin 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 byidhas 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 byidhas been found
-
modify
Updates a CloseEndedAnswer in the database using a new instance of CloseEndedAnswer.- Parameters:
closeEndedAnswer- the new instance of CloseEndedAnswer
-