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 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

Copyright © ObjectPlanet Inc. All Rights Reserved.

Built on April 12 2012