CacheItem
Keywords: uk.ac.ic.doc.automed.util.cache.CacheItem class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed.util.cache
Class CacheItem

    java.lang.Object
      uk.ac.ic.doc.automed.util.cache.CacheItem

    public class CacheItem

extends java.lang.Object

Constructor Summary
`CacheItem(java.lang.String timeStamp)`
`CacheItem(java.lang.String id, java.lang.String timeStamp)` Creates a new instance of CacheItem

Method Summary
`void` | `addContentItem(java.lang.String itemName, java.lang.Object contentItem)` Add a new content item to this cache entry
`int` | `getAutoID()` Return the current value of the auto-increment ID
`java.util.Map` | `getContent()` Return all cache item's content as a `HashMap`
`java.lang.Object` | `getContentItem(java.lang.String itemName)` Return an individual content item
`java.lang.String` | `getID()` Get cache item's id
`int` | `getIndex()`
`java.lang.String` | `getTimeStamp()` Get time stamp
`void` | `setIndex(int index)` Set the temporary cache item index in the storage list for reference
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### CacheItem

    public CacheItem(java.lang.String id,
                     java.lang.String timeStamp)

  Creates a new instance of CacheItem

### CacheItem

    public CacheItem(java.lang.String timeStamp)

Method Detail

### addContentItem

    public void addContentItem(java.lang.String itemName,
                               java.lang.Object contentItem)

  Add a new content item to this cache entry

  Parameters:
    `itemKey` - the unique key for the content item
    `contentItem` - the actual content item themselves

### getAutoID

    public int getAutoID()

  Return the current value of the auto-increment ID

### getID

    public java.lang.String getID()

  Get cache item's id

### getContent

    public java.util.Map getContent()

  Return all cache item's content as a `HashMap`

  Returns:
    Map cache content

### getContentItem

    public java.lang.Object getContentItem(java.lang.String itemName)

  Return an individual content item

### setIndex

    public void setIndex(int index)

  Set the temporary cache item index in the storage list for reference

### getIndex

    public int getIndex()

### getTimeStamp

    public java.lang.String getTimeStamp()

  Get time stamp

  Returns:
    String the time-stamp of the cache item (when it was added to cache)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD