cmu.survey.editor.data.sql
Class AuxillaryQuestionPartSQLStub

java.lang.Object
  extended by cmu.survey.editor.data.sql.AuxillaryQuestionPartSQLStub
All Implemented Interfaces:
AuxillaryQuestionPart, Copyable, Moveable

public class AuxillaryQuestionPartSQLStub
extends java.lang.Object
implements AuxillaryQuestionPart, Moveable, Copyable


Field Summary
protected  AuxillaryOptionDataBitTable auxillaryOption
           
 
Constructor Summary
AuxillaryQuestionPartSQLStub(AuxillaryOptionDataBitTable auxillaryOption)
           
 
Method Summary
 AuxillaryQuestionPartSQLStub copyTo(AuxillaryQuestionPartSetSQL newParent)
           
 java.lang.Object copyTo(java.lang.Object newParent)
          Make a copy for use in the new parent.
 ChoicesDataBitSet getChoices()
           
 StringDataBit getFilterType()
           
 IntegerDataBit getOrderIndex()
           
 VariableDataBitSet getSecondVariable()
           
 StringDataBit getTable()
           
 StringDataBit getText()
          Optional, hasText must return true if this returns non-null.
 StringDataBit getType()
          Returns one of the static types to mention what it is -- static types should all be in QuestionsFromDatabaseConstants.
 java.lang.String getTypeFriendlyName()
           
 VariableDataBitSet getVariable()
           
 boolean hasBeenModified()
           
 boolean hasChoices()
           
 boolean hasFilterType()
           
 boolean hasSecondVariable()
          The second variable.
 boolean hasTable()
           
 boolean hasText()
           
 boolean hasVariable()
          True if this type has a variable.
 boolean isNew()
           
 AuxillaryQuestionPartSQLStub moveTo(AuxillaryQuestionPartSetSQL newParent)
           
 Moveable moveTo(java.lang.Object newParent)
          Move to the new parent.
 boolean save()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

auxillaryOption

protected AuxillaryOptionDataBitTable auxillaryOption
Constructor Detail

AuxillaryQuestionPartSQLStub

public AuxillaryQuestionPartSQLStub(AuxillaryOptionDataBitTable auxillaryOption)
Method Detail

hasText

public boolean hasText()
Specified by:
hasText in interface AuxillaryQuestionPart

getText

public StringDataBit getText()
Description copied from interface: AuxillaryQuestionPart
Optional, hasText must return true if this returns non-null.

Specified by:
getText in interface AuxillaryQuestionPart
Returns:

hasVariable

public boolean hasVariable()
Description copied from interface: AuxillaryQuestionPart
True if this type has a variable. There are two ways this can have a variable (a) it saves an answer to the database, and (b) it pulls info from the database.

Specified by:
hasVariable in interface AuxillaryQuestionPart
Returns:

getVariable

public VariableDataBitSet getVariable()
Specified by:
getVariable in interface AuxillaryQuestionPart

hasSecondVariable

public boolean hasSecondVariable()
Description copied from interface: AuxillaryQuestionPart
The second variable. This should be changed to something a bit more consistent, like just having one 'getVariables()' instead of 'hasVariable()', getVariable(), and getSecondVariable(), in which it's easy to forget the second variable.

Specified by:
hasSecondVariable in interface AuxillaryQuestionPart
Returns:

getSecondVariable

public VariableDataBitSet getSecondVariable()
Specified by:
getSecondVariable in interface AuxillaryQuestionPart

getType

public StringDataBit getType()
Description copied from interface: AuxillaryQuestionPart
Returns one of the static types to mention what it is -- static types should all be in QuestionsFromDatabaseConstants.

Specified by:
getType in interface AuxillaryQuestionPart
Returns:

getTypeFriendlyName

public java.lang.String getTypeFriendlyName()
Specified by:
getTypeFriendlyName in interface AuxillaryQuestionPart

getOrderIndex

public IntegerDataBit getOrderIndex()

isNew

public boolean isNew()

hasBeenModified

public boolean hasBeenModified()

save

public boolean save()

hasChoices

public boolean hasChoices()
Specified by:
hasChoices in interface AuxillaryQuestionPart

getChoices

public ChoicesDataBitSet getChoices()
Specified by:
getChoices in interface AuxillaryQuestionPart

hasFilterType

public boolean hasFilterType()
Specified by:
hasFilterType in interface AuxillaryQuestionPart

getFilterType

public StringDataBit getFilterType()
Specified by:
getFilterType in interface AuxillaryQuestionPart

hasTable

public boolean hasTable()
Specified by:
hasTable in interface AuxillaryQuestionPart

getTable

public StringDataBit getTable()
Specified by:
getTable in interface AuxillaryQuestionPart

moveTo

public AuxillaryQuestionPartSQLStub moveTo(AuxillaryQuestionPartSetSQL 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:

copyTo

public AuxillaryQuestionPartSQLStub copyTo(AuxillaryQuestionPartSetSQL 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: