sk.stuba.fiit.foo07.genex.dao
Class AnswerDaoDerby
java.lang.Object
sk.stuba.fiit.foo07.genex.dao.BasicDao
sk.stuba.fiit.foo07.genex.dao.AnswerDaoDerby
- All Implemented Interfaces:
- AnswerDao
public class AnswerDaoDerby
- extends BasicDao
- implements AnswerDao
- Author:
- palo
Field Summary |
protected Answer |
a
|
protected java.util.ArrayList<Answer> |
a_list
|
protected java.sql.PreparedStatement |
pst
|
protected java.sql.ResultSet |
rs
|
Fields inherited from class sk.stuba.fiit.foo07.genex.dao.BasicDao |
con |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rs
protected java.sql.ResultSet rs
pst
protected java.sql.PreparedStatement pst
a
protected Answer a
a_list
protected java.util.ArrayList<Answer> a_list
AnswerDaoDerby
public AnswerDaoDerby(java.sql.Connection con)
AnswerDaoDerby
public AnswerDaoDerby()
throws java.lang.Exception
- Throws:
java.lang.Exception
printAnswers
public void printAnswers()
addAnswerToQuestion
public void addAnswerToQuestion(java.lang.Integer questionID,
Answer toAdd)
throws java.sql.SQLException
- Specified by:
addAnswerToQuestion
in interface AnswerDao
- Throws:
java.sql.SQLException
addAnswersToQuestion
public void addAnswersToQuestion(java.lang.Integer questionID,
java.util.ArrayList<Answer> answers)
throws java.sql.SQLException
- Specified by:
addAnswersToQuestion
in interface AnswerDao
- Throws:
java.sql.SQLException
deleteAnswer
public void deleteAnswer(Answer toDelete)
- Specified by:
deleteAnswer
in interface AnswerDao
getAnswerByID
public Answer getAnswerByID(java.lang.Integer answerID)
throws java.sql.SQLException
- Specified by:
getAnswerByID
in interface AnswerDao
- Throws:
java.sql.SQLException
getAnswersByQuestionID
public java.util.ArrayList<Answer> getAnswersByQuestionID(java.lang.Integer questionID)
throws java.sql.SQLException
- Specified by:
getAnswersByQuestionID
in interface AnswerDao
- Throws:
java.sql.SQLException
updateAnswer
public void updateAnswer(Answer toUpdate)
throws java.sql.SQLException
- Specified by:
updateAnswer
in interface AnswerDao
- Throws:
java.sql.SQLException
Copyright © 2008 Faculty of Informatics and Information Technologies, STU Bratislava. All Rights Reserved.