Coverage Report - ar.com.fdvs.dj.domain.DJCalculation
 
Classes in this File Line Coverage Branch Coverage Complexity
DJCalculation
100%
15/15
N/A
1
 
 1  
 /*
 2  
  * DynamicJasper: A library for creating reports dynamically by specifying
 3  
  * columns, groups, styles, etc. at runtime. It also saves a lot of development
 4  
  * time in many cases! (http://sourceforge.net/projects/dynamicjasper)
 5  
  *
 6  
  * Copyright (C) 2008  FDV Solutions (http://www.fdvsolutions.com)
 7  
  *
 8  
  * This library is free software; you can redistribute it and/or
 9  
  * modify it under the terms of the GNU Lesser General Public
 10  
  *
 11  
  * License as published by the Free Software Foundation; either
 12  
  *
 13  
  * version 2.1 of the License, or (at your option) any later version.
 14  
  *
 15  
  * This library is distributed in the hope that it will be useful,
 16  
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 17  
  *
 18  
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 19  
  *
 20  
  * Lesser General Public License for more details.
 21  
  *
 22  
  * You should have received a copy of the GNU Lesser General Public
 23  
  * License along with this library; if not, write to the Free Software
 24  
  *
 25  
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 26  
  *
 27  
  *
 28  
  */
 29  
 
 30  
 package ar.com.fdvs.dj.domain;
 31  
 
 32  
 import net.sf.jasperreports.engine.JRVariable;
 33  
 import ar.com.fdvs.dj.domain.entities.Entity;
 34  
 import ar.com.fdvs.dj.domain.entities.columns.OperationColumn;
 35  
 import net.sf.jasperreports.engine.type.CalculationEnum;
 36  
 
 37  
 /**
 38  
  * Operations that can be shown as a group variable.</br>
 39  
  * </br>
 40  
  * @see OperationColumn
 41  
  */
 42  
 public class DJCalculation extends DJBaseElement {
 43  
 
 44  
         private static final long serialVersionUID = Entity.SERIAL_VERSION_UID;
 45  
 
 46  1
         public static DJCalculation AVERAGE = new DJCalculation(CalculationEnum.AVERAGE.getValue() );
 47  1
         public static DJCalculation COUNT = new DJCalculation( CalculationEnum.COUNT.getValue() );
 48  1
         public static DJCalculation FIRST = new DJCalculation( CalculationEnum.FIRST.getValue() );
 49  1
         public static DJCalculation HIGHEST = new DJCalculation(CalculationEnum.HIGHEST.getValue() );
 50  1
         public static DJCalculation LOWEST = new DJCalculation( CalculationEnum.LOWEST.getValue() );
 51  1
         public static DJCalculation NOTHING = new DJCalculation( CalculationEnum.NOTHING.getValue() );
 52  1
         public static DJCalculation STANDARD_DEVIATION = new DJCalculation( CalculationEnum.STANDARD_DEVIATION.getValue() );
 53  1
         public static DJCalculation SUM = new DJCalculation( CalculationEnum.SUM.getValue() );
 54  1
         public static DJCalculation SYSTEM = new DJCalculation( CalculationEnum.SYSTEM.getValue() );
 55  1
         public static DJCalculation VARIANCE = new DJCalculation( CalculationEnum.VARIANCE.getValue() );
 56  1
         public static DJCalculation DISTINCT_COUNT = new DJCalculation( CalculationEnum.DISTINCT_COUNT.getValue() );
 57  
 
 58  
         private byte value;
 59  
 
 60  11
         private DJCalculation(byte value){
 61  11
                 this.value = value;
 62  11
         }
 63  
 
 64  
         public byte getValue() {
 65  115
                 return value;
 66  
         }
 67  
 
 68  
 }