| 1 |
/** |
| 2 |
* ======================================== |
| 3 |
* JFreeReport : a free Java report library |
| 4 |
* ======================================== |
| 5 |
* |
| 6 |
* Project Info: http://reporting.pentaho.org/ |
| 7 |
* |
| 8 |
* (C) Copyright 2000-2007, by Object Refinery Limited, Pentaho Corporation and Contributors. |
| 9 |
* |
| 10 |
* This library is free software; you can redistribute it and/or modify it under the terms |
| 11 |
* of the GNU Lesser General Public License as published by the Free Software Foundation; |
| 12 |
* either version 2.1 of the License, or (at your option) any later version. |
| 13 |
* |
| 14 |
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 15 |
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 16 |
* See the GNU Lesser General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU Lesser General Public License along with this |
| 19 |
* library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, |
| 20 |
* Boston, MA 02111-1307, USA. |
| 21 |
* |
| 22 |
* [Java is a trademark or registered trademark of Sun Microsystems, Inc. |
| 23 |
* in the United States and other countries.] |
| 24 |
* |
| 25 |
* ------------ |
| 26 |
* $Id: StaticExpressionRuntimeData.java 10756 2009-12-02 15:58:24Z tmorgner $ |
| 27 |
* ------------ |
| 28 |
* (C) Copyright 2000-2005, by Object Refinery Limited. |
| 29 |
* (C) Copyright 2005-2007, by Pentaho Corporation. |
| 30 |
*/ |
| 31 |
package org.jfree.report.data; |
| 32 |
|
| 33 |
import org.jfree.report.ReportData; |
| 34 |
import org.jfree.report.flow.ReportContext; |
| 35 |
import org.jfree.report.i18n.ResourceBundleFactory; |
| 36 |
import org.pentaho.reporting.libraries.base.config.Configuration; |
| 37 |
|
| 38 |
/** |
| 39 |
* This class holds all expression-runtime information, which are known when |
| 40 |
* the expression gets added to the datarow. Once added, they won't change |
| 41 |
* anymore. |
| 42 |
* |
| 43 |
* @author Thomas Morgner |
| 44 |
*/ |
| 45 |
public class StaticExpressionRuntimeData |
| 46 |
{ |
| 47 |
private Object declaringParent; |
| 48 |
private Configuration configuration; |
| 49 |
private ReportData data; |
| 50 |
private int currentRow; |
| 51 |
private ReportContext reportContext; |
| 52 |
|
| 53 |
public StaticExpressionRuntimeData() |
| 54 |
{ |
| 55 |
} |
| 56 |
|
| 57 |
public int getCurrentRow() |
| 58 |
{ |
| 59 |
return currentRow; |
| 60 |
} |
| 61 |
|
| 62 |
public void setCurrentRow(final int currentRow) |
| 63 |
{ |
| 64 |
this.currentRow = currentRow; |
| 65 |
} |
| 66 |
|
| 67 |
public ReportData getData() |
| 68 |
{ |
| 69 |
return data; |
| 70 |
} |
| 71 |
|
| 72 |
public void setData(final ReportData data) |
| 73 |
{ |
| 74 |
this.data = data; |
| 75 |
} |
| 76 |
|
| 77 |
public ResourceBundleFactory getResourceBundleFactory() |
| 78 |
{ |
| 79 |
return reportContext.getResourceBundleFactory(); |
| 80 |
} |
| 81 |
|
| 82 |
public void setDeclaringParent(final Object declaringParent) |
| 83 |
{ |
| 84 |
this.declaringParent = declaringParent; |
| 85 |
} |
| 86 |
|
| 87 |
public void setConfiguration(final Configuration configuration) |
| 88 |
{ |
| 89 |
this.configuration = configuration; |
| 90 |
} |
| 91 |
|
| 92 |
public Object getDeclaringParent() |
| 93 |
{ |
| 94 |
return declaringParent; |
| 95 |
} |
| 96 |
|
| 97 |
public Configuration getConfiguration() |
| 98 |
{ |
| 99 |
return configuration; |
| 100 |
} |
| 101 |
|
| 102 |
public ReportContext getReportContext() |
| 103 |
{ |
| 104 |
return reportContext; |
| 105 |
} |
| 106 |
|
| 107 |
public void setReportContext(final ReportContext reportContext) |
| 108 |
{ |
| 109 |
this.reportContext = reportContext; |
| 110 |
} |
| 111 |
} |