org.intermine.web.logic.results
Class DisplayObjectFactory

java.lang.Object
  extended by org.intermine.util.ReferenceMap<K,V>
      extended by org.intermine.util.SoftReferenceMap<K,V>
          extended by org.intermine.util.CacheMap<InterMineObject,DisplayObject>
              extended by org.intermine.web.logic.results.DisplayObjectFactory
All Implemented Interfaces:
java.util.Map<InterMineObject,DisplayObject>

public class DisplayObjectFactory
extends CacheMap<InterMineObject,DisplayObject>

A factory for DisplayObjects. If get() is called and the is no existing DisplayObject for the argument InterMineObject, one is created, saved and returned.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.intermine.util.ReferenceMap
ReferenceMap.ReferenceWithKey<K>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class org.intermine.util.ReferenceMap
name, NULL_VALUE, queue, subMap
 
Constructor Summary
DisplayObjectFactory(javax.servlet.http.HttpSession session)
          Create a new DisplayObjectCache for the given session.
 
Method Summary
 boolean containsKey(java.lang.Object key)
          Always returns true because get always returns an Object.
 DisplayObject get(java.lang.Object object)
          Get a DisplayObject for the given InterMineObject.
 DisplayObject put(InterMineObject key, DisplayObject value)
          Disable this method.
 
Methods inherited from class org.intermine.util.SoftReferenceMap
newRef
 
Methods inherited from class org.intermine.util.ReferenceMap
clear, containsValue, entrySet, equals, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisplayObjectFactory

public DisplayObjectFactory(javax.servlet.http.HttpSession session)
Create a new DisplayObjectCache for the given session.

Parameters:
session - the HTTP session
Method Detail

containsKey

public boolean containsKey(java.lang.Object key)
Always returns true because get always returns an Object.

Specified by:
containsKey in interface java.util.Map<InterMineObject,DisplayObject>
Overrides:
containsKey in class ReferenceMap<InterMineObject,DisplayObject>

get

public DisplayObject get(java.lang.Object object)
Get a DisplayObject for the given InterMineObject. If there is no existing DisplayObject for the argument InterMineObject, one is created, saved and returned.

Specified by:
get in interface java.util.Map<InterMineObject,DisplayObject>
Overrides:
get in class ReferenceMap<InterMineObject,DisplayObject>
Parameters:
object - an InterMineObject to make a DisplayObject for
Returns:
a DisplayObject

put

public DisplayObject put(InterMineObject key,
                         DisplayObject value)
Disable this method.

Specified by:
put in interface java.util.Map<InterMineObject,DisplayObject>
Overrides:
put in class ReferenceMap<InterMineObject,DisplayObject>
Parameters:
key - Do not use
value - Do not use
Returns:
never