001: /*
002: * Copyright (C) 2005 - 2008 JasperSoft Corporation. All rights reserved.
003: * http://www.jaspersoft.com.
004: *
005: * Unless you have purchased a commercial license agreement from JasperSoft,
006: * the following license terms apply:
007: *
008: * This program is free software; you can redistribute it and/or modify
009: * it under the terms of the GNU General Public License version 2 as published by
010: * the Free Software Foundation.
011: *
012: * This program is distributed WITHOUT ANY WARRANTY; and without the
013: * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
014: * See the GNU General Public License for more details.
015: *
016: * You should have received a copy of the GNU General Public License
017: * along with this program; if not, see http://www.gnu.org/licenses/gpl.txt
018: * or write to:
019: *
020: * Free Software Foundation, Inc.,
021: * 59 Temple Place - Suite 330,
022: * Boston, MA USA 02111-1307
023: *
024: *
025: *
026: *
027: * Measure.java
028: *
029: * Created on 12 febbraio 2003, 21.45
030: *
031: */
032:
033: package it.businesslogic.ireport.crosstab;
034:
035: public class Measure {
036: private String name;
037: private String classType;
038: private String calculation;
039: private String expression;
040: private String incrementerFactoryClass = "";
041: private String percentageOf = "None";
042: private String percentageCalculatorClass = "";
043:
044: public Measure(String name) {
045: this (name, "java.lang.String");
046: }
047:
048: public Measure(String name, String classType) {
049: this .name = name;
050:
051: this .classType = classType;
052: calculation = "";
053: expression = "";
054: }
055:
056: /** Getter for property calculation.
057: * @return Value of property calculation.
058: *
059: */
060: public java.lang.String getCalculation() {
061: return calculation;
062: }
063:
064: /** Setter for property calculation.
065: * @param calculation New value of property calculation.
066: *
067: */
068: public void setCalculation(java.lang.String calculation) {
069: this .calculation = calculation;
070: }
071:
072: /** Getter for property classType.
073: * @return Value of property classType.
074: *
075: */
076: public java.lang.String getClassType() {
077: return classType;
078: }
079:
080: /** Setter for property classType.
081: * @param classType New value of property classType.
082: *
083: */
084: public void setClassType(java.lang.String classType) {
085: this .classType = classType;
086: }
087:
088: /** Getter for property expression.
089: * @return Value of property expression.
090: *
091: */
092: public java.lang.String getExpression() {
093: return expression;
094: }
095:
096: /** Setter for property expression.
097: * @param expression New value of property expression.
098: *
099: */
100: public void setExpression(java.lang.String expression) {
101: this .expression = expression;
102: }
103:
104: /** Getter for property name.
105: * @return Value of property name.
106: *
107: */
108: public java.lang.String getName() {
109: return name;
110: }
111:
112: /** Setter for property name.
113: * @param name New value of property name.
114: *
115: */
116: public void setName(java.lang.String name) {
117: this .name = name;
118: }
119:
120: public String toString() {
121: return name;
122: }
123:
124: /** Getter for property incrementerFactoryClass.
125: * @return Value of property incrementerFactoryClass.
126: *
127: */
128: public java.lang.String getIncrementerFactoryClass() {
129: return incrementerFactoryClass;
130: }
131:
132: /** Setter for property incrementerFactoryClass.
133: * @param incrementerFactoryClass New value of property incrementerFactoryClass.
134: *
135: */
136: public void setIncrementerFactoryClass(
137: java.lang.String incrementerFactoryClass) {
138: this .incrementerFactoryClass = incrementerFactoryClass;
139: }
140:
141: public Measure cloneMe() {
142: Measure jrv = new Measure(name, classType);
143:
144: jrv.setCalculation(calculation);
145: jrv.setExpression(expression);
146: jrv.setIncrementerFactoryClass(getIncrementerFactoryClass());
147: jrv.setPercentageOf(getPercentageOf());
148: jrv
149: .setPercentageCalculatorClass(getPercentageCalculatorClass());
150:
151: return jrv;
152: }
153:
154: public String getPercentageOf() {
155: return percentageOf;
156: }
157:
158: public void setPercentageOf(String percentageOf) {
159: this .percentageOf = percentageOf;
160: }
161:
162: public String getPercentageCalculatorClass() {
163: return percentageCalculatorClass;
164: }
165:
166: public void setPercentageCalculatorClass(
167: String percentageCalculatorClass) {
168: this.percentageCalculatorClass = percentageCalculatorClass;
169: }
170:
171: }
|