de.laures.cewolf.taglib
Class DataContainer

java.lang.Object
  extended by de.laures.cewolf.taglib.DataContainer
All Implemented Interfaces:
DataAware, java.io.Serializable

public class DataContainer
extends java.lang.Object
implements DataAware, java.io.Serializable

Author:
guido To change the template for this generated type comment go to Window>Preferences>Java>Code Generation>Code and Comments
See Also:
Serialized Form

Field Summary
private  org.jfree.data.general.Dataset data
           
private  long datasetProduceTime
           
private  java.util.Map datasetProductionParams
           
private static org.apache.commons.logging.Log log
           
private  DatasetProducer producer
           
private  boolean useCache
           
 
Constructor Summary
DataContainer()
           
 
Method Summary
private  void checkDataProductionNeed()
          This method checks if there has been a dataset production for the same DatasetProvider and parameters.
 java.lang.Object getDataset()
           
 void setDataProductionConfig(DatasetProducer dsp, java.util.Map params, boolean useCache)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final transient org.apache.commons.logging.Log log

data

private transient org.jfree.data.general.Dataset data

producer

private transient DatasetProducer producer

datasetProductionParams

private java.util.Map datasetProductionParams

datasetProduceTime

private long datasetProduceTime

useCache

private boolean useCache
Constructor Detail

DataContainer

public DataContainer()
Method Detail

setDataProductionConfig

public void setDataProductionConfig(DatasetProducer dsp,
                                    java.util.Map params,
                                    boolean useCache)
Specified by:
setDataProductionConfig in interface DataAware

getDataset

public java.lang.Object getDataset()
                            throws DatasetProduceException
Throws:
DatasetProduceException

checkDataProductionNeed

private void checkDataProductionNeed()
This method checks if there has been a dataset production for the same DatasetProvider and parameters. If so the DatasetProducer is consulted to check the expiry of this data. If the data has expired the retrieval of a cached image of this ChartDefinition is avoided by setting the datasetProduceTime to the actual time. After this the hash code of this object can not be present in the image cache and so a new image with new data will be rendered. If the data did not expire the last dataset production time is stored as a memeber to reach the same hash code for this object as the one before if possible. This method is called during serialization to ensure the same serialized representation of this and a eventually formally stored object.