Issue #2275 Add dataURI column back into bufrmos types.

Former-commit-id: 1b883da972ac915252c256b63c881d23121f3ac6
This commit is contained in:
Ben Steffensmeier 2013-08-19 15:59:54 -05:00
parent bc8af6e701
commit 4cb853ac39
3 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,22 @@
#!/bin/bash
# DR #2275 - this script is needd to add the dataURI column back into the
# bufrmosavn and bufrmoshpc tables.
PSQL="/awips2/psql/bin/psql"
${PSQL} -U awips -d metadata -c "ALTER TABLE bufrmosavn ADD COLUMN datauri character varying(255);"
if [ $? -ne 0 ]; then
echo "ERROR: Failed to drop dataURI column for bufrmosavn"
echo "FATAL: The update has failed."
exit 1
fi
${PSQL} -U awips -d metadata -c "ALTER TABLE bufrmoshpc ADD COLUMN datauri character varying(255);"
if [ $? -ne 0 ]; then
echo "ERROR: Failed to add dataURI column for bufrmoshpc"
echo "FATAL: The update has failed."
exit 1
fi
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE bufrmosavn"
${PSQL} -U awips -d metadata -c "VACUUM FULL ANALYZE bufrmoshpc"
echo "INFO: dataURI columns added successfully"

View file

@ -19,6 +19,9 @@
**/ **/
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;
@ -48,6 +51,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* 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. * May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
* Aug 19, 2013 2275 bsteffen Add dataURI column back into bufrmos
* types.
* *
* </pre> * </pre>
* *
@ -77,4 +82,11 @@ public class BufrMosAvnData extends BufrMosData {
return MOSType.AVN; return MOSType.AVN;
} }
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
} }

View file

@ -19,6 +19,9 @@
**/ **/
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;
@ -48,6 +51,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
* 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. * May 14, 2013 1869 bsteffen Remove DataURI column from bufrmos.
* Aug 19, 2013 2275 bsteffen Add dataURI column back into bufrmos
* types.
* *
* </pre> * </pre>
* *
@ -77,4 +82,11 @@ public class BufrMosHpcData extends BufrMosData {
return MOSType.HPC; return MOSType.HPC;
} }
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
} }