View Javadoc

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.entities;
31  
32  import org.apache.commons.logging.Log;
33  import org.apache.commons.logging.LogFactory;
34  
35  import ar.com.fdvs.dj.domain.ColumnProperty;
36  import ar.com.fdvs.dj.domain.DJCalculation;
37  import ar.com.fdvs.dj.domain.entities.columns.AbstractColumn;
38  
39  /**
40   * This class is meant for variable registration purposes only.
41   * No graphical elements come out from this  (compared to DJGroupVariable)
42   * 
43   * a DJGroupVariableDef is later a registered as a JRVariable which can be referenced upon
44   * its name.
45   * 
46   * @author mamana
47   *
48   */
49  public class DJGroupVariableDef implements Entity {
50  	
51  	private static final Log log = LogFactory.getLog(DJGroupVariableDef.class);
52  
53  	private String name;
54  	private AbstractColumn columnToApplyOperation;
55  	private ColumnProperty columnProperty;
56  	private DJCalculation operation;
57  	
58  	public DJGroupVariableDef(String name, AbstractColumn columnToApplyOperation, DJCalculation operation) {
59  		this.name = name;
60  		this.columnToApplyOperation = columnToApplyOperation;
61  		this.operation = operation;
62  	}
63  	
64  	public DJGroupVariableDef(String name, ColumnProperty columnProperty, DJCalculation operation) {
65  		this.name = name;
66  		this.columnProperty = columnProperty;
67  		this.operation = operation;
68  	}
69  	
70  
71  	public AbstractColumn getColumnToApplyOperation() {
72  		return columnToApplyOperation;
73  	}
74  
75  	public void setColumnToApplyOperation(AbstractColumn columnToApplyOperation) {
76  		this.columnToApplyOperation = columnToApplyOperation;
77  	}
78  
79  	public DJCalculation getOperation() {
80  		return operation;
81  	}
82  
83  	public void setOperation(DJCalculation operation) {
84  		this.operation = operation;
85  	}
86  
87  	public String getName() {
88  		return name;
89  	}
90  
91  	public void setName(String name) {
92  		this.name = name;
93  	}
94  
95  	public static Log getLog() {
96  		return log;
97  	}
98  
99  	public ColumnProperty getColumnProperty() {
100 		return columnProperty;
101 	}
102 
103 	public void setColumnProperty(ColumnProperty columnProperty) {
104 		this.columnProperty = columnProperty;
105 	}
106 }