Merge "Omaha #4360 DataURI changes for table bufrssmi." into omaha_16.2.1
Former-commit-id: c9cdcebb25e351dba9603741420569b21fa8a0ed
This commit is contained in:
commit
c489e96c58
2 changed files with 28 additions and 4 deletions
21
deltaScripts/16.1.2/DR4360/alterBufrssmiDataURI.sh
Executable file
21
deltaScripts/16.1.2/DR4360/alterBufrssmiDataURI.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# DR #4360 - this update script will alter the dataURI columns from bufrssmi
|
||||||
|
|
||||||
|
PSQL="/awips2/psql/bin/psql"
|
||||||
|
|
||||||
|
cmdDir=`dirname $0`
|
||||||
|
|
||||||
|
source ${cmdDir}/commonFunctions.sh
|
||||||
|
table=bufrssmi
|
||||||
|
|
||||||
|
# table and constraint names form BufrMTHDWObs.
|
||||||
|
echo "INFO: Start update of ${table} dataURI columns."
|
||||||
|
renameConstraint ${table} uk_${table}_datauri_fields
|
||||||
|
|
||||||
|
col=satid
|
||||||
|
echo "INFO: Update ${table}'s ${col}"
|
||||||
|
# The IDecoderConstants.VAL_MISSING used by SSMIDataAdapter.
|
||||||
|
${PSQL} -U awips -d metadata -c "UPDATE ${table} SET ${col}=-9999998 where ${col} is NULL ; "
|
||||||
|
updateNotNullCol ${table} ${col}
|
||||||
|
|
||||||
|
echo "INFO: ${table} dataURI columns updated successfully"
|
|
@ -63,6 +63,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
||||||
* types.
|
* types.
|
||||||
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
|
||||||
* May 12, 2014 3133 njensen Use TimeUtil instead of TimeTools
|
* May 12, 2014 3133 njensen Use TimeUtil instead of TimeTools
|
||||||
|
* Jul 17, 2015 4360 rferrel Named unique constraint and satIde no longer nullable.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -71,7 +72,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrssmiseq")
|
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrssmiseq")
|
||||||
@Table(name = "bufrssmi", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
@Table(name = "bufrssmi", uniqueConstraints = { @UniqueConstraint(name = "uk_bufrssmi_datauri_fields", columnNames = {
|
||||||
"stationid", "refTime", "satId", "latitude", "longitude" }) })
|
"stationid", "refTime", "satId", "latitude", "longitude" }) })
|
||||||
/*
|
/*
|
||||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||||
|
@ -86,10 +87,12 @@ public class SSMIScanData extends PersistablePluginDataObject implements
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@DataURI(position = 1)
|
@DataURI(position = 1)
|
||||||
|
@Column(nullable = false)
|
||||||
@XmlAttribute
|
@XmlAttribute
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
private Integer satId;
|
private int satId;
|
||||||
|
|
||||||
|
// TODO Update once SurfaceObsLocation DataURI's are corrected.
|
||||||
@Embedded
|
@Embedded
|
||||||
@DataURI(position = 2, embedded = true)
|
@DataURI(position = 2, embedded = true)
|
||||||
@DynamicSerializeElement
|
@DynamicSerializeElement
|
||||||
|
@ -188,7 +191,7 @@ public class SSMIScanData extends PersistablePluginDataObject implements
|
||||||
/**
|
/**
|
||||||
* @return the satId
|
* @return the satId
|
||||||
*/
|
*/
|
||||||
public Integer getSatId() {
|
public int getSatId() {
|
||||||
return satId;
|
return satId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +199,7 @@ public class SSMIScanData extends PersistablePluginDataObject implements
|
||||||
* @param satId
|
* @param satId
|
||||||
* the satId to set
|
* the satId to set
|
||||||
*/
|
*/
|
||||||
public void setSatId(Integer satId) {
|
public void setSatId(int satId) {
|
||||||
this.satId = satId;
|
this.satId = satId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue