Omaha #4380 - Added new hydro forecast issuance stage and flow
Former-commit-id: 544d831ab3467af567ced94f97fe479b667d915c
This commit is contained in:
parent
7d509067ff
commit
497fe6e160
4 changed files with 237 additions and 90 deletions
|
@ -23,7 +23,6 @@ import java.text.ParseException;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
|
@ -49,6 +48,7 @@ import org.eclipse.swt.widgets.Text;
|
|||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.viz.hydrobase.FcstPointGroupDlg;
|
||||
import com.raytheon.viz.hydrobase.listeners.IForecastGroupAssignmentListener;
|
||||
|
@ -78,7 +78,8 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Apr 16,2012 14797 wkwock Change lat/lon from hour minute sec to decimal.
|
||||
* Jun 11,2013 2088 rferrel Make dialog non-blocking.
|
||||
* Changes for non-blocking FcstPointGroupDlg.
|
||||
* Feb.02, 2015 #13372 djingtao Change from GMT time to local time for "Revise" field
|
||||
* Feb.02, 2015 #13372 djingtao Change from GMT time to local time for "Revise" field
|
||||
* May 15, 2015 4380 skorolev Added issuanceStage and issuanceFlow text fields.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -332,6 +333,16 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
|||
*/
|
||||
private final int MAX_REMARK_CHAR = 255;
|
||||
|
||||
/**
|
||||
* Issuance Stage text control
|
||||
*/
|
||||
private Text issuanceStageTF;
|
||||
|
||||
/**
|
||||
* Issuance Flow text control
|
||||
*/
|
||||
private Text issuanceFlowTF;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
|
@ -484,7 +495,7 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
|||
streamLbl.setText("Stream:");
|
||||
streamLbl.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(250, SWT.DEFAULT);
|
||||
gd = new GridData(200, SWT.DEFAULT);
|
||||
gd.horizontalSpan = 3;
|
||||
streamTF = new Text(leftComp, SWT.BORDER);
|
||||
streamTF.setLayoutData(gd);
|
||||
|
@ -496,11 +507,11 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
|||
latLonLbl.setText("Lat/Lon:");
|
||||
latLonLbl.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(120, SWT.DEFAULT);
|
||||
gd = new GridData(90, SWT.DEFAULT);
|
||||
latitudeTF = new Text(leftComp, SWT.BORDER);
|
||||
latitudeTF.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(120, SWT.DEFAULT);
|
||||
gd = new GridData(90, SWT.DEFAULT);
|
||||
gd.horizontalSpan = 2;
|
||||
longitudeTF = new Text(leftComp, SWT.BORDER);
|
||||
longitudeTF.setLayoutData(gd);
|
||||
|
@ -537,7 +548,7 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
|||
floodStageTF = new Text(leftComp, SWT.BORDER);
|
||||
floodStageTF.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(50, SWT.DEFAULT);
|
||||
gd = new GridData(95, SWT.DEFAULT);
|
||||
Label floodStageFlowLbl = new Label(leftComp, SWT.RIGHT);
|
||||
floodStageFlowLbl.setText("Flow:");
|
||||
floodStageFlowLbl.setLayoutData(gd);
|
||||
|
@ -556,7 +567,7 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
|||
actionStageTF = new Text(leftComp, SWT.BORDER);
|
||||
actionStageTF.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(50, SWT.DEFAULT);
|
||||
gd = new GridData(95, SWT.DEFAULT);
|
||||
Label actionStageFlowLbl = new Label(leftComp, SWT.RIGHT);
|
||||
actionStageFlowLbl.setText("Flow:");
|
||||
actionStageFlowLbl.setLayoutData(gd);
|
||||
|
@ -572,10 +583,19 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
|||
zeroDatumLbl.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(90, SWT.DEFAULT);
|
||||
gd.horizontalSpan = 3;
|
||||
zeroDatumTF = new Text(leftComp, SWT.BORDER);
|
||||
zeroDatumTF.setLayoutData(gd);
|
||||
|
||||
// Issuance Stage
|
||||
gd = new GridData(95, SWT.DEFAULT);
|
||||
Label issuanceStageLbl = new Label(leftComp, SWT.RIGHT);
|
||||
issuanceStageLbl.setText("Issuance Stage:");
|
||||
issuanceStageLbl.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(90, SWT.DEFAULT);
|
||||
issuanceStageTF = new Text(leftComp, SWT.BORDER);
|
||||
issuanceStageTF.setLayoutData(gd);
|
||||
|
||||
// Threshold Runoff
|
||||
gd = new GridData(SWT.FILL, SWT.CENTER, false, true);
|
||||
Label threasholdRunoffLbl = new Label(leftComp, SWT.RIGHT);
|
||||
|
@ -583,10 +603,19 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
|||
threasholdRunoffLbl.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(90, SWT.DEFAULT);
|
||||
gd.horizontalSpan = 3;
|
||||
thresholdRunoffTF = new Text(leftComp, SWT.BORDER);
|
||||
thresholdRunoffTF.setLayoutData(gd);
|
||||
|
||||
// Issuance Flow
|
||||
gd = new GridData(95, SWT.DEFAULT);
|
||||
Label issuanceFlowLbl = new Label(leftComp, SWT.RIGHT);
|
||||
issuanceFlowLbl.setText("Issuance Flow:");
|
||||
issuanceFlowLbl.setLayoutData(gd);
|
||||
|
||||
gd = new GridData(90, SWT.DEFAULT);
|
||||
issuanceFlowTF = new Text(leftComp, SWT.BORDER);
|
||||
issuanceFlowTF.setLayoutData(gd);
|
||||
|
||||
// ------------------------------------------
|
||||
// Create the right side composite of the
|
||||
// Geographic/Physical group.
|
||||
|
@ -1017,10 +1046,18 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
|||
actionStageFlowTF.setText(HydroDataUtils
|
||||
.getDisplayString(riverGageData.getActionFlow()));
|
||||
|
||||
// Issuance Stage
|
||||
issuanceStageTF.setText(HydroDataUtils
|
||||
.getDisplayString(riverGageData.getIssuestg()));
|
||||
|
||||
// Zero Datum
|
||||
zeroDatumTF.setText(HydroDataUtils.getDisplayString(riverGageData
|
||||
.getZeroDatum()));
|
||||
|
||||
// Issuance Flow
|
||||
issuanceFlowTF.setText(HydroDataUtils
|
||||
.getDisplayString(riverGageData.getIssueflow()));
|
||||
|
||||
// Threshold Runoff
|
||||
thresholdRunoffTF.setText(HydroDataUtils
|
||||
.getDisplayString(riverGageData.getThresholdRunoff()));
|
||||
|
@ -1353,6 +1390,20 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
|||
.valueOf(HydroConstants.MISSING_VALUE));
|
||||
newData.setUnitHydrographDuration(HydroConstants.MISSING_VALUE);
|
||||
}
|
||||
// Issuance Stage
|
||||
dTemp = HydroDataUtils.getDoubleFromTF(shell, issuanceStageTF,
|
||||
"Issuance Stage");
|
||||
if (dTemp == null) {
|
||||
return successful;
|
||||
}
|
||||
newData.setIssuestg(dTemp);
|
||||
// Issuance Flow
|
||||
dTemp = HydroDataUtils.getDoubleFromTF(shell, issuanceFlowTF,
|
||||
"Issuance Flow");
|
||||
if (dTemp == null) {
|
||||
return successful;
|
||||
}
|
||||
newData.setIssueflow(dTemp);
|
||||
|
||||
// Save the River Gage
|
||||
try {
|
||||
|
@ -1532,17 +1583,11 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
|||
* Handles the changes in the Revision Date
|
||||
*/
|
||||
private void updateRevisionDate() {
|
||||
// If the Revision Checkbox is checked, set the Revision Date to the
|
||||
// current date in local time
|
||||
// Else load the date from the database
|
||||
//Date now = Calendar.getInstance(TimeZone.getTimeZone("GMT")).getTime();
|
||||
|
||||
Calendar now = Calendar.getInstance(Locale.getDefault());
|
||||
String revise_str = new SimpleDateFormat("MM/dd/yyyy").format(now.getTime());
|
||||
|
||||
if (reviseChk.getSelection()) {
|
||||
//dateTF.setText(dateFormat.format(now));
|
||||
dateTF.setText(revise_str);
|
||||
Calendar now = TimeUtil.newCalendar(TimeZone.getDefault());
|
||||
String revise_str = new SimpleDateFormat("MM/dd/yyyy").format(now
|
||||
.getTime());
|
||||
if (reviseChk.getSelection()) {
|
||||
dateTF.setText(revise_str);
|
||||
} else if (riverGageData != null) {
|
||||
dateTF.setText((riverGageData.getReviseDate() != null) ? dateFormat
|
||||
.format(riverGageData.getReviseDate()) : "");
|
||||
|
|
|
@ -38,7 +38,8 @@ import com.raytheon.viz.hydrocommon.HydroConstants;
|
|||
* Jan 3, 2013 15520 lbousaidi added a dollar-quoted string to getUpdate and
|
||||
* getInsert statements to always write literally
|
||||
* the string content.
|
||||
* April 8, 2015 17338 jingtaoD "Apostrophes" entered into HB text fields are not written to IHFS database
|
||||
* Apr 08, 2015 17338 jingtaoD "Apostrophes" entered into HB text fields are not written to IHFS database
|
||||
* May 18, 2015 4380 skorolev Added issuestg and issueflow parameters.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -206,6 +207,16 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
|||
*/
|
||||
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
/**
|
||||
* Issuance Stage
|
||||
*/
|
||||
private double issuestg;
|
||||
|
||||
/**
|
||||
* Issuance Flow
|
||||
*/
|
||||
private double issueflow;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
|
@ -224,32 +235,32 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
|||
|
||||
setLid(getDBValue("lid", data, dataMap, ""));
|
||||
setPrimaryPE(getDBValue("primary_pe", data, dataMap, ""));
|
||||
setBankFull(getDBValue("bf", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setCheckBar(getDBValue("cb", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setDrainageArea(getDBValue("da", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setResponseTime(getDBValue("response_time", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setThresholdRunoff(getDBValue("threshold_runoff", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setFloodFlow(getDBValue("fq", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setFloodStage(getDBValue("fs", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setBankFull(getDBValue("bf", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setCheckBar(getDBValue("cb", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setDrainageArea(getDBValue("da", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setResponseTime(getDBValue("response_time", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setThresholdRunoff(getDBValue("threshold_runoff", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setFloodFlow(getDBValue("fq", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setFloodStage(getDBValue("fs", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setGageNumber(getDBValue("gsno", data, dataMap, ""));
|
||||
setLevel(getDBValue("level", data, dataMap, ""));
|
||||
setRiverMile(getDBValue("mile", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setPool(getDBValue("pool", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setRiverMile(getDBValue("mile", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setPool(getDBValue("pool", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setPeriodOfRecord(getDBValue("por", data, dataMap, ""));
|
||||
setRated(getDBValue("rated", data, dataMap, ""));
|
||||
setLatitude(getDBValue("lat", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setLongitude(getDBValue("lon", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setLatitude(getDBValue("lat", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setLongitude(getDBValue("lon", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setRemark(getDBValue("remark", data, dataMap, ""));
|
||||
setReviseDate(getDBValue("rrevise", data, dataMap, (Date) null));
|
||||
setLatLonSource(getDBValue("rsource", data, dataMap, ""));
|
||||
|
@ -257,17 +268,21 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
|||
setTidalEffect(getDBValue("tide", data, dataMap, ""));
|
||||
setBackWater(getDBValue("backwater", data, dataMap, ""));
|
||||
setVerticalDatum(getDBValue("vdatum", data, dataMap, ""));
|
||||
setActionFlow(getDBValue("action_flow", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setActionStage(getDBValue("wstg", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setZeroDatum(getDBValue("zd", data, dataMap, Double
|
||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setActionFlow(getDBValue("action_flow", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setActionStage(getDBValue("wstg", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setZeroDatum(getDBValue("zd", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setDateOfRating(getDBValue("ratedat", data, dataMap, (Date) null));
|
||||
setUsgsRateNumber(getDBValue("usgs_ratenum", data, dataMap, ""));
|
||||
setUnitHydrographDuration(getDBValue("uhgdur", data, dataMap,
|
||||
HydroConstants.MISSING_VALUE));
|
||||
setUseLatestForecast(getDBValue("use_latest_fcst", data, dataMap, ""));
|
||||
setIssuestg(getDBValue("issuestg", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
setIssueflow(getDBValue("issueflow", data, dataMap,
|
||||
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||
}
|
||||
|
||||
private void initDateFormat() {
|
||||
|
@ -744,7 +759,7 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
|||
String columns = "lid, primary_pe, bf, cb, da, response_time, threshold_runoff,"
|
||||
+ " fq, fs, gsno, level, mile, pool, por, rated, lat, lon, remark, rrevise,"
|
||||
+ " rsource, stream, tide, backwater, vdatum, action_flow, wstg, zd, ratedat,"
|
||||
+ " usgs_ratenum, uhgdur, use_latest_fcst";
|
||||
+ " usgs_ratenum, uhgdur, use_latest_fcst, issuestg, issueflow";
|
||||
String query = "SELECT " + columns + " FROM riverstat WHERE lid="
|
||||
+ getDBString(lid);
|
||||
return query;
|
||||
|
@ -765,12 +780,12 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
|||
String columns = "lid, primary_pe, bf, cb, da, response_time, threshold_runoff,"
|
||||
+ " fq, fs, gsno, level, mile, pool, por, rated, lat, lon, remark, rrevise,"
|
||||
+ " rsource, stream, tide, backwater, vdatum, action_flow, wstg, zd, ratedat,"
|
||||
+ " usgs_ratenum, uhgdur, use_latest_fcst";
|
||||
+ " usgs_ratenum, uhgdur, use_latest_fcst, issuestg, issueflow";
|
||||
|
||||
String rval = "INSERT INTO riverstat ( " + columns
|
||||
+ " ) VALUES ( %s, %s, %s, %s, %s, %s, %s,"
|
||||
+ " %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, $$%s$$, %s,"
|
||||
+ " %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )";
|
||||
+ " %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )";
|
||||
|
||||
rval = String.format(rval, getDBString(lid), getDBString(primaryPE),
|
||||
getDBString(bankFull), getDBString(checkBar),
|
||||
|
@ -780,14 +795,16 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
|||
getDBString(level), getDBString(riverMile), getDBString(pool),
|
||||
getDBString(periodOfRecord), getDBString(rated),
|
||||
getDBString(latitude), getDBString(longitude),
|
||||
getDBStringNoQuote(remark), getDBString(reviseDate, dateFormat),
|
||||
getDBString(latLonSource), getDBString(stream),
|
||||
getDBString(tidalEffect), getDBString(backWater),
|
||||
getDBString(verticalDatum), getDBString(actionFlow),
|
||||
getDBString(actionStage), getDBString(zeroDatum), getDBString(
|
||||
dateOfRating, dateFormat), getDBString(usgsRateNumber),
|
||||
getDBStringNoQuote(remark),
|
||||
getDBString(reviseDate, dateFormat), getDBString(latLonSource),
|
||||
getDBString(stream), getDBString(tidalEffect),
|
||||
getDBString(backWater), getDBString(verticalDatum),
|
||||
getDBString(actionFlow), getDBString(actionStage),
|
||||
getDBString(zeroDatum), getDBString(dateOfRating, dateFormat),
|
||||
getDBString(usgsRateNumber),
|
||||
getDBString(unitHydrographDuration),
|
||||
getDBString(useLatestForecast));
|
||||
getDBString(useLatestForecast), getDBString(issuestg),
|
||||
getDBString(issueflow));
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
@ -803,7 +820,7 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
|||
String columns = "lid, primary_pe, bf, cb, da, response_time, threshold_runoff,"
|
||||
+ " fq, fs, gsno, level, mile, pool, por, rated, lat, lon, remark, rrevise,"
|
||||
+ " rsource, stream, tide, backwater, vdatum, action_flow, wstg, zd, ratedat,"
|
||||
+ " usgs_ratenum, uhgdur, use_latest_fcst";
|
||||
+ " usgs_ratenum, uhgdur, use_latest_fcst, issuestg, issueflow";
|
||||
|
||||
String query = "SELECT " + columns + " FROM riverstat";
|
||||
return query;
|
||||
|
@ -815,7 +832,7 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
|||
String rval = "UPDATE riverstat SET lid=%s, primary_pe=%s, bf=%s, cb=%s, da=%s, response_time=%s, threshold_runoff=%s,"
|
||||
+ " fq=%s, fs=%s, gsno=%s, level=%s, mile=%s, pool=%s, por=%s, rated=%s, lat=%s, lon=%s, remark=$$%s$$, rrevise=%s,"
|
||||
+ " rsource=%s, stream=%s, tide=%s, backwater=%s, vdatum=%s, action_flow=%s, wstg=%s, zd=%s, ratedat=%s,"
|
||||
+ " usgs_ratenum=%s, uhgdur=%s, use_latest_fcst=%s WHERE %s";
|
||||
+ " usgs_ratenum=%s, uhgdur=%s, use_latest_fcst=%s, issuestg=%s, issueflow=%s WHERE %s";
|
||||
|
||||
// Populate the values
|
||||
rval = String.format(rval, getDBString(lid), getDBString(primaryPE),
|
||||
|
@ -826,15 +843,47 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
|||
getDBString(level), getDBString(riverMile), getDBString(pool),
|
||||
getDBString(periodOfRecord), getDBString(rated),
|
||||
getDBString(latitude), getDBString(longitude),
|
||||
getDBStringNoQuote(remark), getDBString(reviseDate, dateFormat),
|
||||
getDBString(latLonSource), getDBString(stream),
|
||||
getDBString(tidalEffect), getDBString(backWater),
|
||||
getDBString(verticalDatum), getDBString(actionFlow),
|
||||
getDBString(actionStage), getDBString(zeroDatum), getDBString(
|
||||
dateOfRating, dateFormat), getDBString(usgsRateNumber),
|
||||
getDBStringNoQuote(remark),
|
||||
getDBString(reviseDate, dateFormat), getDBString(latLonSource),
|
||||
getDBString(stream), getDBString(tidalEffect),
|
||||
getDBString(backWater), getDBString(verticalDatum),
|
||||
getDBString(actionFlow), getDBString(actionStage),
|
||||
getDBString(zeroDatum), getDBString(dateOfRating, dateFormat),
|
||||
getDBString(usgsRateNumber),
|
||||
getDBString(unitHydrographDuration),
|
||||
getDBString(useLatestForecast), getPKStatement());
|
||||
getDBString(useLatestForecast), getDBString(issuestg),
|
||||
getDBString(issueflow), getPKStatement());
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the issuestg
|
||||
*/
|
||||
public double getIssuestg() {
|
||||
return issuestg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param issuestg
|
||||
* the issuestg to set
|
||||
*/
|
||||
public void setIssuestg(double issuestg) {
|
||||
this.issuestg = issuestg;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the issueflow
|
||||
*/
|
||||
public double getIssueflow() {
|
||||
return issueflow;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param issueflow
|
||||
* the issueflow to set
|
||||
*/
|
||||
public void setIssueflow(double issueflow) {
|
||||
this.issueflow = issueflow;
|
||||
}
|
||||
}
|
||||
|
|
24
deltaScripts/16.1.1/DR4380/addNewColumnsTableRiverstat.sh
Executable file
24
deltaScripts/16.1.1/DR4380/addNewColumnsTableRiverstat.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
# DR #4380 - add issuestg and issueflow columns to the riverstat table.
|
||||
|
||||
PSQL="/awips2/psql/bin/psql"
|
||||
# Use local Hydro DB (hd_ob92<site>)
|
||||
DB="hd_ob92oax"
|
||||
|
||||
ADDCOLUMNS="
|
||||
DO \$\$
|
||||
BEGIN
|
||||
ALTER TABLE IF EXISTS riverstat ADD COLUMN issuestg double precision,
|
||||
ADD COLUMN issueflow double precision;
|
||||
EXCEPTION
|
||||
WHEN duplicate_column THEN RAISE INFO 'columns already exist in riverstat.';
|
||||
END;
|
||||
\$\$
|
||||
"
|
||||
|
||||
echo "INFO: adding issuestg and issueflow columns to riverstat table"
|
||||
|
||||
${PSQL} -U awips -d ${DB} -q -c "${ADDCOLUMNS}"
|
||||
|
||||
echo "Done."
|
||||
|
|
@ -1,29 +1,31 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.uf.common.dataplugin.shef.tables;
|
||||
|
||||
// default package
|
||||
// Generated Oct 17, 2008 2:22:17 PM by Hibernate Tools 3.2.2.GA
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
|
@ -46,8 +48,9 @@ import javax.persistence.TemporalType;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 17, 2008 Initial generation by hbm2java
|
||||
* Aug 19, 2011 10672 jkorman Move refactor to new project
|
||||
* Oct 07, 2013 2361 njensen Removed XML annotations
|
||||
* Aug 19, 2011 10672 jkorman Move refactor to new project
|
||||
* Oct 07, 2013 2361 njensen Removed XML annotations
|
||||
* May 15, 2015 4380 skorolev Add new issuestg and issueflow fields.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -57,7 +60,9 @@ import javax.persistence.TemporalType;
|
|||
@Entity
|
||||
@Table(name = "riverstat")
|
||||
@com.raytheon.uf.common.serialization.annotations.DynamicSerialize
|
||||
public class Riverstat extends com.raytheon.uf.common.dataplugin.persist.PersistableDataObject implements java.io.Serializable {
|
||||
public class Riverstat extends
|
||||
com.raytheon.uf.common.dataplugin.persist.PersistableDataObject
|
||||
implements java.io.Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -205,6 +210,12 @@ public class Riverstat extends com.raytheon.uf.common.dataplugin.persist.Persist
|
|||
@com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement
|
||||
private Set<Hgstation> hgstations = new HashSet<Hgstation>(0);
|
||||
|
||||
@com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement
|
||||
private Double issuestg;
|
||||
|
||||
@com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement
|
||||
private Double issueflow;
|
||||
|
||||
public Riverstat() {
|
||||
}
|
||||
|
||||
|
@ -228,7 +239,7 @@ public class Riverstat extends com.raytheon.uf.common.dataplugin.persist.Persist
|
|||
Set<Fcstptservice> fcstptservices, Set<Lowwater> lowwaters,
|
||||
Set<Crest> crests, Set<Floodstmt> floodstmts, Set<Pub> pubs,
|
||||
Set<Descrip> descrips, Set<Unitgraph> unitgraphs,
|
||||
Set<Hgstation> hgstations) {
|
||||
Set<Hgstation> hgstations, Double issuestg, Double issueflow) {
|
||||
this.lid = lid;
|
||||
this.location = location;
|
||||
this.primaryPe = primaryPe;
|
||||
|
@ -277,6 +288,8 @@ public class Riverstat extends com.raytheon.uf.common.dataplugin.persist.Persist
|
|||
this.descrips = descrips;
|
||||
this.unitgraphs = unitgraphs;
|
||||
this.hgstations = hgstations;
|
||||
this.issuestg = issuestg;
|
||||
this.issueflow = issueflow;
|
||||
}
|
||||
|
||||
@Id
|
||||
|
@ -715,4 +728,20 @@ public class Riverstat extends com.raytheon.uf.common.dataplugin.persist.Persist
|
|||
this.hgstations = hgstations;
|
||||
}
|
||||
|
||||
public Double getIssuestg() {
|
||||
return issuestg;
|
||||
}
|
||||
|
||||
public void setIssuestg(Double issuestg) {
|
||||
this.issuestg = issuestg;
|
||||
}
|
||||
|
||||
public Double getIssueflow() {
|
||||
return issueflow;
|
||||
}
|
||||
|
||||
public void setIssueflow(Double issueflow) {
|
||||
this.issueflow = issueflow;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue