Extension SDK

oracle.ide.config
Class DTCache

java.lang.Object
  |
  +--oracle.ide.config.DTCache
All Implemented Interfaces:
Copyable

public final class DTCache
extends java.lang.Object
implements Copyable

The DTCache is a persisted cache that can be used to store data that is not user-configurable. For example, this can be used to "remember" pieces of information, such as history information.


Constructor Summary
DTCache()
          Construct a new default DTCache instance.
 
Method Summary
 java.lang.Object copyTo(java.lang.Object target)
          Copies the internal state of this object to the specified copy.
 java.lang.Object getData(java.lang.String dataKey)
          Retrieves a previously added cached object from the cache using the specified key for lookup.
 boolean load()
          Loads the registered data from the XML file.
 void putData(java.lang.String dataKey, Copyable data)
          Stores an object into the cache using the specified key for lookup.
 void putData(java.lang.String dataKey, java.util.List copyableList)
          Stores a list into the cache using the specified key for lookup.
 boolean save()
          Saves the registered data to the XML file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DTCache

public DTCache()
Construct a new default DTCache instance.
Method Detail

getData

public java.lang.Object getData(java.lang.String dataKey)
Retrieves a previously added cached object from the cache using the specified key for lookup.
Parameters:
dataKey - the key to use for looking up the object
Returns:
the associated cached object (if any)

putData

public void putData(java.lang.String dataKey,
                    Copyable data)
Stores an object into the cache using the specified key for lookup.
Parameters:
dataKey - the key to use for looking up the object
data - the data to store in the cache

putData

public void putData(java.lang.String dataKey,
                    java.util.List copyableList)
Stores a list into the cache using the specified key for lookup. Although not enforced, the items contained in the list must be basic items that are persistable, or are copyable implementations.
Parameters:
dataKey - the key to use for looking up the object
copyableList - the list to store in the cache

save

public boolean save()
Saves the registered data to the XML file.

load

public boolean load()
Loads the registered data from the XML file.

copyTo

public java.lang.Object copyTo(java.lang.Object target)
Copies the internal state of this object to the specified copy.
Specified by:
copyTo in interface Copyable
Parameters:
-  

Extension SDK