|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DBInterface
Method Summary | |
---|---|
User |
authenticateUser(java.lang.String username,
java.lang.String password)
Tries to authenticate a user against the database. |
FullQuestionInfo |
getQuestion(int id)
Returns all information on the question with the supplied id |
java.util.List<FullQuestionInfo> |
getQuestionList()
Returns a list of all available questions. |
Quiz |
getQuiz(int id)
Returns the quiz with the given ID from the database |
java.util.ArrayList<QuizInfo> |
getQuizList()
Returns a list of all available quizzes |
User |
getUser(int id)
Returns a user from the database with the supplied ID. |
int |
saveQuiz(FullQuizInfo fqi,
User user)
Saves a quiz to the database |
Method Detail |
---|
java.util.ArrayList<QuizInfo> getQuizList()
User authenticateUser(java.lang.String username, java.lang.String password)
username
- Username sent to the database.password
- Password sent to the database.
User getUser(int id)
id
- ID of the user to retrieve
Quiz getQuiz(int id)
id
- ID of the quiz
java.util.List<FullQuestionInfo> getQuestionList()
FullQuestionInfo getQuestion(int id)
id
- ID of the question to retrieve
int saveQuiz(FullQuizInfo fqi, User user)
fqi
- All information of the quiz to be saved. If the ID of a quiz is 0
the quiz will be created. If any questions have the ID 0 they will be created and
answers of this question should be give ID's of 0-n and correctAnswer should point
to one of these IDs.user
- The user trying to save the quiz. If this is not done by a logged in user
this can be null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |