jetweb is hosted by Hepforge, IPPP Durham

cedar.jetweb.model
Class RunSeriesCollection

java.lang.Object
  extended by cedar.jetweb.model.RunSeriesCollection
All Implemented Interfaces:
Storeable

public class RunSeriesCollection
extends java.lang.Object
implements Storeable

Collection of RunSeries which are associated with a single Model.

Version:
$Date: 2006-05-02 21:23:13 +0100 (Tue, 02 May 2006) $ $Revision: 1126 $
Author:
Jon Butterworth

Constructor Summary
RunSeriesCollection()
          Instantiate an empty RunSeriesCollection
RunSeriesCollection(int id)
          Instantiate a RunSeriesCollection with and id number = id, and fill it from the database, if a runseries already exists in the database with this id.
 
Method Summary
 boolean add(RunSeries runSeries)
          Adds a runseries id to the collection if the model doesn't already contain a runseries associated with the same processType.
 boolean contains(DataPlot plot)
          Does the collection contain a RunSeries which contains a prediction for this plot?
 java.util.Date getDate()
          get the last date at which any data was added to any RunSeries in this collection.
 int getId()
          Return the unique identification number of the collection.
 RunSeries getRunSeries(DataPlot plot)
          Return the RunSeries from this collection which contains the prediction for the input DataPlot
 java.util.Vector<RunSeries> getRunSeriesList()
          Return Vector of all RunSeries in this collection
 java.util.Vector<RunSeries> getRunSeriesList(MCProcessType proc)
          Return Vector of all RunSeries in this collection which are compatible with MCProcessType proc.
 boolean retrieve()
          Populate the object in memory from the database.
 void setId(int id)
          Set the unique identification number of the collection.
 boolean store()
          Write the object in memory to the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RunSeriesCollection

public RunSeriesCollection()
Instantiate an empty RunSeriesCollection


RunSeriesCollection

public RunSeriesCollection(int id)
                    throws JetWebException
Instantiate a RunSeriesCollection with and id number = id, and fill it from the database, if a runseries already exists in the database with this id.

Throws:
JetWebException

Method Detail

retrieve

public boolean retrieve()
                 throws JetWebException
Description copied from interface: Storeable
Populate the object in memory from the database. Return true if the information retrieved is up to date.

Specified by:
retrieve in interface Storeable
Throws:
JetWebException


store

public boolean store()
              throws JetWebException
Description copied from interface: Storeable
Write the object in memory to the database. If the ID does not exist in the DB the object is inserted as a new entry. If the ID exists, that entry is updated.

Specified by:
store in interface Storeable
Returns:
true if the object was inserted, false otherwise.
Throws:
JetWebException


getRunSeries

public RunSeries getRunSeries(DataPlot plot)
                       throws JetWebException
Return the RunSeries from this collection which contains the prediction for the input DataPlot

Throws:
JetWebException


getRunSeriesList

public java.util.Vector<RunSeries> getRunSeriesList()
Return Vector of all RunSeries in this collection


getRunSeriesList

public java.util.Vector<RunSeries> getRunSeriesList(MCProcessType proc)
Return Vector of all RunSeries in this collection which are compatible with MCProcessType proc.


getId

public int getId()
Return the unique identification number of the collection.

Specified by:
getId in interface Storeable


setId

public void setId(int id)
Set the unique identification number of the collection.


contains

public boolean contains(DataPlot plot)
Does the collection contain a RunSeries which contains a prediction for this plot?


add

public boolean add(RunSeries runSeries)
            throws JetWebException
Adds a runseries id to the collection if the model doesn't already contain a runseries associated with the same processType.

Parameters:
runseries - specifies runseries
Returns:
true if update is performed, false if it is unnecessary
Throws:
JetWebException


getDate

public java.util.Date getDate()
get the last date at which any data was added to any RunSeries in this collection.