BEA Systems, Inc.

com.beasys.commerce.foundation.property
Class EntityPropertyCache

java.lang.Object
  |
  +--com.beasys.commerce.foundation.property.EntityPropertyCache

public class EntityPropertyCache
extends java.lang.Object

Class used to cache properties for a given entity. This is used by the EntityPropertyManager implementation to reduce database hits on property retrieval.


Constructor Summary
EntityPropertyCache()
           
 
Method Summary
protected  void cacheNullValue(EntityPropertyCacheKey key)
          Mark a property has having a null value.
protected  void clear()
          Clear the current cache
protected  java.lang.Object getCachedValue(EntityPropertyCacheKey key)
          Get a value from the cache
protected  boolean isCachedAsNull(EntityPropertyCacheKey key)
          Determine if a property has a null value
protected  void putCachedValue(EntityPropertyCacheKey key, java.lang.Object value)
          Put a value in the cache
protected  void removeCachedValue(EntityPropertyCacheKey key)
          Remove a value from the cache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityPropertyCache

public EntityPropertyCache()
Method Detail

getCachedValue

protected java.lang.Object getCachedValue(EntityPropertyCacheKey key)
Get a value from the cache
Parameters:
key - the key to lookup
Returns:
the property value, or null if there is none.

removeCachedValue

protected void removeCachedValue(EntityPropertyCacheKey key)
Remove a value from the cache
Parameters:
key - the key to remove

putCachedValue

protected void putCachedValue(EntityPropertyCacheKey key,
                              java.lang.Object value)
Put a value in the cache
Parameters:
key - the key of the new value
value - the value to cache

clear

protected void clear()
Clear the current cache

cacheNullValue

protected void cacheNullValue(EntityPropertyCacheKey key)
Mark a property has having a null value. This is to differentiate properties without values from properties that have not been checked yet, or could not be found.
Parameters:
key - the key to mark

isCachedAsNull

protected boolean isCachedAsNull(EntityPropertyCacheKey key)
Determine if a property has a null value
Parameters:
key - the key to check
Returns:
true if the property has a null value

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved