cmu.survey.data
Class VectorDataSet<T extends HasBeenModified>

java.lang.Object
  extended by cmu.survey.data.VectorDataSet<T>
All Implemented Interfaces:
HasBeenModified, HasID

public class VectorDataSet<T extends HasBeenModified>
extends java.lang.Object
implements HasBeenModified, HasID

For storing a Vector of data that needs to be loaded and re-saved. Has all the relevant data for saving to an arbitrary database, including unique ID, knowledge of whether the Vector has changed, and ability to know if it's components have changed.


Constructor Summary
VectorDataSet()
           
 
Method Summary
 void add(T modifiable)
           
 void addToFront(T modifiable)
           
 T get(int i)
           
 java.util.Vector<T> getDeletedItems()
           
 boolean getHasBeenModified()
           
 java.lang.Integer getID()
           
 boolean getListHasBeenModified()
           
 int getSize()
           
 boolean isEmpty()
           
 boolean remove(int index)
           
 boolean remove(T modifiable)
           
 void setID(java.lang.Integer id)
           
 void setJustLoadedOrSaved()
          Call this just after a load or save to let it know that it's no longer modified since the last save.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorDataSet

public VectorDataSet()
Method Detail

getSize

public int getSize()

get

public T get(int i)

add

public void add(T modifiable)

addToFront

public void addToFront(T modifiable)

remove

public boolean remove(T modifiable)

remove

public boolean remove(int index)

getHasBeenModified

public boolean getHasBeenModified()
Specified by:
getHasBeenModified in interface HasBeenModified

getListHasBeenModified

public boolean getListHasBeenModified()

setJustLoadedOrSaved

public void setJustLoadedOrSaved()
Call this just after a load or save to let it know that it's no longer modified since the last save.


size

public int size()

isEmpty

public boolean isEmpty()

getID

public java.lang.Integer getID()
Specified by:
getID in interface HasID
Returns:
Returns the id.

setID

public void setID(java.lang.Integer id)
Parameters:
id - The id to set.

getDeletedItems

public java.util.Vector<T> getDeletedItems()