Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.metadata
Class MetaDataCache

java.lang.Object
  extended by oracle.adfnmc.cache.SimpleCache
      extended by oracle.adfnmc.metadata.MetaDataCache

public class MetaDataCache
extends SimpleCache


Field Summary
protected  Map crossRef
           
protected  java.lang.String crossRefId
           
static java.lang.String SINGLETON
           
 
Fields inherited from class oracle.adfnmc.cache.SimpleCache
access, cddr, config, data, MAX_COUNT, MAX_IDLE, provider, UNTYPED
 
Constructor Summary
MetaDataCache(CacheProvider cacheProvider, java.lang.String crossRefAttribute, java.lang.Object cddr)
          Constructor for the MetaDataCache.
 
Method Summary
 void addCrossRef(java.lang.String id, java.lang.String loc)
          Add a cross reference so the data can also be accessed from this id.
 XmlAnyDefinition getById(java.lang.String id)
          Get the metadata by it's id (cross referenced index).
 XmlAnyDefinition getByLocation(java.lang.String loc)
          Get the metadata by it's location (aka primary index).
 java.lang.String[] getIds()
           
 void put(java.lang.Object key, java.lang.Object value)
          Generic version called from the underlying cache.
 void put(java.lang.String loc, XmlAnyDefinition value)
          Put the metadata into the cache
 
Methods inherited from class oracle.adfnmc.cache.SimpleCache
dumpCache, get, getConfiguration, keySet, log, log, put, reset, setConfiguration, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SINGLETON

public static final java.lang.String SINGLETON
See Also:
Constant Field Values

crossRef

protected Map crossRef

crossRefId

protected java.lang.String crossRefId
Constructor Detail

MetaDataCache

public MetaDataCache(CacheProvider cacheProvider,
                     java.lang.String crossRefAttribute,
                     java.lang.Object cddr)
Constructor for the MetaDataCache. A cache used solely to cache a paticular type of metadata (XmlAnyDefinitions) to avoid multiple disk reads.

Parameters:
cacheProvider - (implementer of the fetch method)
cddr - (or client data direct reference) passed to the provider on fetch
Method Detail

addCrossRef

public void addCrossRef(java.lang.String id,
                        java.lang.String loc)
Add a cross reference so the data can also be accessed from this id.

Parameters:
id - is the new cross reference
loc - is the exiting reference by the underlying cache

getById

public XmlAnyDefinition getById(java.lang.String id)
Get the metadata by it's id (cross referenced index).

Parameters:
id - found in the outter stanza of the XML
Returns:
the XmlAnyDefinition found in the cache or null if it is not in the cache

getIds

public java.lang.String[] getIds()

getByLocation

public XmlAnyDefinition getByLocation(java.lang.String loc)
Get the metadata by it's location (aka primary index).

Parameters:
loc - is the location where the file actually exists on disk
Returns:
the XmlAnyDefinition found in the cache or null if it can not be fetched.

put

public void put(java.lang.String loc,
                XmlAnyDefinition value)
Put the metadata into the cache

Parameters:
loc - where the metadata resides on the disk (primary index)
value - the metadata itself

put

public void put(java.lang.Object key,
                java.lang.Object value)
Generic version called from the underlying cache.

Parameters:
key - is the loc
value - is the metadata

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.