com.objectplanet.survey.plugin.api
Class SequenceManager

java.lang.Object
  extended by com.objectplanet.survey.plugin.api.SequenceManager

public class SequenceManager
extends java.lang.Object

Encapsulates functionality to manage sequences in the database

Author:
Rikard Halvorsen
Created:
November 11, 2004

Constructor Summary
SequenceManager()
           
 
Method Summary
static long getNextInviteeAttributeId(java.sql.Connection conn)
          Gets the next InviteeAttributeId.
static long getNextPanelistAttributeId(java.sql.Connection conn)
          Gets the next PanelistAttributeId.
static long getNextRespondentAttributeId()
          Gets the next RespondentAttributeId.
static long getNextSurveyAttributeId(User user, long surveyId)
          Gets the next SurveyAttributeId.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceManager

public SequenceManager()
Method Detail

getNextSurveyAttributeId

public static long getNextSurveyAttributeId(User user,
                                            long surveyId)
                                     throws SurveySystemException,
                                            SurveySecurityException,
                                            java.sql.SQLException
Gets the next SurveyAttributeId. A SurveyAttribute is an attribute stored for a survey in the OPS_SurveyAttribute table. Additional attributes for a survey may be added to extend the functionality in Opinio when creating your own plugin.

Parameters:
user - User
conn - The database connection
Returns:
The next SurveyAttributeId
Throws:
SurveySystemException - If an error occurs in the system.
SurveySecurityException - Thrown if the user doesn't have read access to the survey.
java.sql.SQLException

getNextRespondentAttributeId

public static long getNextRespondentAttributeId()
                                         throws java.sql.SQLException
Gets the next RespondentAttributeId. A RespondentAttribute is an attribute stored for a respondent in the OPS_RespondentAttribute table.

Returns:
The next RespondentAttributeId
Throws:
java.sql.SQLException

getNextPanelistAttributeId

public static long getNextPanelistAttributeId(java.sql.Connection conn)
                                       throws java.sql.SQLException
Gets the next PanelistAttributeId. A PanelistAttribute is an attribute stored for a panelist in the OPS_PanelistAttribute table.

Returns:
The next PanelistAttributeId, -1 if id could not be retrieved.
Throws:
java.sql.SQLException

getNextInviteeAttributeId

public static long getNextInviteeAttributeId(java.sql.Connection conn)
                                      throws java.sql.SQLException
Gets the next InviteeAttributeId. A InviteeAttribute is an attribute stored for an invitee in the OPS_InviteeAttribute table.

Returns:
The next InviteeAttributeId, -1 if id could not be retrieved.
Throws:
java.sql.SQLException

Copyright ? ObjectPlanet Inc. All Rights Reserved.

Built on December 20 2016