View Javadoc

1   /*
2    * Copyright (c) 2004-2005, University Health Network.  All rights reserved. Distributed under the BSD 
3    * license (see http://opensource.org/licenses/bsd-license.php).
4    *  
5    * Created on 6-Dec-2004
6    */
7   package ca.uhn.cache;
8   
9   import java.io.Serializable;
10  import java.util.Date;
11  
12  /***
13   * Represents an individual item stored by a cache.  It is only defined in terms 
14   * of a <code>ParamSpace</code> (see getProjection()).  
15   * 
16   * @author <a href="mailto:bryan.tripp@uhn.on.ca">Bryan Tripp</a>
17   * @version $Revision: 1.1 $ updated on $Date: 2005/01/24 22:52:08 $ by $Author: bryan_tripp $
18   */
19  public interface IDataItem {
20  
21      /***
22       * @return the location of the <code>IDataItem</code> in the (implicitly) associated 
23       *      <code>ParamSpace</code>  
24       * 
25       * @postcondition trueForAll( return.getParameters(), instance of IPointQueryParam )
26       */
27      public IQuery getProjection();
28      
29      /***
30       * @return a unique ID for the data item (assigned by the <code>IDataSource</code> 
31       *         that created this <code>IDataItem</code>) 
32       */
33      public String getId();
34      
35      /***
36       * @return the domain-specific value wrapped by this <code>IDataItem</code>
37       */
38      public Serializable getValue();
39      
40      /***
41       * @return the item's volatility.
42       */
43      public VolatilityEnum getVolatility();
44      
45      /***
46       * @return the time at which the item was last updated (recent end of possible 
47       *      range if unknown)
48       */
49      public Date getLastUpdate();    
50  
51  }