KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > jasperreports > engine > JRVirtualizable


1 /*
2  * ============================================================================
3  * GNU Lesser General Public License
4  * ============================================================================
5  *
6  * JasperReports - Free Java report-generating library.
7  * Copyright (C) 2005 Works, Inc. http://www.works.com/
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * 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,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
22  *
23  * Works, Inc.
24  * 6034 West Courtyard Drive
25  * Suite 210
26  * Austin, TX 78730-5032
27  * USA
28  * http://www.works.com/
29  */

30
31 /*
32  * Licensed to JasperSoft Corporation under a Contributer Agreement
33  */

34 package net.sf.jasperreports.engine;
35
36 import net.sf.jasperreports.engine.fill.JRVirtualizationContext;
37
38 /**
39  * @author John Bindel
40  * @version $Id: JRVirtualizable.java 1333 2006-07-11 14:31:34 +0300 (Tue, 11 Jul 2006) lucianc $
41  */

42 public interface JRVirtualizable {
43     /**
44      * Used by the virtualizer to identify the data for this object.
45      */

46     String JavaDoc getUID();
47
48     /**
49      * Used by the virtualizer to set data.
50      */

51     void setVirtualData(Object JavaDoc o);
52
53     /**
54      * Used by the virtualizer to get data.
55      */

56     Object JavaDoc getVirtualData();
57
58     /**
59      * Used by the virtualizer to remove the data from the object in memory so
60      * that it may be garbage collected.
61      */

62     void removeVirtualData();
63
64     /**
65      * Used by the virtualizer to set identity data.
66      */

67     void setIdentityData(Object JavaDoc id);
68
69     /**
70      * Used by the virtualizer to get identity data.
71      */

72     Object JavaDoc getIdentityData();
73     
74     
75     /**
76      * Called by the virtualizer before the object's data is externalized.
77      */

78     void beforeExternalization();
79     
80     
81     /**
82      * Called by the virtualizer after the object's data is externalized, but before
83      * the virtual data is {@link #removeVirtualData() removed}.
84      */

85     void afterExternalization();
86     
87     
88     /**
89      * Called by the virtualizer after the object's data was made available to the object.
90      */

91     void afterInternalization();
92     
93     /**
94      * Returns the virtualization context this object belongs to.
95      *
96      * @return the virtualization context this object belongs to
97      */

98     //FIXME use a more generic context type, JRVirtualizationContext has print page-specific methods
99
//issue: changing JRVirtualizationContext hierarchy would impact serialization
100
JRVirtualizationContext getContext();
101 }
102
Popular Tags