Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

PendingJob.java

Go to the documentation of this file.
00001 package cedar.jetweb.job;
00002 
00003 import java.io.BufferedWriter;
00004 import java.io.BufferedReader;
00005 import java.io.IOException;
00006 import java.io.FileInputStream;
00007 import java.io.File;
00008 import java.io.FileWriter;
00009 
00010 import java.io.InputStreamReader;
00011 
00012 import java.util.NoSuchElementException;
00013 import java.util.Vector;
00014 import java.util.Enumeration;
00015 import java.util.Hashtable;
00016 
00017 import java.util.Date;
00018 
00019 import cedar.jetweb.JetWebException;
00020 import cedar.jetweb.model.RunSeries;
00021 import cedar.jetweb.model.ResultSearchPattern;
00022 import cedar.jetweb.db.DBJobManager;
00023 
00030 public class PendingJob {
00031     
00032     private int runSeriesId=-1;
00033 
00034     private String scriptName;
00035     private String name;
00036     private Date date;
00037     private boolean valid;
00038     private RunSeries runSeries;
00039 
00040     // Getters & Setters
00042 
00047     public boolean isValid(){ return valid; }
00053     public void setValid(boolean ok){ valid=ok; }
00054 
00060     public String getScriptName() {
00061     return scriptName;
00062     }
00068     public void setScriptName(String sn){ scriptName = sn; }
00069 
00075     public String getName() {
00076     return name;
00077     }
00083     public void setName(String n){ name = n; }
00084 
00090     public void setRunSeriesId(int lp) { runSeriesId = lp; }
00091 
00092 
00098     public Date getDate(){ return date; }
00104     public void setDate(Date d){ date = d; }
00105 
00106     private int logId;
00112     public int getLogId(){return logId; }
00113 
00115     public RunSeries getRunSeries(){return runSeries;}
00117     public void setRunSeries(ResultSearchPattern pattern){
00118     runSeries = (RunSeries)pattern;
00119     }
00120 
00126     public PendingJob(int newlogId) throws JetWebException {
00127     logId = newlogId;
00128     DBJobManager.selectFromDB(this);
00129 
00130     if (runSeriesId>0 && valid) {
00131         runSeries = new RunSeries(runSeriesId);
00132     }
00133 
00134     }
00135 
00140     public void delete(){
00141 
00142     //DBFitManager.delete(this);
00143     
00144     File script = new File(scriptName);
00145     if (script.exists()){ script.delete(); }
00146 
00147     }
00148 }
00149 
00150 
00151 
00152 
00153 
00154 
00155 
00156 
00157 
00158 
00159 
00160 
00161 
00162 
00163 
00164 
00165 
00166 
00167 
00168 
00169 
00170 
00171 
00172 
00173 
00174 
00175 
00176 

Generated Wed Jan 17 09:14:27 GMT 2007