Merge "Issue #2616 - Set overwrite allowed flag on madis records when decoded Added delta script for table MADIS with the hibernate generated key name" into omaha_14.2.1

Former-commit-id: 6f57e14406 [formerly 3d887a288459b786718a59d0c4a368408c3419f0]
Former-commit-id: 63bd2b26eb
This commit is contained in:
Richard Peter 2013-12-11 16:19:02 -06:00 committed by Gerrit Code Review
commit f278dad7cc
4 changed files with 12 additions and 1 deletions

View file

@ -0,0 +1,3 @@
alter table madis drop constraint madis_location_reftime_provider_subprovider_restriction_key;
alter table madis add constraint madis_location_stationid_reftime_provider_subprovider_restr_key UNIQUE (location, stationid, reftime, provider, subprovider, restriction)

View file

@ -0,0 +1,5 @@
#!/bin/bash
PSQL=/awips2/psql/bin/psql
DIR=`dirname $0`
${PSQL} -U awips -d metadata -f ${DIR}/updateMadisTableConstraint.sql

View file

@ -73,6 +73,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Jul 14, 2013 2180 dhladky GUI update for mouse over display
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Oct 14, 2013 2361 njensen Removed IDecoderGettable
* Dec 10, 2013 2616 mpduff Added stationId to the unique constraint
*
* </pre>
*
@ -83,7 +84,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@Entity
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "madisseq")
@Table(name = "madis", uniqueConstraints = { @UniqueConstraint(columnNames = {
"location", "refTime", "provider", "subProvider", "restriction" }) })
"location", "stationId", "refTime", "provider", "subProvider", "restriction" }) })
@org.hibernate.annotations.Table(appliesTo = "madis", indexes = { @Index(name = "madis_wfsQueryIndex", columnNames = {
"refTime", "location" }), })
@DynamicSerialize

View file

@ -55,6 +55,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Mar 27, 2013 1746 dhladky Initial creation
* Jun 17, 2013 2113 dhladky QPID memory usage alleviation
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Dec 10, 2013 2616 mpduff Set overwrite allowed on MadisRecord.
* </pre>
*
* @author dhladky
@ -140,6 +141,7 @@ public class MadisDecoder extends AbstractDecoder {
long time3 = System.currentTimeMillis();
MadisRecord rec = processMadis(headerType, line);
rec.setOverwriteAllowed(true);
long time4 = System.currentTimeMillis();
statusHandler.handle(Priority.DEBUG,
"MADIS record decode time: " + (time4 - time3)