cmu.survey.editor.data.sql
Class AuxillaryQuestionPartSetSQL

java.lang.Object
  extended by org.browsecode.helpers.reorderablelistpanel.ReorderableListModelWithOrderIndexStub<AuxillaryQuestionPart>
      extended by cmu.survey.editor.data.table.AuxillaryQuestionPartSetTable
          extended by cmu.survey.editor.data.sql.AuxillaryQuestionPartSetSQL
All Implemented Interfaces:
AuxillaryQuestionPartSet, ReorderableListModel<AuxillaryQuestionPart>

public class AuxillaryQuestionPartSetSQL
extends AuxillaryQuestionPartSetTable


Nested Class Summary
 class AuxillaryQuestionPartSetSQL.ReorderableSQLPart
           
 
Nested classes/interfaces inherited from class org.browsecode.helpers.reorderablelistpanel.ReorderableListModelWithOrderIndexStub
ReorderableListModelWithOrderIndexStub.ReorderableObject<E2>
 
Field Summary
 
Fields inherited from class cmu.survey.editor.data.table.AuxillaryQuestionPartSetTable
auxillaryParts
 
Fields inherited from class org.browsecode.helpers.reorderablelistpanel.ReorderableListModelWithOrderIndexStub
ABSTRACTION_ERROR, undoableEditListeners
 
Fields inherited from interface org.browsecode.helpers.reorderablelistpanel.ReorderableListModel
INSERTED_FROM_DELETED_HERE, INSERTED_FROM_ELSEWHERE
 
Constructor Summary
AuxillaryQuestionPartSetSQL(QuestionDataBitSetSQL question, java.util.Vector<AuxillaryOptionDataBitTable> auxillaryOptionsParts)
           
 
Method Summary
 AuxillaryQuestionPartSetSQL copyTo(QuestionDataBitSetSQL newParent)
           
protected  void deleteItem(ReorderableListModelWithOrderIndexStub.ReorderableObject<AuxillaryQuestionPart> justDeleted)
          If an object is deleted from the list, this method is fired and should be used to keep track of which items should not be saved anymore and deleted when this set is saved.
protected  void fireUndoableEdit(javax.swing.undo.UndoableEdit edit)
           
 java.lang.String getErrorDescription(StringDataBit answersTable)
           
protected  java.lang.String getItemsName()
          For undos and presentation names -- so we can say what we're moving/deleting/inserting
protected  java.util.Vector<ReorderableListModelWithOrderIndexStub.ReorderableObject<AuxillaryQuestionPart>> getItemsVector()
          Should return a non-cloned version of the list of items -- the vector will be changed to reflect the order, etc.
 AuxillaryQuestionPart getNewItem()
          Creates a new item for the list, but does not insert it into the list.
 java.util.Vector<AuxillaryQuestionPart> getParts()
          DO NOT modify the Vector after you get it!
 int getPartsSize()
          The size of the vector of parts returned by getParts().
protected  ReorderableListModelWithOrderIndexStub.ReorderableObject<AuxillaryQuestionPart> getReorderableObjectFor(AuxillaryQuestionPart reorderableItem)
           
 boolean hasBeenModified()
           
 boolean hasError(StringDataBit answersTable)
           
 boolean save()
           
 boolean shouldFireUndoableEdits()
          Also public for other classes that want to use the same list of undoableEditListeners.
protected  boolean undeleteItem(java.lang.Object justUndeleted)
           
 
Methods inherited from class org.browsecode.helpers.reorderablelistpanel.ReorderableListModelWithOrderIndexStub
addReorderableChangeListener, addUndoableEditListener, canItemBeMovedElsewhere, deleteItem, deleteItemProtected, fireUndoableEdit, getHasBeenChanged, getItemCount, getNewItem, getVectorOfReorderableItems, insertNewItemAt, insertNewItemAtProtected, iterator, moveItemElsewhere, moveItemElsewhereProtected, moveItemToIndex, moveItemToIndexProtected, removeReorderableChangeListener, removeUndoableEditListener, resetHasBeenChanged, setCachedReorderableItems, undeleteItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.browsecode.helpers.reorderablelistpanel.ReorderableListModel
addReorderableChangeListener, canItemBeMovedElsewhere, deleteItem, getItemCount, insertNewItemAt, iterator, moveItemElsewhere, moveItemToIndex, removeReorderableChangeListener
 

Constructor Detail

AuxillaryQuestionPartSetSQL

public AuxillaryQuestionPartSetSQL(QuestionDataBitSetSQL question,
                                   java.util.Vector<AuxillaryOptionDataBitTable> auxillaryOptionsParts)
Parameters:
question -
Method Detail

getParts

public java.util.Vector<AuxillaryQuestionPart> getParts()
Description copied from interface: AuxillaryQuestionPartSet
DO NOT modify the Vector after you get it! All modifications should be done through calls to AuxillaryQuestionPartSet, not to the Vector. Changes made to the Vector will not affect this class.

Returns:
Vector of AuxillaryQuestionPart

getPartsSize

public int getPartsSize()
Description copied from interface: AuxillaryQuestionPartSet
The size of the vector of parts returned by getParts(). This may be slightly more efficient than calling getParts().size(), since it may not need to generate a vector for it.

Returns:

hasBeenModified

public boolean hasBeenModified()

hasError

public boolean hasError(StringDataBit answersTable)

getErrorDescription

public java.lang.String getErrorDescription(StringDataBit answersTable)

getItemsName

protected java.lang.String getItemsName()
Description copied from class: ReorderableListModelWithOrderIndexStub
For undos and presentation names -- so we can say what we're moving/deleting/inserting

Overrides:
getItemsName in class ReorderableListModelWithOrderIndexStub<AuxillaryQuestionPart>

getItemsVector

protected java.util.Vector<ReorderableListModelWithOrderIndexStub.ReorderableObject<AuxillaryQuestionPart>> getItemsVector()
Description copied from class: ReorderableListModelWithOrderIndexStub
Should return a non-cloned version of the list of items -- the vector will be changed to reflect the order, etc.

Overrides:
getItemsVector in class ReorderableListModelWithOrderIndexStub<AuxillaryQuestionPart>
Returns:
Vector

deleteItem

protected void deleteItem(ReorderableListModelWithOrderIndexStub.ReorderableObject<AuxillaryQuestionPart> justDeleted)
Description copied from class: ReorderableListModelWithOrderIndexStub
If an object is deleted from the list, this method is fired and should be used to keep track of which items should not be saved anymore and deleted when this set is saved.

Overrides:
deleteItem in class ReorderableListModelWithOrderIndexStub<AuxillaryQuestionPart>

undeleteItem

protected boolean undeleteItem(java.lang.Object justUndeleted)

getNewItem

public AuxillaryQuestionPart getNewItem()
Description copied from class: ReorderableListModelWithOrderIndexStub
Creates a new item for the list, but does not insert it into the list. Required for getNewItem(int), which does the job correctly if you implement this.;

Overrides:
getNewItem in class ReorderableListModelWithOrderIndexStub<AuxillaryQuestionPart>
Returns:

save

public boolean save()
Specified by:
save in class AuxillaryQuestionPartSetTable

copyTo

public AuxillaryQuestionPartSetSQL copyTo(QuestionDataBitSetSQL newParent)

getReorderableObjectFor

protected ReorderableListModelWithOrderIndexStub.ReorderableObject<AuxillaryQuestionPart> getReorderableObjectFor(AuxillaryQuestionPart reorderableItem)
Overrides:
getReorderableObjectFor in class ReorderableListModelWithOrderIndexStub<AuxillaryQuestionPart>

shouldFireUndoableEdits

public boolean shouldFireUndoableEdits()
Description copied from class: ReorderableListModelWithOrderIndexStub
Also public for other classes that want to use the same list of undoableEditListeners.

Overrides:
shouldFireUndoableEdits in class ReorderableListModelWithOrderIndexStub<AuxillaryQuestionPart>

fireUndoableEdit

protected void fireUndoableEdit(javax.swing.undo.UndoableEdit edit)
Overrides:
fireUndoableEdit in class ReorderableListModelWithOrderIndexStub<AuxillaryQuestionPart>