awips2/edexOsgi/com.raytheon.uf.common.stats/src/com/raytheon/uf/common/stats/StatsGroupingColumn.java
Dustin Johnson ecb1d5564a Issue #1487 Use XML to store stats grouping information in the database
Amend:
  Increase length of grouping column to 1024.
  Add deltaScript to convert the grouping column to xml.
  Change regex to replace any pluginName fields with dashes, not just satellite-mcidas.

Change-Id: I0d5081645c5f11909e5778c8e555d5da3cf77e1a

Former-commit-id: c12b46027f [formerly b627dfc054] [formerly 19d3a14d4f [formerly 38ecb1f36dce4717d0ba9066c8cd22116770d34b]]
Former-commit-id: 19d3a14d4f
Former-commit-id: c750e27389
2013-01-16 12:21:11 -06:00

87 lines
2.3 KiB
Java

/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.common.stats;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import com.google.common.collect.Lists;
/**
* Contains a list of groupings for statistics.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jan 15, 2013 1487 djohnson Initial creation
*
* </pre>
*
* @author djohnson
* @version 1.0
*/
@XmlRootElement(name = "stat")
@XmlAccessorType(XmlAccessType.NONE)
public class StatsGroupingColumn {
@XmlElement
private List<StatsGrouping> group = Lists.newArrayList();
/**
* @return the group
*/
public List<StatsGrouping> getGroup() {
return group;
}
/**
* @param group
* the group to set
*/
public void setGroup(List<StatsGrouping> group) {
this.group = group;
}
/**
* Create a {@link StatsGroupingColumn} to hold the specified
* {@link StatsGrouping} instances.
*
* @param statsGroupings
* the groupings
* @return the column
*/
public static StatsGroupingColumn withGroupings(
StatsGrouping... statsGroupings) {
StatsGroupingColumn column = new StatsGroupingColumn();
for (StatsGrouping grouping : statsGroupings) {
column.group.add(grouping);
}
return column;
}
}