public class SurveyAnswerDao extends org.ametys.runtime.plugins.core.sqlmap.dao.AbstractDAO implements ThreadSafe, Component
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ROLE
The Avalon role name.
|
| Constructor and Description |
|---|
SurveyAnswerDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSession(SurveySession session)
Insert a session with its answers.
|
void |
deleteSession(java.lang.String sessionId)
Delete a session with its answers.
|
void |
deleteSessions(java.lang.String surveyId)
Delete sessions related to a given survey.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
getAllSessionCount()
Get the session count list.
|
java.util.List<SurveyAnswer> |
getAnswers(int sessionId)
Get the answers of a session.
|
SurveySession |
getSession(int sessionId)
Get a session from its ID.
|
SurveySession |
getSession(java.lang.String surveyId,
java.lang.String login)
Get a user session from the survey ID and the user login.
|
int |
getSessionCount(java.lang.String surveyId)
Get the count of sessions for a given survey.
|
java.util.List<SurveySession> |
getSessions()
Get the exhaustive list of sessions.
|
java.util.List<SurveySession> |
getSessions(java.lang.String surveyId)
Get all the sessions of a given survey.
|
java.util.List<SurveySession> |
getSessionsWithAnswers(java.lang.String surveyId)
Get all the sessions of a given survey, with their answers.
|
SurveySession |
getSessionWithAnswers(int sessionId)
Get a session from its ID.
|
protected java.lang.String |
getStatementSuffix(java.sql.Connection connection)
Get the statement name suffix, depending of the DBMS family.
|
public SurveySession getSession(int sessionId) throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
sessionId - the session ID.org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public SurveySession getSession(java.lang.String surveyId, java.lang.String login) throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
surveyId - the survey ID.login - the user login.org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public SurveySession getSessionWithAnswers(int sessionId) throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
sessionId - the session ID.org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public int getSessionCount(java.lang.String surveyId)
throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
surveyId - the survey ID.org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getAllSessionCount()
throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public java.util.List<SurveySession> getSessions() throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public java.util.List<SurveySession> getSessions(java.lang.String surveyId) throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
surveyId - the survey ID.org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public java.util.List<SurveySession> getSessionsWithAnswers(java.lang.String surveyId) throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
surveyId - the survey ID.org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public java.util.List<SurveyAnswer> getAnswers(int sessionId) throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
sessionId - the session ID.org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public void addSession(SurveySession session) throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
session - the session.org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public void deleteSession(java.lang.String sessionId)
throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
sessionId - the session ID.org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.public void deleteSessions(java.lang.String surveyId)
throws org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException
surveyId - the survey ID.org.ametys.runtime.plugins.core.sqlmap.dao.DataAccessException - if an error occurs.protected java.lang.String getStatementSuffix(java.sql.Connection connection)
connection - the connection.Copyright © 2010 Anyware Services. All Rights Reserved.