jetweb is hosted by Hepforge, IPPP Durham

cedar.jetweb.db
Class DBFitManager

java.lang.Object
  extended by cedar.jetweb.db.DBFitManager

public abstract class DBFitManager
extends java.lang.Object

DataBase operations for fit package.

Version:
$Date: 2006-05-05 13:01:23 +0100 (Fri, 05 May 2006) $ $Revision: 1130 $
Author:
S.Butterworth

Field Summary
static java.lang.String SUCCESS
          constant to signify successful completion of a DB Fit operation.
 
Constructor Summary
DBFitManager()
           
 
Method Summary
static void addFit(Fit fit)
          Writes this fit (including all its fitted points) to the DB.
static void deleteAll(int fitId)
          Clears down an existing fit record from the DB.
static java.util.Vector<Fit> select(Model model)
          Get all fits to the input model.
static java.lang.String selectFromDB(Fit fit)
          Reads in the fit from the DB.
static void zeroFit(int fitId)
          Zero all data associated with the given fit id, without removing the fit itself.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUCCESS

public static final java.lang.String SUCCESS
constant to signify successful completion of a DB Fit operation.

See Also:
Constant Field Values

Constructor Detail

DBFitManager

public DBFitManager()
Method Detail

selectFromDB

public static java.lang.String selectFromDB(Fit fit)
                                     throws JetWebException
Reads in the fit from the DB. Either the fit ID or the model and plotselection ID must be set beforehand. If the fit does not exist in the DB it builds one (and gets the MC papers). Returns SUCCESS or an error message.

Parameters:
fit - specifies the fit to be retrieved
Returns:
String; SUCCESS or error string
Throws:
JetWebException - - thrown if there is an SQL exception


addFit

public static void addFit(Fit fit)
                   throws JetWebException
Writes this fit (including all its fitted points) to the DB.

Parameters:
fit - to be inserted.
Throws:
JetWebException


deleteAll

public static void deleteAll(int fitId)
                      throws JetWebException
Clears down an existing fit record from the DB.

Parameters:
fitId - identifier of fit to be deleted.
Throws:
JetWebException


zeroFit

public static void zeroFit(int fitId)
Zero all data associated with the given fit id, without removing the fit itself.


select

public static java.util.Vector<Fit> select(Model model)
                                    throws JetWebException
Get all fits to the input model.

Throws:
JetWebException