@Component public class SequenceManagerImpl extends java.lang.Object implements SequenceManager
Constructor and Description |
---|
SequenceManagerImpl() |
Modifier and Type | Method and Description |
---|---|
int |
countMistakesByProblemId(int problemId)
Return the number of times that the problem is answered incorrectly
|
java.util.List<AnswerRow> |
findAllAnswersByProblemId(int problemId)
Return a list of all answer objects for a problem
|
java.util.List<java.lang.Integer> |
findAllAssistmentsIdsByHeadSectionId(int headSectionId)
Re turn a list of all the assistment under a head section
|
java.util.List<HintRow> |
findAllHintsByTutorStrategyId(int tutorStrategyId)
Return a list of hint objects for a tutor strategy
|
java.util.List<ProblemRow> |
findAllScaffoldingProblemsByScaffoldId(int scaffoldId)
Return a list of problem (problemdata in sdk) object that is linked under a scaffold
|
java.util.List<TutorStrategy> |
findAllTutorStrategiesByProblemId(int problemId)
Return a list of tutor strategy objects for a problem
|
Assistment |
findAssistmentByAssistmentId(int astId)
Return an assistment object for the given assistment id
|
int |
findAssistmentIdByProblemId(int problemId)
Return the assistment id for a problem id
|
AssistmentInfo |
findAssistmentInfoByAssistmentId(int astId)
Return an assistment info object for a given assistment id
|
Section |
findHeadSectionBySequenceId(int sequenceId)
Returns head section object for a sequence
|
ProblemRow |
findProblemByAssistmentId(int assistmentId)
Return a problem (problemdata in sdk) object for an assistment
|
Scaffold |
findScaffoldByTutorStrategyId(int tutorStrategyId)
Return a list of scaffold objects for a tutor strategy
|
Sequence |
findSequenceBySequenceId(int sequenceId)
Returns an sequence object for a given sequence id
|
void |
linkSequenceWithHeadSection(int sequenceId,
int headSectionId)
Link the head section with the sequence
|
public Sequence findSequenceBySequenceId(int sequenceId) throws NotFoundException
SequenceManager
findSequenceBySequenceId
in interface SequenceManager
sequenceId
- the database Id of a sequenceNotFoundException
- if the id doesn't existpublic Section findHeadSectionBySequenceId(int sequenceId) throws NotFoundException
SequenceManager
findHeadSectionBySequenceId
in interface SequenceManager
sequenceId
- the database id of a sequenceNotFoundException
- if the sequence id doesn't existpublic ProblemRow findProblemByAssistmentId(int assistmentId) throws NotFoundException
SequenceManager
findProblemByAssistmentId
in interface SequenceManager
assistmentId
- the assistment idNotFoundException
- if the problem doesn't existpublic java.util.List<java.lang.Integer> findAllAssistmentsIdsByHeadSectionId(int headSectionId) throws NotFoundException
SequenceManager
findAllAssistmentsIdsByHeadSectionId
in interface SequenceManager
headSectionId
- the id of the head sectionNotFoundException
- if the head section id doesn't existpublic int countMistakesByProblemId(int problemId) throws NotFoundException
SequenceManager
countMistakesByProblemId
in interface SequenceManager
problemId
- the id of the problemNotFoundException
- if the problem id doesn't existpublic java.util.List<AnswerRow> findAllAnswersByProblemId(int problemId) throws NotFoundException
SequenceManager
findAllAnswersByProblemId
in interface SequenceManager
problemId
- the id of the problemNotFoundException
- id the problem id doesn't existpublic void linkSequenceWithHeadSection(int sequenceId, int headSectionId) throws NotFoundException
SequenceManager
linkSequenceWithHeadSection
in interface SequenceManager
sequenceId
- the id of the sequenceheadSectionId
- the id of the head sectionNotFoundException
- if the sequence doesn't existpublic java.util.List<ProblemRow> findAllScaffoldingProblemsByScaffoldId(int scaffoldId) throws NotFoundException
SequenceManager
findAllScaffoldingProblemsByScaffoldId
in interface SequenceManager
scaffoldId
- the scaffold idNotFoundException
- if the scaffold doesn't exist or there is no problem linked to the scaffold (should not happen)public int findAssistmentIdByProblemId(int problemId) throws NotFoundException
SequenceManager
findAssistmentIdByProblemId
in interface SequenceManager
problemId
- the problem idNotFoundException
- if the problem doesn't existpublic Assistment findAssistmentByAssistmentId(int astId) throws NotFoundException
SequenceManager
findAssistmentByAssistmentId
in interface SequenceManager
astId
- the assistment idNotFoundException
- if the assistment doesn't existpublic AssistmentInfo findAssistmentInfoByAssistmentId(int astId) throws NotFoundException
SequenceManager
findAssistmentInfoByAssistmentId
in interface SequenceManager
astId
- the assistment idNotFoundException
- if the assistment info doesn't existpublic java.util.List<TutorStrategy> findAllTutorStrategiesByProblemId(int problemId) throws NotFoundException
SequenceManager
findAllTutorStrategiesByProblemId
in interface SequenceManager
problemId
- the problem idNotFoundException
- if there is no tutor strategy for the problempublic java.util.List<HintRow> findAllHintsByTutorStrategyId(int tutorStrategyId) throws NotFoundException
SequenceManager
findAllHintsByTutorStrategyId
in interface SequenceManager
tutorStrategyId
- the tutor strategy idNotFoundException
- if there is no hint for the tutor strategypublic Scaffold findScaffoldByTutorStrategyId(int tutorStrategyId) throws NotFoundException
SequenceManager
findScaffoldByTutorStrategyId
in interface SequenceManager
tutorStrategyId
- the tutor strategy idNotFoundException
- if there is no scaffold for the tutor strategy