cmu.survey.editor.data.table
Class AuxillaryOptionDataBitTable

java.lang.Object
  extended by cmu.survey.editor.data.table.AuxillaryOptionDataBitTable
All Implemented Interfaces:
DataBitSet, HasID, Copyable, Moveable

public class AuxillaryOptionDataBitTable
extends java.lang.Object
implements DataBitSet, HasID, Copyable, Moveable


Field Summary
protected  IntegerDataBit auxillaryOptionNumberA
           
protected  IntegerDataBit auxillaryOptionNumberB
           
protected  IntegerDataBit auxillaryOptionNumberC
           
protected  StringDataBit auxillaryOptionTextA
           
protected  StringDataBit auxillaryOptionTextB
           
protected  StringDataBit auxillaryOptionTextC
           
protected  StringDataBit auxillaryOptionTextD
           
protected  StringDataBit auxillaryOptionTextE
           
protected  StringDataBit auxillaryOptionTextF
           
protected  StringDataBit auxillaryOptionTextG
           
protected  IntegerDataBit orderIndex
           
protected  CopyingNumberDataBit questionID
           
protected  DataBitStorageTable storage
           
protected  StringDataBit typeOfOption
           
protected  java.lang.Integer uniqueRowID
           
 
Constructor Summary
AuxillaryOptionDataBitTable(DataBitStorageTable storage)
           
 
Method Summary
 java.lang.Object copyTo(java.lang.Object newParent)
          Make a copy for use in the new parent.
 AuxillaryOptionDataBitTable copyTo(QuestionDataBitSetTable parentQuestion)
           
 IntegerDataBit getAuxillaryOptionNumberA()
           
 IntegerDataBit getAuxillaryOptionNumberB()
           
 IntegerDataBit getAuxillaryOptionNumberC()
           
 StringDataBit getAuxillaryOptionTextA()
           
 StringDataBit getAuxillaryOptionTextB()
           
 StringDataBit getAuxillaryOptionTextC()
           
 StringDataBit getAuxillaryOptionTextD()
           
 StringDataBit getAuxillaryOptionTextE()
           
 StringDataBit getAuxillaryOptionTextF()
           
 StringDataBit getAuxillaryOptionTextG()
           
 java.lang.String getErrorDescription(StringDataBit answersTable)
          THIS IS *NOT* a great function!
 java.lang.Integer getID()
           
 IntegerDataBit getOrderIndex()
           
 IntegerDataBit getQuestionID()
           
 AuxillaryOptionSecondVariableDataBitSetTable getSecondVariable()
           
 DataBitStorageTable getStorage()
           
 StringDataBit getType()
           
 VariableDataBitSet getVariable()
           
 boolean hasBeenModified()
           
 boolean hasError(StringDataBit answersTable)
           
 boolean hasSecondVariable()
           
 boolean hasVariable()
           
 boolean isNew()
           
 Moveable moveTo(java.lang.Object newParent)
          Move to the new parent.
 AuxillaryOptionDataBitTable moveTo(QuestionDataBitSetTable parentQuestion)
           
 boolean save()
           
 void setID(java.lang.Integer newUniqueRowID)
          Used for re-saving or undeleting -- to undelete, setID(null);
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

storage

protected DataBitStorageTable storage

orderIndex

protected IntegerDataBit orderIndex

uniqueRowID

protected java.lang.Integer uniqueRowID

questionID

protected CopyingNumberDataBit questionID

typeOfOption

protected StringDataBit typeOfOption

auxillaryOptionTextA

protected StringDataBit auxillaryOptionTextA

auxillaryOptionTextB

protected StringDataBit auxillaryOptionTextB

auxillaryOptionTextC

protected StringDataBit auxillaryOptionTextC

auxillaryOptionTextD

protected StringDataBit auxillaryOptionTextD

auxillaryOptionTextE

protected StringDataBit auxillaryOptionTextE

auxillaryOptionTextF

protected StringDataBit auxillaryOptionTextF

auxillaryOptionTextG

protected StringDataBit auxillaryOptionTextG

auxillaryOptionNumberA

protected IntegerDataBit auxillaryOptionNumberA

auxillaryOptionNumberB

protected IntegerDataBit auxillaryOptionNumberB

auxillaryOptionNumberC

protected IntegerDataBit auxillaryOptionNumberC
Constructor Detail

AuxillaryOptionDataBitTable

public AuxillaryOptionDataBitTable(DataBitStorageTable storage)
Method Detail

getStorage

public DataBitStorageTable getStorage()

getVariable

public VariableDataBitSet getVariable()

getSecondVariable

public AuxillaryOptionSecondVariableDataBitSetTable getSecondVariable()

getID

public java.lang.Integer getID()
Specified by:
getID in interface HasID
Returns:
0 or -1 if it has no id or hasn't been set yet, and anything higher than that is the integer ID.

setID

public void setID(java.lang.Integer newUniqueRowID)
Used for re-saving or undeleting -- to undelete, setID(null);

Parameters:
newUniqueRowID -

isNew

public boolean isNew()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hasVariable

public boolean hasVariable()

hasSecondVariable

public boolean hasSecondVariable()

getOrderIndex

public IntegerDataBit getOrderIndex()

getQuestionID

public IntegerDataBit getQuestionID()
Returns:
Returns the questionID.

hasBeenModified

public boolean hasBeenModified()
Specified by:
hasBeenModified in interface DataBitSet
Returns:
whether the question has been modified since load or if it is new. Basically, it returns whether this DataBitSet needs to be saved.

getErrorDescription

public java.lang.String getErrorDescription(StringDataBit answersTable)
THIS IS *NOT* a great function! It is not internationalizable, etc. and it gives errors that help out with the GUI. Should be changed to returning error types and maybe a class that has error messages or something.

Returns:

hasError

public boolean hasError(StringDataBit answersTable)

save

public boolean save()
Parameters:
opt - option to save
auxillaryOptionsTable - the auxillary options table from the QuestionDataBitSet

getType

public StringDataBit getType()
Returns:

getAuxillaryOptionNumberA

public IntegerDataBit getAuxillaryOptionNumberA()

getAuxillaryOptionNumberB

public IntegerDataBit getAuxillaryOptionNumberB()

getAuxillaryOptionNumberC

public IntegerDataBit getAuxillaryOptionNumberC()

getAuxillaryOptionTextA

public StringDataBit getAuxillaryOptionTextA()

getAuxillaryOptionTextB

public StringDataBit getAuxillaryOptionTextB()

getAuxillaryOptionTextC

public StringDataBit getAuxillaryOptionTextC()

getAuxillaryOptionTextD

public StringDataBit getAuxillaryOptionTextD()

getAuxillaryOptionTextE

public StringDataBit getAuxillaryOptionTextE()

getAuxillaryOptionTextF

public StringDataBit getAuxillaryOptionTextF()

getAuxillaryOptionTextG

public StringDataBit getAuxillaryOptionTextG()

moveTo

public AuxillaryOptionDataBitTable moveTo(QuestionDataBitSetTable parentQuestion)

copyTo

public AuxillaryOptionDataBitTable copyTo(QuestionDataBitSetTable parentQuestion)

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