Coverage Report - ar.com.fdvs.dj.domain.DJDataSource
 
Classes in this File Line Coverage Branch Coverage Complexity
DJDataSource
70%
14/20
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 ar.com.fdvs.dj.core.DJConstants;
 33  
 import ar.com.fdvs.dj.domain.entities.Entity;
 34  
 
 35  
 /**
 36  
  * Describes a data source.
 37  
  *
 38  
  * The properties {@link #dataSourceOrigin} and {@link #dataSourceType} are constants from {@link DJConstants}
 39  
  * @author Juan Manuel
 40  
  *
 41  
  */
 42  
 public class DJDataSource extends DJBaseElement{
 43  
 
 44  
         private static final long serialVersionUID = Entity.SERIAL_VERSION_UID;
 45  
         
 46  
         /**
 47  
          * This expression must point to a JRDataSource object
 48  
          */
 49  
         private String dataSourceExpression;
 50  
 
 51  
         /**
 52  
          * Tells form where to look up the data source expression
 53  
          */
 54  28
         private int dataSourceOrigin = DJConstants.DATA_SOURCE_ORIGIN_PARAMETER;
 55  
 
 56  28
         private int dataSourceType = DJConstants.DATA_SOURCE_TYPE_COLLECTION;
 57  
         
 58  28
         private boolean preSorted = false; //for cross-tabs
 59  
 
 60  
         public DJDataSource(String dataSourceExpression, int dataSourceOrigin, int dataSourceType) {
 61  28
                 super();
 62  28
                 this.dataSourceExpression = dataSourceExpression;
 63  28
                 this.dataSourceOrigin = dataSourceOrigin;
 64  28
                 this.dataSourceType = dataSourceType;
 65  28
         }
 66  
 
 67  
         public String getDataSourceExpression() {
 68  27
                 return dataSourceExpression;
 69  
         }
 70  
 
 71  
         public void setDataSourceExpression(String dataSourceExpression) {
 72  0
                 this.dataSourceExpression = dataSourceExpression;
 73  0
         }
 74  
 
 75  
         public int getDataSourceOrigin() {
 76  63
                 return dataSourceOrigin;
 77  
         }
 78  
 
 79  
         public void setDataSourceOrigin(int dataSourceOrigin) {
 80  0
                 this.dataSourceOrigin = dataSourceOrigin;
 81  0
         }
 82  
 
 83  
         public int getDataSourceType() {
 84  46
                 return dataSourceType;
 85  
         }
 86  
 
 87  
         public void setDataSourceType(int dataSourceType) {
 88  0
                 this.dataSourceType = dataSourceType;
 89  0
         }
 90  
 
 91  
         public boolean isPreSorted() {
 92  8
                 return preSorted;
 93  
         }
 94  
 
 95  
         public void setPreSorted(boolean preSorted) {
 96  2
                 this.preSorted = preSorted;
 97  2
         }
 98  
 
 99  
 }