Issue #1869 Revert changes to bufrmos types used by ncep.

Former-commit-id: b4d305a294 [formerly 507ce28888] [formerly 62b85f3afe] [formerly b4d305a294 [formerly 507ce28888] [formerly 62b85f3afe] [formerly dd320f2a56 [formerly 62b85f3afe [formerly 71808a9d82233a395c5e5a394b0708b07405f553]]]]
Former-commit-id: dd320f2a56
Former-commit-id: ba431afe94 [formerly 884922687e] [formerly 2e8fafbd0cebabab9a93928b43dce63087f74a5a [formerly 27b0b4a289]]
Former-commit-id: db209fe116e60bf2d98255a94ca37075cceafab8 [formerly 7ce819184a]
Former-commit-id: 1846170387
This commit is contained in:
Ben Steffensmeier 2013-05-15 11:45:51 -05:00
parent a01285caea
commit 303f78c36c
6 changed files with 62 additions and 37 deletions

View file

@ -8,7 +8,7 @@ PSQL="/awips2/psql/bin/psql"
# drops the datauri constraint and column if they exist
function dropDatauri {
echo "INFO: Dropping DataURI column from $1"
${PSQL} -U awips -d metadata -c "ALTER TABLE $1 CONSTRAINT IF EXISTS ${1}_datauri_key;"
${PSQL} -U awips -d metadata -c "ALTER TABLE $1 DROP CONSTRAINT IF EXISTS ${1}_datauri_key;"
${PSQL} -U awips -d metadata -c "ALTER TABLE $1 DROP COLUMN IF EXISTS datauri;"
if [ $? -ne 0 ]; then
echo "ERROR: Failed to drop dataURI column for $table"
@ -30,17 +30,14 @@ function dropDatauriAndAddConstraint {
echo "FATAL: The update has failed."
exit 1
fi
${PSQL} -U awips -d metadata -c "VACUUM FULL $1"
}
echo "INFO: Dropping dataURI columns."
dropDatauri gfe
${PSQL} -U awips -d metadata -c "VACUUM FULL gfe"
dropDatauriAndAddConstraint bufrmosavn bufrmosavn_location_id_reftime_forecasttime_key "(location_id, reftime, forecasttime)"
dropDatauriAndAddConstraint bufrmoseta bufrmoseta_location_id_reftime_forecasttime_key "(location_id, reftime, forecasttime)"
dropDatauriAndAddConstraint bufrmosgfs bufrmosgfs_location_id_reftime_forecasttime_key "(location_id, reftime, forecasttime)"
dropDatauriAndAddConstraint bufrmoshpc bufrmoshpc_location_id_reftime_forecasttime_key "(location_id, reftime, forecasttime)"
dropDatauriAndAddConstraint bufrmoslamp bufrmoslamp_location_id_reftime_forecasttime_key "(location_id, reftime, forecasttime)"
dropDatauriAndAddConstraint bufrmosmrf bufrmosmrf_location_id_reftime_forecasttime_key "(location_id, reftime, forecasttime)"
dropDatauriAndAddConstraint bufrmosngm bufrmosngm_location_id_reftime_forecasttime_key "(location_id, reftime, forecasttime)"
echo "INFO: dataURI columns dropped successfully"

View file

@ -19,6 +19,9 @@
**/
package com.raytheon.edex.plugin.bufrmos.common;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@ -42,12 +45,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 25, 2011 rjpeter Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
*
* </pre>
*
@ -56,8 +57,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
*/
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosEtaseq")
@Table(name = "bufrmosEta", uniqueConstraints = { @UniqueConstraint(columnNames = {
"location_id", "refTime", "forecastTime" }) })
@Table(name = "bufrmosEta", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
/*
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
@ -77,4 +77,11 @@ public class BufrMosEtaData extends BufrMosData {
return MOSType.ETA;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
}

View file

@ -19,6 +19,9 @@
**/
package com.raytheon.edex.plugin.bufrmos.common;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@ -42,12 +45,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 25, 2011 rjpeter Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
*
* </pre>
*
@ -56,8 +57,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
*/
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosGfsseq")
@Table(name = "bufrmosGfs", uniqueConstraints = { @UniqueConstraint(columnNames = {
"location_id", "refTime", "forecastTime" }) })
@Table(name = "bufrmosGfs", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
/*
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
@ -77,4 +77,10 @@ public class BufrMosGfsData extends BufrMosData {
return MOSType.GFS;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
}

View file

@ -19,6 +19,9 @@
**/
package com.raytheon.edex.plugin.bufrmos.common;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@ -42,12 +45,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 25, 2011 rjpeter Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
*
* </pre>
*
@ -56,8 +57,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
*/
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosLampseq")
@Table(name = "bufrmosLamp", uniqueConstraints = { @UniqueConstraint(columnNames = {
"location_id", "refTime", "forecastTime" }) })
@Table(name = "bufrmosLamp", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
/*
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
@ -76,5 +76,10 @@ public class BufrMosLampData extends BufrMosData {
public MOSType getType() {
return MOSType.LAMP;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
}

View file

@ -19,6 +19,9 @@
**/
package com.raytheon.edex.plugin.bufrmos.common;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@ -42,12 +45,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 25, 2011 rjpeter Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
*
* </pre>
*
@ -56,8 +57,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
*/
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosMrfseq")
@Table(name = "bufrmosMrf", uniqueConstraints = { @UniqueConstraint(columnNames = {
"location_id", "refTime", "forecastTime" }) })
@Table(name = "bufrmosMrf", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
/*
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
@ -76,5 +76,10 @@ public class BufrMosMrfData extends BufrMosData {
public MOSType getType() {
return MOSType.MRF;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
}

View file

@ -19,6 +19,9 @@
**/
package com.raytheon.edex.plugin.bufrmos.common;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
@ -42,12 +45,10 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 25, 2011 rjpeter Initial creation
* Apr 04, 2013 1846 bkowal Added an index on refTime and
* forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
*
* </pre>
*
@ -56,8 +57,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
*/
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosNgmseq")
@Table(name = "bufrmosNgm", uniqueConstraints = { @UniqueConstraint(columnNames = {
"location_id", "refTime", "forecastTime" }) })
@Table(name = "bufrmosNgm", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
/*
* Both refTime and forecastTime are included in the refTimeIndex since
* forecastTime is unlikely to be used.
@ -76,5 +76,10 @@ public class BufrMosNgmData extends BufrMosData {
public MOSType getType() {
return MOSType.NGM;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
}