@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
SequenceManagerfindSequenceBySequenceId in interface SequenceManagersequenceId - the database Id of a sequenceNotFoundException - if the id doesn't existpublic Section findHeadSectionBySequenceId(int sequenceId) throws NotFoundException
SequenceManagerfindHeadSectionBySequenceId in interface SequenceManagersequenceId - the database id of a sequenceNotFoundException - if the sequence id doesn't existpublic ProblemRow findProblemByAssistmentId(int assistmentId) throws NotFoundException
SequenceManagerfindProblemByAssistmentId in interface SequenceManagerassistmentId - the assistment idNotFoundException - if the problem doesn't existpublic java.util.List<java.lang.Integer> findAllAssistmentsIdsByHeadSectionId(int headSectionId)
throws NotFoundException
SequenceManagerfindAllAssistmentsIdsByHeadSectionId in interface SequenceManagerheadSectionId - the id of the head sectionNotFoundException - if the head section id doesn't existpublic int countMistakesByProblemId(int problemId)
throws NotFoundException
SequenceManagercountMistakesByProblemId in interface SequenceManagerproblemId - the id of the problemNotFoundException - if the problem id doesn't existpublic java.util.List<AnswerRow> findAllAnswersByProblemId(int problemId) throws NotFoundException
SequenceManagerfindAllAnswersByProblemId in interface SequenceManagerproblemId - the id of the problemNotFoundException - id the problem id doesn't existpublic void linkSequenceWithHeadSection(int sequenceId,
int headSectionId)
throws NotFoundException
SequenceManagerlinkSequenceWithHeadSection in interface SequenceManagersequenceId - 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
SequenceManagerfindAllScaffoldingProblemsByScaffoldId in interface SequenceManagerscaffoldId - 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
SequenceManagerfindAssistmentIdByProblemId in interface SequenceManagerproblemId - the problem idNotFoundException - if the problem doesn't existpublic Assistment findAssistmentByAssistmentId(int astId) throws NotFoundException
SequenceManagerfindAssistmentByAssistmentId in interface SequenceManagerastId - the assistment idNotFoundException - if the assistment doesn't existpublic AssistmentInfo findAssistmentInfoByAssistmentId(int astId) throws NotFoundException
SequenceManagerfindAssistmentInfoByAssistmentId in interface SequenceManagerastId - the assistment idNotFoundException - if the assistment info doesn't existpublic java.util.List<TutorStrategy> findAllTutorStrategiesByProblemId(int problemId) throws NotFoundException
SequenceManagerfindAllTutorStrategiesByProblemId in interface SequenceManagerproblemId - the problem idNotFoundException - if there is no tutor strategy for the problempublic java.util.List<HintRow> findAllHintsByTutorStrategyId(int tutorStrategyId) throws NotFoundException
SequenceManagerfindAllHintsByTutorStrategyId in interface SequenceManagertutorStrategyId - the tutor strategy idNotFoundException - if there is no hint for the tutor strategypublic Scaffold findScaffoldByTutorStrategyId(int tutorStrategyId) throws NotFoundException
SequenceManagerfindScaffoldByTutorStrategyId in interface SequenceManagertutorStrategyId - the tutor strategy idNotFoundException - if there is no scaffold for the tutor strategy