cmu.survey.editor.data.sql
Class QuestionDataBitSetSQL
java.lang.Object
cmu.survey.editor.data.table.QuestionDataBitSetTable
cmu.survey.editor.data.sql.QuestionDataBitSetSQL
- All Implemented Interfaces:
- DataBitSet, QuestionDataBitSet, HasID, Copyable, Moveable, Referenceable
public class QuestionDataBitSetSQL
- extends QuestionDataBitSetTable
- implements Copyable, Moveable, Referenceable
Fields inherited from class cmu.survey.editor.data.table.QuestionDataBitSetTable |
backgroundColor, cacheRandomizeInnerOrder, debug, endQuestion, helpText, numberOfChoices, pageIDInsideThis, pageInsideThis, questionID, questionIDForChoicesTable, randomizeInnerOrder, singleQuestionFlag, sourceOfChoices, startQuestion, type |
Constructor Summary |
QuestionDataBitSetSQL(DataBitStorageSQL sqlLoader,
IntegerDataBit questionID,
StringDataBit startQuestion,
StringDataBit endQuestion,
StringDataBit helpText,
StringDataBit type,
StringDataBit backgroundColor,
IntegerDataBit questionIDForChoicesTable,
StringDataBit sourceOfChoices,
IntegerDataBit numberOfChoices,
IntegerDataBit pageIDInsideThis,
IntegerDataBit singleQuestionFlag,
IntegerDataBit randomizeInnerOrder,
IntegerDataBit cacheRandomizeInnerOrder)
|
Methods inherited from class cmu.survey.editor.data.table.QuestionDataBitSetTable |
getBackgroundColor, getCacheRandomizeInnerOrder, getChoicesNumber, getChoicesType, getEndQuestion, getHelpText, getID, getPageIDInsideThis, getPageInsideThis, getPageInsideThisIfLoaded, getQuestionID, getRandomizeInnerOrder, getSavesToDatabase, getSingleQuestionFlag, getStartQuestion, getType, getVectorOfDataBits, hasBeenModified, hasBeenModifiedInDatabaseTable, hasBeenModifiedWithoutChoicesOrAuxOptions, isNew, modifiedBit, save, savePageIfNecessary, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
QuestionDataBitSetSQL
public QuestionDataBitSetSQL(DataBitStorageSQL sqlLoader,
IntegerDataBit questionID,
StringDataBit startQuestion,
StringDataBit endQuestion,
StringDataBit helpText,
StringDataBit type,
StringDataBit backgroundColor,
IntegerDataBit questionIDForChoicesTable,
StringDataBit sourceOfChoices,
IntegerDataBit numberOfChoices,
IntegerDataBit pageIDInsideThis,
IntegerDataBit singleQuestionFlag,
IntegerDataBit randomizeInnerOrder,
IntegerDataBit cacheRandomizeInnerOrder)
saveAuxOptions
protected boolean saveAuxOptions()
- Specified by:
saveAuxOptions
in class QuestionDataBitSetTable
saveChoicesAndAuxOptions
protected Pair<java.lang.Boolean,java.lang.Boolean> saveChoicesAndAuxOptions(PageSQL p)
- Specified by:
saveChoicesAndAuxOptions
in class QuestionDataBitSetTable
hasAuxOptionsBeenModified
public boolean hasAuxOptionsBeenModified()
- Specified by:
hasAuxOptionsBeenModified
in class QuestionDataBitSetTable
getAuxillaryQuestionPartSet
protected AuxillaryQuestionPartSetTable getAuxillaryQuestionPartSet()
- Specified by:
getAuxillaryQuestionPartSet
in class QuestionDataBitSetTable
getChoices
public ChoicesDataBitSet getChoices()
- Specified by:
getChoices
in interface QuestionDataBitSet
- Returns:
- the choices this question has, if it has choices at all. If this question type does not have choices, this returns null.
getVariable
public VariableDataBitSet getVariable()
- Specified by:
getVariable
in interface QuestionDataBitSet
hasError
public boolean hasError(StringDataBit answersTable)
- Specified by:
hasError
in interface QuestionDataBitSet
getErrorDescription
public java.lang.String getErrorDescription(StringDataBit answersTable)
- Specified by:
getErrorDescription
in interface QuestionDataBitSet
getAuxillaryOptions
protected java.util.Vector<AuxillaryOptionDataBitTable> getAuxillaryOptions()
addNewNonPartAuxillaryOption
protected void addNewNonPartAuxillaryOption(AuxillaryOptionDataBitTable auxOption)
getAuxillaryParts
public AuxillaryQuestionPartSet getAuxillaryParts()
- Description copied from interface:
QuestionDataBitSet
- Gets a AuxillaryQuestionPartSet which has a list of the auxillary question parts. These parts are parts of the question that are used for rendering the question, mostly for Abstract questions.
- Specified by:
getAuxillaryParts
in interface QuestionDataBitSet
- Returns:
getNumQuestionsUsingThisSet
public int getNumQuestionsUsingThisSet()
- Returns:
setNumQuestionsUsingThisSet
public void setNumQuestionsUsingThisSet(int i)
- Parameters:
i
-
copyTo
public QuestionDataBitSetSQL copyTo(PageSQL newParent)
copyTo
public java.lang.Object copyTo(java.lang.Object newParent)
- Description copied from interface:
Copyable
- Make a copy for use in the new parent. If the new parent (i.e. the ReorderableListPanel) implements HasData, it will call this method with that data -- i.e. oldCopy.copyTo(futureParentReorderableListItemPanel.getData());
- Specified by:
copyTo
in interface Copyable
- Returns:
moveTo
public QuestionDataBitSetSQL moveTo(PageSQL newParent)
moveTo
public Moveable moveTo(java.lang.Object newParent)
- Description copied from interface:
Moveable
- Move to the new parent. If the new parent (i.e. the ReorderableListPanel) implements HasData, it will call this method with that data -- i.e. objectToMove.moveTo(futureParentReorderableListItemPanel.getData());
- Specified by:
moveTo
in interface Moveable
- Returns:
canReferenceIn
public boolean canReferenceIn(java.lang.Object newParent)
- Specified by:
canReferenceIn
in interface Referenceable
getVariableStubIfExists
protected VariableDataBitSetTableStub getVariableStubIfExists()
- Description copied from class:
QuestionDataBitSetTable
- This will get
- Specified by:
getVariableStubIfExists
in class QuestionDataBitSetTable