Issue #1869 Remove DataURI column from bufrmos.
Change-Id: Ic1a25588a45c2dc8a1a089332a4d6a33c41e205e Former-commit-id: 5b740e5d614d9cac2476335a0754ccd0e1185c84
This commit is contained in:
parent
44cfe00b5e
commit
fabbc29fe8
11 changed files with 89 additions and 166 deletions
|
@ -4,16 +4,43 @@
|
||||||
|
|
||||||
PSQL="/awips2/psql/bin/psql"
|
PSQL="/awips2/psql/bin/psql"
|
||||||
|
|
||||||
echo "INFO: Dropping dataURI columns."
|
# takes one arg: a table name
|
||||||
|
# drops the datauri constraint and column if they exist
|
||||||
# TODO this script will need to be extended for unique constraint.
|
function dropDatauri {
|
||||||
for table in gfe;
|
echo "INFO: Dropping DataURI column from $1"
|
||||||
do
|
${PSQL} -U awips -d metadata -c "ALTER TABLE $1 CONSTRAINT IF EXISTS ${1}_datauri_key;"
|
||||||
echo "INFO: Dropping DataURI column from $table"
|
${PSQL} -U awips -d metadata -c "ALTER TABLE $1 DROP COLUMN IF EXISTS datauri;"
|
||||||
${PSQL} -U awips -d metadata -c "ALTER TABLE $table DROP COLUMN IF EXISTS datauri;"
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "ERROR: Failed to drop dataURI column for $table"
|
echo "ERROR: Failed to drop dataURI column for $table"
|
||||||
echo "FATAL: The update has failed."
|
echo "FATAL: The update has failed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
}
|
||||||
|
|
||||||
|
# takes three args: table, constraint name, unique columns
|
||||||
|
# will first drop the constraint if it exists and then adds it back, this is
|
||||||
|
# fairly inefficient if it does exist but operationally it won't exist and for
|
||||||
|
# testing this allows the script to be run easily as a noop.
|
||||||
|
function dropDatauriAndAddConstraint {
|
||||||
|
dropDatauri $1
|
||||||
|
${PSQL} -U awips -d metadata -c "ALTER TABLE $1 DROP CONSTRAINT IF EXISTS $2;"
|
||||||
|
${PSQL} -U awips -d metadata -c "ALTER TABLE $1 ADD CONSTRAINT $2 UNIQUE $3;"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "ERROR: Failed to add new unique constraint for $table"
|
||||||
|
echo "FATAL: The update has failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "INFO: Dropping dataURI columns."
|
||||||
|
|
||||||
|
dropDatauri 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"
|
||||||
|
|
8
edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/BufrMosDecoder.java
Executable file → Normal file
8
edexOsgi/com.raytheon.edex.plugin.bufrmos/src/com/raytheon/edex/plugin/bufrmos/BufrMosDecoder.java
Executable file → Normal file
|
@ -52,9 +52,10 @@ import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080221 862 jkorman Initial Coding.
|
* Feb 21, 2008 862 jkorman Initial Coding.
|
||||||
* 20080408 1039 jkorman Added traceId for tracing data.
|
* Apr 08, 2008 1039 jkorman Added traceId for tracing data.
|
||||||
* 12/08/08 chammack Camel Refactor
|
* Dec 08, 2008 chammack Camel Refactor
|
||||||
|
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author jkorman
|
* @author jkorman
|
||||||
|
@ -109,7 +110,6 @@ public class BufrMosDecoder extends AbstractDecoder {
|
||||||
if (fcstData != null) {
|
if (fcstData != null) {
|
||||||
fcstData.setTraceId(traceId);
|
fcstData.setTraceId(traceId);
|
||||||
fcstData.setPersistenceTime(new Date());
|
fcstData.setPersistenceTime(new Date());
|
||||||
fcstData.constructDataURI();
|
|
||||||
pdoList.add(fcstData);
|
pdoList.add(fcstData);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
@ -19,9 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.bufrmos.common;
|
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.Entity;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
@ -45,10 +42,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 25, 2011 rjpeter Initial creation
|
* May 25, 2011 rjpeter Initial creation
|
||||||
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
|
* Apr 04, 2013 1846 bkowal Added an index on refTime and
|
||||||
|
* forecastTime
|
||||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||||
* PluginDataObject.
|
* PluginDataObject.
|
||||||
|
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +56,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosAvnseq")
|
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosAvnseq")
|
||||||
@Table(name = "bufrmosAvn", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
@Table(name = "bufrmosAvn", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
||||||
|
"location_id", "refTime", "forecastTime" }) })
|
||||||
/*
|
/*
|
||||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||||
* forecastTime is unlikely to be used.
|
* forecastTime is unlikely to be used.
|
||||||
|
@ -77,11 +77,4 @@ public class BufrMosAvnData extends BufrMosData {
|
||||||
return MOSType.AVN;
|
return MOSType.AVN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Column
|
|
||||||
@Access(AccessType.PROPERTY)
|
|
||||||
public String getDataURI() {
|
|
||||||
return super.getDataURI();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.bufrmos.common;
|
package com.raytheon.edex.plugin.bufrmos.common;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import javax.persistence.CascadeType;
|
import javax.persistence.CascadeType;
|
||||||
import javax.persistence.Embedded;
|
import javax.persistence.Embedded;
|
||||||
import javax.persistence.Inheritance;
|
import javax.persistence.Inheritance;
|
||||||
|
@ -36,7 +34,6 @@ import javax.xml.bind.annotation.XmlAttribute;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
|
|
||||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||||
import com.raytheon.uf.common.dataplugin.annotations.DataURIConfig;
|
import com.raytheon.uf.common.dataplugin.annotations.DataURIConfig;
|
||||||
|
@ -56,11 +53,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
*
|
*
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* 20080221 862 jkorman Initial Coding.
|
* Feb 21, 2008 862 jkorman Initial Coding.
|
||||||
* 02/06/09 1990 bphillip removed populateDataStore method
|
* Feb 06, 2009 1990 bphillip removed populateDataStore method
|
||||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||||
* May 02, 2013 1970 bgonzale Removed Table annotation, changed from Entity
|
* May 02, 2013 1970 bgonzale Removed Table annotation, changed from
|
||||||
* annotation to MappedSuperClass.
|
* Entity annotation to MappedSuperClass.
|
||||||
|
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -75,7 +73,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||||
@DynamicSerialize
|
@DynamicSerialize
|
||||||
@DataURIConfig(persistentIndex = 2)
|
@DataURIConfig(persistentIndex = 2)
|
||||||
public abstract class BufrMosData extends PersistablePluginDataObject implements
|
public abstract class BufrMosData extends PersistablePluginDataObject implements
|
||||||
IDecoderGettable, IPersistable, IPointData {
|
IPersistable, IPointData {
|
||||||
|
|
||||||
public static enum MOSType {
|
public static enum MOSType {
|
||||||
ETA, GFS, AVN, LAMP, HPC, MRF, NGM
|
ETA, GFS, AVN, LAMP, HPC, MRF, NGM
|
||||||
|
@ -178,62 +176,6 @@ public abstract class BufrMosData extends PersistablePluginDataObject implements
|
||||||
identifier = dataURI;
|
identifier = dataURI;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see com.raytheon.uf.common.dataplugin.PluginDataObject#getDecoderGettable()
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public IDecoderGettable getDecoderGettable() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see com.raytheon.uf.common.dataplugin.IDecoderGettable#getString(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String getString(String paramName) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see com.raytheon.uf.common.dataplugin.IDecoderGettable#getStrings(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public String[] getStrings(String paramName) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see com.raytheon.uf.common.dataplugin.IDecoderGettable#getValue(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Amount getValue(String paramName) {
|
|
||||||
|
|
||||||
Amount retValue = null;
|
|
||||||
|
|
||||||
// Object element = elementMap.get(paramName);
|
|
||||||
// TODO:
|
|
||||||
// if (element != null) {
|
|
||||||
// Unit<?> units = BUFRTableB.mapUnits(element.getUnits());
|
|
||||||
// if (units != null) {
|
|
||||||
// if ("FLOAT".equals(element.getElementType())) {
|
|
||||||
// retValue = new Amount(element.getDoubleVal(), units);
|
|
||||||
// } else if ("INTEGER".equals(element.getElementType())) {
|
|
||||||
// retValue = new Amount(element.getIntegerVal(), units);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
return retValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see com.raytheon.uf.common.dataplugin.IDecoderGettable#getValues(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Collection<Amount> getValues(String paramName) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BufrMosDataLocation getLocation() {
|
public BufrMosDataLocation getLocation() {
|
||||||
return location;
|
return location;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.bufrmos.common;
|
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.Entity;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
@ -45,10 +42,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 25, 2011 rjpeter Initial creation
|
* May 25, 2011 rjpeter Initial creation
|
||||||
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
|
* Apr 04, 2013 1846 bkowal Added an index on refTime and
|
||||||
|
* forecastTime
|
||||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||||
* PluginDataObject.
|
* PluginDataObject.
|
||||||
|
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +56,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosEtaseq")
|
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosEtaseq")
|
||||||
@Table(name = "bufrmosEta", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
@Table(name = "bufrmosEta", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
||||||
|
"location_id", "refTime", "forecastTime" }) })
|
||||||
/*
|
/*
|
||||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||||
* forecastTime is unlikely to be used.
|
* forecastTime is unlikely to be used.
|
||||||
|
@ -77,11 +77,4 @@ public class BufrMosEtaData extends BufrMosData {
|
||||||
return MOSType.ETA;
|
return MOSType.ETA;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Column
|
|
||||||
@Access(AccessType.PROPERTY)
|
|
||||||
public String getDataURI() {
|
|
||||||
return super.getDataURI();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.bufrmos.common;
|
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.Entity;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
@ -45,10 +42,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 25, 2011 rjpeter Initial creation
|
* May 25, 2011 rjpeter Initial creation
|
||||||
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
|
* Apr 04, 2013 1846 bkowal Added an index on refTime and
|
||||||
|
* forecastTime
|
||||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||||
* PluginDataObject.
|
* PluginDataObject.
|
||||||
|
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +56,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosGfsseq")
|
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosGfsseq")
|
||||||
@Table(name = "bufrmosGfs", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
@Table(name = "bufrmosGfs", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
||||||
|
"location_id", "refTime", "forecastTime" }) })
|
||||||
/*
|
/*
|
||||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||||
* forecastTime is unlikely to be used.
|
* forecastTime is unlikely to be used.
|
||||||
|
@ -77,10 +77,4 @@ public class BufrMosGfsData extends BufrMosData {
|
||||||
return MOSType.GFS;
|
return MOSType.GFS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Column
|
|
||||||
@Access(AccessType.PROPERTY)
|
|
||||||
public String getDataURI() {
|
|
||||||
return super.getDataURI();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.bufrmos.common;
|
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.Entity;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
@ -45,10 +42,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 25, 2011 rjpeter Initial creation
|
* May 25, 2011 rjpeter Initial creation
|
||||||
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
|
* Apr 04, 2013 1846 bkowal Added an index on refTime and
|
||||||
|
* forecastTime
|
||||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||||
* PluginDataObject.
|
* PluginDataObject.
|
||||||
|
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +56,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosHpcseq")
|
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosHpcseq")
|
||||||
@Table(name = "bufrmosHpc", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
@Table(name = "bufrmosHpc", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
||||||
|
"location_id", "refTime", "forecastTime" }) })
|
||||||
/*
|
/*
|
||||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||||
* forecastTime is unlikely to be used.
|
* forecastTime is unlikely to be used.
|
||||||
|
@ -76,10 +76,5 @@ public class BufrMosHpcData extends BufrMosData {
|
||||||
public MOSType getType() {
|
public MOSType getType() {
|
||||||
return MOSType.HPC;
|
return MOSType.HPC;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
@Column
|
|
||||||
@Access(AccessType.PROPERTY)
|
|
||||||
public String getDataURI() {
|
|
||||||
return super.getDataURI();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.bufrmos.common;
|
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.Entity;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
@ -45,10 +42,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 25, 2011 rjpeter Initial creation
|
* May 25, 2011 rjpeter Initial creation
|
||||||
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
|
* Apr 04, 2013 1846 bkowal Added an index on refTime and
|
||||||
|
* forecastTime
|
||||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||||
* PluginDataObject.
|
* PluginDataObject.
|
||||||
|
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +56,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosLampseq")
|
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosLampseq")
|
||||||
@Table(name = "bufrmosLamp", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
@Table(name = "bufrmosLamp", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
||||||
|
"location_id", "refTime", "forecastTime" }) })
|
||||||
/*
|
/*
|
||||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||||
* forecastTime is unlikely to be used.
|
* forecastTime is unlikely to be used.
|
||||||
|
@ -76,10 +76,5 @@ public class BufrMosLampData extends BufrMosData {
|
||||||
public MOSType getType() {
|
public MOSType getType() {
|
||||||
return MOSType.LAMP;
|
return MOSType.LAMP;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
@Column
|
|
||||||
@Access(AccessType.PROPERTY)
|
|
||||||
public String getDataURI() {
|
|
||||||
return super.getDataURI();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.bufrmos.common;
|
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.Entity;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
@ -45,10 +42,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 25, 2011 rjpeter Initial creation
|
* May 25, 2011 rjpeter Initial creation
|
||||||
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
|
* Apr 04, 2013 1846 bkowal Added an index on refTime and
|
||||||
|
* forecastTime
|
||||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||||
* PluginDataObject.
|
* PluginDataObject.
|
||||||
|
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +56,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosMrfseq")
|
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosMrfseq")
|
||||||
@Table(name = "bufrmosMrf", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
@Table(name = "bufrmosMrf", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
||||||
|
"location_id", "refTime", "forecastTime" }) })
|
||||||
/*
|
/*
|
||||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||||
* forecastTime is unlikely to be used.
|
* forecastTime is unlikely to be used.
|
||||||
|
@ -76,10 +76,5 @@ public class BufrMosMrfData extends BufrMosData {
|
||||||
public MOSType getType() {
|
public MOSType getType() {
|
||||||
return MOSType.MRF;
|
return MOSType.MRF;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
@Column
|
|
||||||
@Access(AccessType.PROPERTY)
|
|
||||||
public String getDataURI() {
|
|
||||||
return super.getDataURI();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,6 @@
|
||||||
**/
|
**/
|
||||||
package com.raytheon.edex.plugin.bufrmos.common;
|
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.Entity;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
@ -45,10 +42,12 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* May 25, 2011 rjpeter Initial creation
|
* May 25, 2011 rjpeter Initial creation
|
||||||
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
|
* Apr 04, 2013 1846 bkowal Added an index on refTime and
|
||||||
|
* forecastTime
|
||||||
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
|
||||||
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
* May 07, 2013 1869 bsteffen Remove dataURI column from
|
||||||
* PluginDataObject.
|
* PluginDataObject.
|
||||||
|
* May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -57,7 +56,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosNgmseq")
|
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "bufrmosNgmseq")
|
||||||
@Table(name = "bufrmosNgm", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) })
|
@Table(name = "bufrmosNgm", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
||||||
|
"location_id", "refTime", "forecastTime" }) })
|
||||||
/*
|
/*
|
||||||
* Both refTime and forecastTime are included in the refTimeIndex since
|
* Both refTime and forecastTime are included in the refTimeIndex since
|
||||||
* forecastTime is unlikely to be used.
|
* forecastTime is unlikely to be used.
|
||||||
|
@ -76,10 +76,5 @@ public class BufrMosNgmData extends BufrMosData {
|
||||||
public MOSType getType() {
|
public MOSType getType() {
|
||||||
return MOSType.NGM;
|
return MOSType.NGM;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
@Column
|
|
||||||
@Access(AccessType.PROPERTY)
|
|
||||||
public String getDataURI() {
|
|
||||||
return super.getDataURI();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,6 @@ import org.hibernate.annotations.Index;
|
||||||
import org.hibernate.annotations.OnDelete;
|
import org.hibernate.annotations.OnDelete;
|
||||||
import org.hibernate.annotations.OnDeleteAction;
|
import org.hibernate.annotations.OnDeleteAction;
|
||||||
|
|
||||||
import com.raytheon.uf.common.dataplugin.IDecoderGettable;
|
|
||||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||||
import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory;
|
import com.raytheon.uf.common.dataplugin.gfe.GridDataHistory;
|
||||||
|
@ -193,11 +192,6 @@ public class GFERecord extends PluginDataObject {
|
||||||
super(uri);
|
super(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public IDecoderGettable getDecoderGettable() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setGridHistory(GridDataHistory[] history) {
|
public void setGridHistory(GridDataHistory[] history) {
|
||||||
setGridHistory(Arrays.asList(history));
|
setGridHistory(Arrays.asList(history));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue