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.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
import org.eclipse.swt.SWT;
|
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.IUFStatusHandler;
|
||||||
import com.raytheon.uf.common.status.UFStatus;
|
import com.raytheon.uf.common.status.UFStatus;
|
||||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
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.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.viz.hydrobase.FcstPointGroupDlg;
|
import com.raytheon.viz.hydrobase.FcstPointGroupDlg;
|
||||||
import com.raytheon.viz.hydrobase.listeners.IForecastGroupAssignmentListener;
|
import com.raytheon.viz.hydrobase.listeners.IForecastGroupAssignmentListener;
|
||||||
|
@ -79,6 +79,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
||||||
* Jun 11,2013 2088 rferrel Make dialog non-blocking.
|
* Jun 11,2013 2088 rferrel Make dialog non-blocking.
|
||||||
* Changes for non-blocking FcstPointGroupDlg.
|
* 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>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -332,6 +333,16 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
||||||
*/
|
*/
|
||||||
private final int MAX_REMARK_CHAR = 255;
|
private final int MAX_REMARK_CHAR = 255;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issuance Stage text control
|
||||||
|
*/
|
||||||
|
private Text issuanceStageTF;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issuance Flow text control
|
||||||
|
*/
|
||||||
|
private Text issuanceFlowTF;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
|
@ -484,7 +495,7 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
||||||
streamLbl.setText("Stream:");
|
streamLbl.setText("Stream:");
|
||||||
streamLbl.setLayoutData(gd);
|
streamLbl.setLayoutData(gd);
|
||||||
|
|
||||||
gd = new GridData(250, SWT.DEFAULT);
|
gd = new GridData(200, SWT.DEFAULT);
|
||||||
gd.horizontalSpan = 3;
|
gd.horizontalSpan = 3;
|
||||||
streamTF = new Text(leftComp, SWT.BORDER);
|
streamTF = new Text(leftComp, SWT.BORDER);
|
||||||
streamTF.setLayoutData(gd);
|
streamTF.setLayoutData(gd);
|
||||||
|
@ -496,11 +507,11 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
||||||
latLonLbl.setText("Lat/Lon:");
|
latLonLbl.setText("Lat/Lon:");
|
||||||
latLonLbl.setLayoutData(gd);
|
latLonLbl.setLayoutData(gd);
|
||||||
|
|
||||||
gd = new GridData(120, SWT.DEFAULT);
|
gd = new GridData(90, SWT.DEFAULT);
|
||||||
latitudeTF = new Text(leftComp, SWT.BORDER);
|
latitudeTF = new Text(leftComp, SWT.BORDER);
|
||||||
latitudeTF.setLayoutData(gd);
|
latitudeTF.setLayoutData(gd);
|
||||||
|
|
||||||
gd = new GridData(120, SWT.DEFAULT);
|
gd = new GridData(90, SWT.DEFAULT);
|
||||||
gd.horizontalSpan = 2;
|
gd.horizontalSpan = 2;
|
||||||
longitudeTF = new Text(leftComp, SWT.BORDER);
|
longitudeTF = new Text(leftComp, SWT.BORDER);
|
||||||
longitudeTF.setLayoutData(gd);
|
longitudeTF.setLayoutData(gd);
|
||||||
|
@ -537,7 +548,7 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
||||||
floodStageTF = new Text(leftComp, SWT.BORDER);
|
floodStageTF = new Text(leftComp, SWT.BORDER);
|
||||||
floodStageTF.setLayoutData(gd);
|
floodStageTF.setLayoutData(gd);
|
||||||
|
|
||||||
gd = new GridData(50, SWT.DEFAULT);
|
gd = new GridData(95, SWT.DEFAULT);
|
||||||
Label floodStageFlowLbl = new Label(leftComp, SWT.RIGHT);
|
Label floodStageFlowLbl = new Label(leftComp, SWT.RIGHT);
|
||||||
floodStageFlowLbl.setText("Flow:");
|
floodStageFlowLbl.setText("Flow:");
|
||||||
floodStageFlowLbl.setLayoutData(gd);
|
floodStageFlowLbl.setLayoutData(gd);
|
||||||
|
@ -556,7 +567,7 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
||||||
actionStageTF = new Text(leftComp, SWT.BORDER);
|
actionStageTF = new Text(leftComp, SWT.BORDER);
|
||||||
actionStageTF.setLayoutData(gd);
|
actionStageTF.setLayoutData(gd);
|
||||||
|
|
||||||
gd = new GridData(50, SWT.DEFAULT);
|
gd = new GridData(95, SWT.DEFAULT);
|
||||||
Label actionStageFlowLbl = new Label(leftComp, SWT.RIGHT);
|
Label actionStageFlowLbl = new Label(leftComp, SWT.RIGHT);
|
||||||
actionStageFlowLbl.setText("Flow:");
|
actionStageFlowLbl.setText("Flow:");
|
||||||
actionStageFlowLbl.setLayoutData(gd);
|
actionStageFlowLbl.setLayoutData(gd);
|
||||||
|
@ -572,10 +583,19 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
||||||
zeroDatumLbl.setLayoutData(gd);
|
zeroDatumLbl.setLayoutData(gd);
|
||||||
|
|
||||||
gd = new GridData(90, SWT.DEFAULT);
|
gd = new GridData(90, SWT.DEFAULT);
|
||||||
gd.horizontalSpan = 3;
|
|
||||||
zeroDatumTF = new Text(leftComp, SWT.BORDER);
|
zeroDatumTF = new Text(leftComp, SWT.BORDER);
|
||||||
zeroDatumTF.setLayoutData(gd);
|
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
|
// Threshold Runoff
|
||||||
gd = new GridData(SWT.FILL, SWT.CENTER, false, true);
|
gd = new GridData(SWT.FILL, SWT.CENTER, false, true);
|
||||||
Label threasholdRunoffLbl = new Label(leftComp, SWT.RIGHT);
|
Label threasholdRunoffLbl = new Label(leftComp, SWT.RIGHT);
|
||||||
|
@ -583,10 +603,19 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
||||||
threasholdRunoffLbl.setLayoutData(gd);
|
threasholdRunoffLbl.setLayoutData(gd);
|
||||||
|
|
||||||
gd = new GridData(90, SWT.DEFAULT);
|
gd = new GridData(90, SWT.DEFAULT);
|
||||||
gd.horizontalSpan = 3;
|
|
||||||
thresholdRunoffTF = new Text(leftComp, SWT.BORDER);
|
thresholdRunoffTF = new Text(leftComp, SWT.BORDER);
|
||||||
thresholdRunoffTF.setLayoutData(gd);
|
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
|
// Create the right side composite of the
|
||||||
// Geographic/Physical group.
|
// Geographic/Physical group.
|
||||||
|
@ -1017,10 +1046,18 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
||||||
actionStageFlowTF.setText(HydroDataUtils
|
actionStageFlowTF.setText(HydroDataUtils
|
||||||
.getDisplayString(riverGageData.getActionFlow()));
|
.getDisplayString(riverGageData.getActionFlow()));
|
||||||
|
|
||||||
|
// Issuance Stage
|
||||||
|
issuanceStageTF.setText(HydroDataUtils
|
||||||
|
.getDisplayString(riverGageData.getIssuestg()));
|
||||||
|
|
||||||
// Zero Datum
|
// Zero Datum
|
||||||
zeroDatumTF.setText(HydroDataUtils.getDisplayString(riverGageData
|
zeroDatumTF.setText(HydroDataUtils.getDisplayString(riverGageData
|
||||||
.getZeroDatum()));
|
.getZeroDatum()));
|
||||||
|
|
||||||
|
// Issuance Flow
|
||||||
|
issuanceFlowTF.setText(HydroDataUtils
|
||||||
|
.getDisplayString(riverGageData.getIssueflow()));
|
||||||
|
|
||||||
// Threshold Runoff
|
// Threshold Runoff
|
||||||
thresholdRunoffTF.setText(HydroDataUtils
|
thresholdRunoffTF.setText(HydroDataUtils
|
||||||
.getDisplayString(riverGageData.getThresholdRunoff()));
|
.getDisplayString(riverGageData.getThresholdRunoff()));
|
||||||
|
@ -1353,6 +1390,20 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
||||||
.valueOf(HydroConstants.MISSING_VALUE));
|
.valueOf(HydroConstants.MISSING_VALUE));
|
||||||
newData.setUnitHydrographDuration(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
|
// Save the River Gage
|
||||||
try {
|
try {
|
||||||
|
@ -1532,16 +1583,10 @@ public class RiverGageDlg extends CaveSWTDialog implements
|
||||||
* Handles the changes in the Revision Date
|
* Handles the changes in the Revision Date
|
||||||
*/
|
*/
|
||||||
private void updateRevisionDate() {
|
private void updateRevisionDate() {
|
||||||
// If the Revision Checkbox is checked, set the Revision Date to the
|
Calendar now = TimeUtil.newCalendar(TimeZone.getDefault());
|
||||||
// current date in local time
|
String revise_str = new SimpleDateFormat("MM/dd/yyyy").format(now
|
||||||
// Else load the date from the database
|
.getTime());
|
||||||
//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()) {
|
if (reviseChk.getSelection()) {
|
||||||
//dateTF.setText(dateFormat.format(now));
|
|
||||||
dateTF.setText(revise_str);
|
dateTF.setText(revise_str);
|
||||||
} else if (riverGageData != null) {
|
} else if (riverGageData != null) {
|
||||||
dateTF.setText((riverGageData.getReviseDate() != null) ? dateFormat
|
dateTF.setText((riverGageData.getReviseDate() != null) ? dateFormat
|
||||||
|
|
|
@ -38,7 +38,8 @@ import com.raytheon.viz.hydrocommon.HydroConstants;
|
||||||
* Jan 3, 2013 15520 lbousaidi added a dollar-quoted string to getUpdate and
|
* Jan 3, 2013 15520 lbousaidi added a dollar-quoted string to getUpdate and
|
||||||
* getInsert statements to always write literally
|
* getInsert statements to always write literally
|
||||||
* the string content.
|
* 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>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -206,6 +207,16 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
||||||
*/
|
*/
|
||||||
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issuance Stage
|
||||||
|
*/
|
||||||
|
private double issuestg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Issuance Flow
|
||||||
|
*/
|
||||||
|
private double issueflow;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
|
@ -224,32 +235,32 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
||||||
|
|
||||||
setLid(getDBValue("lid", data, dataMap, ""));
|
setLid(getDBValue("lid", data, dataMap, ""));
|
||||||
setPrimaryPE(getDBValue("primary_pe", data, dataMap, ""));
|
setPrimaryPE(getDBValue("primary_pe", data, dataMap, ""));
|
||||||
setBankFull(getDBValue("bf", data, dataMap, Double
|
setBankFull(getDBValue("bf", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setCheckBar(getDBValue("cb", data, dataMap, Double
|
setCheckBar(getDBValue("cb", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setDrainageArea(getDBValue("da", data, dataMap, Double
|
setDrainageArea(getDBValue("da", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setResponseTime(getDBValue("response_time", data, dataMap, Double
|
setResponseTime(getDBValue("response_time", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setThresholdRunoff(getDBValue("threshold_runoff", data, dataMap, Double
|
setThresholdRunoff(getDBValue("threshold_runoff", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setFloodFlow(getDBValue("fq", data, dataMap, Double
|
setFloodFlow(getDBValue("fq", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setFloodStage(getDBValue("fs", data, dataMap, Double
|
setFloodStage(getDBValue("fs", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setGageNumber(getDBValue("gsno", data, dataMap, ""));
|
setGageNumber(getDBValue("gsno", data, dataMap, ""));
|
||||||
setLevel(getDBValue("level", data, dataMap, ""));
|
setLevel(getDBValue("level", data, dataMap, ""));
|
||||||
setRiverMile(getDBValue("mile", data, dataMap, Double
|
setRiverMile(getDBValue("mile", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setPool(getDBValue("pool", data, dataMap, Double
|
setPool(getDBValue("pool", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setPeriodOfRecord(getDBValue("por", data, dataMap, ""));
|
setPeriodOfRecord(getDBValue("por", data, dataMap, ""));
|
||||||
setRated(getDBValue("rated", data, dataMap, ""));
|
setRated(getDBValue("rated", data, dataMap, ""));
|
||||||
setLatitude(getDBValue("lat", data, dataMap, Double
|
setLatitude(getDBValue("lat", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setLongitude(getDBValue("lon", data, dataMap, Double
|
setLongitude(getDBValue("lon", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setRemark(getDBValue("remark", data, dataMap, ""));
|
setRemark(getDBValue("remark", data, dataMap, ""));
|
||||||
setReviseDate(getDBValue("rrevise", data, dataMap, (Date) null));
|
setReviseDate(getDBValue("rrevise", data, dataMap, (Date) null));
|
||||||
setLatLonSource(getDBValue("rsource", data, dataMap, ""));
|
setLatLonSource(getDBValue("rsource", data, dataMap, ""));
|
||||||
|
@ -257,17 +268,21 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
||||||
setTidalEffect(getDBValue("tide", data, dataMap, ""));
|
setTidalEffect(getDBValue("tide", data, dataMap, ""));
|
||||||
setBackWater(getDBValue("backwater", data, dataMap, ""));
|
setBackWater(getDBValue("backwater", data, dataMap, ""));
|
||||||
setVerticalDatum(getDBValue("vdatum", data, dataMap, ""));
|
setVerticalDatum(getDBValue("vdatum", data, dataMap, ""));
|
||||||
setActionFlow(getDBValue("action_flow", data, dataMap, Double
|
setActionFlow(getDBValue("action_flow", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setActionStage(getDBValue("wstg", data, dataMap, Double
|
setActionStage(getDBValue("wstg", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setZeroDatum(getDBValue("zd", data, dataMap, Double
|
setZeroDatum(getDBValue("zd", data, dataMap,
|
||||||
.valueOf(HydroConstants.MISSING_VALUE)));
|
Double.valueOf(HydroConstants.MISSING_VALUE)));
|
||||||
setDateOfRating(getDBValue("ratedat", data, dataMap, (Date) null));
|
setDateOfRating(getDBValue("ratedat", data, dataMap, (Date) null));
|
||||||
setUsgsRateNumber(getDBValue("usgs_ratenum", data, dataMap, ""));
|
setUsgsRateNumber(getDBValue("usgs_ratenum", data, dataMap, ""));
|
||||||
setUnitHydrographDuration(getDBValue("uhgdur", data, dataMap,
|
setUnitHydrographDuration(getDBValue("uhgdur", data, dataMap,
|
||||||
HydroConstants.MISSING_VALUE));
|
HydroConstants.MISSING_VALUE));
|
||||||
setUseLatestForecast(getDBValue("use_latest_fcst", data, dataMap, ""));
|
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() {
|
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,"
|
String columns = "lid, primary_pe, bf, cb, da, response_time, threshold_runoff,"
|
||||||
+ " fq, fs, gsno, level, mile, pool, por, rated, lat, lon, remark, rrevise,"
|
+ " fq, fs, gsno, level, mile, pool, por, rated, lat, lon, remark, rrevise,"
|
||||||
+ " rsource, stream, tide, backwater, vdatum, action_flow, wstg, zd, ratedat,"
|
+ " 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="
|
String query = "SELECT " + columns + " FROM riverstat WHERE lid="
|
||||||
+ getDBString(lid);
|
+ getDBString(lid);
|
||||||
return query;
|
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,"
|
String columns = "lid, primary_pe, bf, cb, da, response_time, threshold_runoff,"
|
||||||
+ " fq, fs, gsno, level, mile, pool, por, rated, lat, lon, remark, rrevise,"
|
+ " fq, fs, gsno, level, mile, pool, por, rated, lat, lon, remark, rrevise,"
|
||||||
+ " rsource, stream, tide, backwater, vdatum, action_flow, wstg, zd, ratedat,"
|
+ " 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
|
String rval = "INSERT INTO riverstat ( " + columns
|
||||||
+ " ) VALUES ( %s, %s, %s, %s, %s, %s, %s,"
|
+ " ) 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, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s )";
|
||||||
|
|
||||||
rval = String.format(rval, getDBString(lid), getDBString(primaryPE),
|
rval = String.format(rval, getDBString(lid), getDBString(primaryPE),
|
||||||
getDBString(bankFull), getDBString(checkBar),
|
getDBString(bankFull), getDBString(checkBar),
|
||||||
|
@ -780,14 +795,16 @@ public class RiverStatData extends HydroDBData implements IHydroDBData {
|
||||||
getDBString(level), getDBString(riverMile), getDBString(pool),
|
getDBString(level), getDBString(riverMile), getDBString(pool),
|
||||||
getDBString(periodOfRecord), getDBString(rated),
|
getDBString(periodOfRecord), getDBString(rated),
|
||||||
getDBString(latitude), getDBString(longitude),
|
getDBString(latitude), getDBString(longitude),
|
||||||
getDBStringNoQuote(remark), getDBString(reviseDate, dateFormat),
|
getDBStringNoQuote(remark),
|
||||||
getDBString(latLonSource), getDBString(stream),
|
getDBString(reviseDate, dateFormat), getDBString(latLonSource),
|
||||||
getDBString(tidalEffect), getDBString(backWater),
|
getDBString(stream), getDBString(tidalEffect),
|
||||||
getDBString(verticalDatum), getDBString(actionFlow),
|
getDBString(backWater), getDBString(verticalDatum),
|
||||||
getDBString(actionStage), getDBString(zeroDatum), getDBString(
|
getDBString(actionFlow), getDBString(actionStage),
|
||||||
dateOfRating, dateFormat), getDBString(usgsRateNumber),
|
getDBString(zeroDatum), getDBString(dateOfRating, dateFormat),
|
||||||
|
getDBString(usgsRateNumber),
|
||||||
getDBString(unitHydrographDuration),
|
getDBString(unitHydrographDuration),
|
||||||
getDBString(useLatestForecast));
|
getDBString(useLatestForecast), getDBString(issuestg),
|
||||||
|
getDBString(issueflow));
|
||||||
|
|
||||||
return rval;
|
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,"
|
String columns = "lid, primary_pe, bf, cb, da, response_time, threshold_runoff,"
|
||||||
+ " fq, fs, gsno, level, mile, pool, por, rated, lat, lon, remark, rrevise,"
|
+ " fq, fs, gsno, level, mile, pool, por, rated, lat, lon, remark, rrevise,"
|
||||||
+ " rsource, stream, tide, backwater, vdatum, action_flow, wstg, zd, ratedat,"
|
+ " 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";
|
String query = "SELECT " + columns + " FROM riverstat";
|
||||||
return query;
|
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,"
|
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,"
|
+ " 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,"
|
+ " 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
|
// Populate the values
|
||||||
rval = String.format(rval, getDBString(lid), getDBString(primaryPE),
|
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(level), getDBString(riverMile), getDBString(pool),
|
||||||
getDBString(periodOfRecord), getDBString(rated),
|
getDBString(periodOfRecord), getDBString(rated),
|
||||||
getDBString(latitude), getDBString(longitude),
|
getDBString(latitude), getDBString(longitude),
|
||||||
getDBStringNoQuote(remark), getDBString(reviseDate, dateFormat),
|
getDBStringNoQuote(remark),
|
||||||
getDBString(latLonSource), getDBString(stream),
|
getDBString(reviseDate, dateFormat), getDBString(latLonSource),
|
||||||
getDBString(tidalEffect), getDBString(backWater),
|
getDBString(stream), getDBString(tidalEffect),
|
||||||
getDBString(verticalDatum), getDBString(actionFlow),
|
getDBString(backWater), getDBString(verticalDatum),
|
||||||
getDBString(actionStage), getDBString(zeroDatum), getDBString(
|
getDBString(actionFlow), getDBString(actionStage),
|
||||||
dateOfRating, dateFormat), getDBString(usgsRateNumber),
|
getDBString(zeroDatum), getDBString(dateOfRating, dateFormat),
|
||||||
|
getDBString(usgsRateNumber),
|
||||||
getDBString(unitHydrographDuration),
|
getDBString(unitHydrographDuration),
|
||||||
getDBString(useLatestForecast), getPKStatement());
|
getDBString(useLatestForecast), getDBString(issuestg),
|
||||||
|
getDBString(issueflow), getPKStatement());
|
||||||
|
|
||||||
return rval;
|
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."
|
||||||
|
|
|
@ -18,12 +18,14 @@
|
||||||
* further licensing information.
|
* further licensing information.
|
||||||
**/
|
**/
|
||||||
package com.raytheon.uf.common.dataplugin.shef.tables;
|
package com.raytheon.uf.common.dataplugin.shef.tables;
|
||||||
|
|
||||||
// default package
|
// default package
|
||||||
// Generated Oct 17, 2008 2:22:17 PM by Hibernate Tools 3.2.2.GA
|
// Generated Oct 17, 2008 2:22:17 PM by Hibernate Tools 3.2.2.GA
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
@ -48,6 +50,7 @@ import javax.persistence.TemporalType;
|
||||||
* Oct 17, 2008 Initial generation by hbm2java
|
* Oct 17, 2008 Initial generation by hbm2java
|
||||||
* Aug 19, 2011 10672 jkorman Move refactor to new project
|
* Aug 19, 2011 10672 jkorman Move refactor to new project
|
||||||
* Oct 07, 2013 2361 njensen Removed XML annotations
|
* Oct 07, 2013 2361 njensen Removed XML annotations
|
||||||
|
* May 15, 2015 4380 skorolev Add new issuestg and issueflow fields.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +60,9 @@ import javax.persistence.TemporalType;
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "riverstat")
|
@Table(name = "riverstat")
|
||||||
@com.raytheon.uf.common.serialization.annotations.DynamicSerialize
|
@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;
|
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
|
@com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement
|
||||||
private Set<Hgstation> hgstations = new HashSet<Hgstation>(0);
|
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() {
|
public Riverstat() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +239,7 @@ public class Riverstat extends com.raytheon.uf.common.dataplugin.persist.Persist
|
||||||
Set<Fcstptservice> fcstptservices, Set<Lowwater> lowwaters,
|
Set<Fcstptservice> fcstptservices, Set<Lowwater> lowwaters,
|
||||||
Set<Crest> crests, Set<Floodstmt> floodstmts, Set<Pub> pubs,
|
Set<Crest> crests, Set<Floodstmt> floodstmts, Set<Pub> pubs,
|
||||||
Set<Descrip> descrips, Set<Unitgraph> unitgraphs,
|
Set<Descrip> descrips, Set<Unitgraph> unitgraphs,
|
||||||
Set<Hgstation> hgstations) {
|
Set<Hgstation> hgstations, Double issuestg, Double issueflow) {
|
||||||
this.lid = lid;
|
this.lid = lid;
|
||||||
this.location = location;
|
this.location = location;
|
||||||
this.primaryPe = primaryPe;
|
this.primaryPe = primaryPe;
|
||||||
|
@ -277,6 +288,8 @@ public class Riverstat extends com.raytheon.uf.common.dataplugin.persist.Persist
|
||||||
this.descrips = descrips;
|
this.descrips = descrips;
|
||||||
this.unitgraphs = unitgraphs;
|
this.unitgraphs = unitgraphs;
|
||||||
this.hgstations = hgstations;
|
this.hgstations = hgstations;
|
||||||
|
this.issuestg = issuestg;
|
||||||
|
this.issueflow = issueflow;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
|
@ -715,4 +728,20 @@ public class Riverstat extends com.raytheon.uf.common.dataplugin.persist.Persist
|
||||||
this.hgstations = hgstations;
|
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