Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * This program is free software; you can redistribute it and/or modify it under the
   * terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software
   * Foundation.
   *
   * You should have received a copy of the GNU Lesser General Public License along with this
   * program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
   * or from the Free Software Foundation, Inc.,
   * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  * See the GNU Lesser General Public License for more details.
  *
  * Copyright (c) 2006 - 2009 Pentaho Corporation..  All rights reserved.
  */
 package org.pentaho.pms.schema.concept.types.aggregation;
 

Deprecated:
as of metadata 3.0. please use org.pentaho.metadata.model.concept.types.AggregationType
 
 public class AggregationSettings
 {
     public static final int TYPE_AGGREGATION_NONE           = 0;
     public static final int TYPE_AGGREGATION_SUM            = 1;
     public static final int TYPE_AGGREGATION_AVERAGE        = 2;
     public static final int TYPE_AGGREGATION_COUNT          = 3;
     public static final int TYPE_AGGREGATION_COUNT_DISTINCT = 4;
     public static final int TYPE_AGGREGATION_MINIMUM        = 5;
     public static final int TYPE_AGGREGATION_MAXIMUM        = 6;
 
     public static final AggregationSettings NONE           = new AggregationSettings();
     public static final AggregationSettings SUM            = new AggregationSettings();
     public static final AggregationSettings AVERAGE        = new AggregationSettings();
     public static final AggregationSettings COUNT          = new AggregationSettings();
     public static final AggregationSettings MINIMUM        = new AggregationSettings();
     public static final AggregationSettings MAXIMUM        = new AggregationSettings();
 
     private static final String typeCodes[] =
         {
           "none""sum""average""count""count_distinct""minimum""maximum",    //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
         };
 
     public static final String typeDescriptions[] =
         {
             Messages.getString("AggregationSettings.USER_NONE_DESC"), //$NON-NLS-1$
             Messages.getString("AggregationSettings.USER_SUM_DESC"), //$NON-NLS-1$
             Messages.getString("AggregationSettings.USER_AVERAGE_DESC"), //$NON-NLS-1$
             Messages.getString("AggregationSettings.USER_COUNT_DESC"), //$NON-NLS-1$
             Messages.getString("AggregationSettings.USER_DISTINCT_COUNT_DESC"), //$NON-NLS-1$
             Messages.getString("AggregationSettings.USER_MINIMUM_DESC"), //$NON-NLS-1$
             Messages.getString("AggregationSettings.USER_MAXIMUM_DESC"),    //$NON-NLS-1$
         };
 
     public static final AggregationSettings[] types = new AggregationSettings[]
         {
             ,
         };
 
     private int type;

    

Parameters:
name
type
 
     public AggregationSettings(int type)
     {
         this. = type;
     }

    

Returns:
the type
 
     public int getType()
     {
         return ;
     }

    

Parameters:
type the type to set
 
     public void setType(int type)
     {
         this. = type;
     }
 
     public boolean equals(Object obj) {
       if (obj instanceof AggregationSettings == false) {
         return false;
       }
       if (this == obj) {
         return true;
      }
      AggregationSettings rhs = (AggregationSettingsobj;
      return new EqualsBuilder().append(rhs.type).isEquals();
    }
    public int hashCode() {
      return new HashCodeBuilder(37, 109).append().toHashCode();
    }
    public String toString() {
        return new ToStringBuilder(this.).
          append().
          toString();
    }
    public static AggregationSettings getType(String description)
    {
        for (int i=0;i<.;i++)
        {
            if ([i].equalsIgnoreCase(description))
            {
                return [i];
            }
        }
        for (int i=0;i<.;i++)
        {
            if ([i].equalsIgnoreCase(description))
            {
                return [i];
            }
        }
        return ;
    }
    public String getCode()
    {
        return [];
    }
    public String getDescription()
    {
        return [];
    }
    public static String[] getTypeDescriptions() {
      return .clone();
    }
New to GrepCode? Check out our FAQ X