java/cewolf-1.0/src/main/java/de/laures/cewolf/storage/SessionStorageItem.java
author František Kučera <franta-hg@frantovo.cz>
Sat, 28 Feb 2009 21:31:02 +0100
changeset 1 639991d0808a
permissions -rw-r--r--
Rozbalená knihovna verze 1.0
     1 /*
     2  * Created on Aug 2, 2004
     3  *
     4  * To change the template for this generated file go to
     5  * Window - Preferences - Java - Code Generation - Code and Comments
     6  */
     7 package de.laures.cewolf.storage;
     8 
     9 import java.util.Date;
    10 
    11 import de.laures.cewolf.ChartImage;
    12 
    13 /**
    14  * @author brianf
    15  * 
    16  * To change the template for this generated type comment go to Window -
    17  * Preferences - Java - Code Generation - Code and Comments
    18  */
    19 public class SessionStorageItem
    20 {
    21   String     cid     = null;
    22   ChartImage chart   = null;
    23   Date       timeout = null;
    24 
    25   public SessionStorageItem( ChartImage theChart, String theCid, Date theTimeout )
    26   {
    27     chart   = theChart;
    28     cid     = theCid;
    29     timeout = theTimeout;
    30   }
    31   
    32   public String toString()
    33   {
    34     return ("SSI: id:"+cid+" expires:"+timeout);
    35   }
    36   public final boolean isExpired(Date currentTime)
    37   {
    38     return currentTime.after(timeout);
    39   }
    40   /**
    41    * @return Returns the chart.
    42    */
    43   public ChartImage getChart()
    44   {
    45     return chart;
    46   }
    47   /**
    48    * @param chart
    49    *          The chart to set.
    50    */
    51   public void setChart( ChartImage chart )
    52   {
    53     this.chart = chart;
    54   }
    55   /**
    56    * @return Returns the cid.
    57    */
    58   public String getCid()
    59   {
    60     return cid;
    61   }
    62   /**
    63    * @param cid
    64    *          The cid to set.
    65    */
    66   public void setCid( String cid )
    67   {
    68     this.cid = cid;
    69   }
    70   /**
    71    *  
    72    */
    73   public SessionStorageItem()
    74   {
    75     super();
    76     // TODO Auto-generated constructor stub
    77   }
    78 
    79   /**
    80    * @return Returns the timeout.
    81    */
    82   public Date getTimeout()
    83   {
    84     return timeout;
    85   }
    86   /**
    87    * @param timeout
    88    *          The timeout to set.
    89    */
    90   public void setTimeout( Date timeout )
    91   {
    92     this.timeout = timeout;
    93   }
    94 }