/** * Return the cache key for the given bean (based on id value). */ public String cacheKeyForBean(EntityBean bean) { return cacheKey(idProperty.getValue(bean)); }
/** * Return a bean from the bean cache (or null). */ public T cacheBeanGet(Object id, Boolean readOnly, PersistenceContext context) { return cacheHelp.beanCacheGet(cacheKey(id), readOnly, context); }
/** * Remove a collection of beans from the cache given the ids. */ public void cacheApplyInvalidate(Collection<Object> ids) { List<String> keys = new ArrayList<>(ids.size()); for (Object id : ids) { keys.add(cacheKey(id)); } cacheHelp.beanCacheApplyInvalidate(keys); }
/** * Returns true if it managed to populate/load the bean from the cache. */ public boolean cacheBeanLoad(EntityBean bean, EntityBeanIntercept ebi, Object id, PersistenceContext context) { return cacheHelp.beanCacheLoad(bean, ebi, cacheKey(id), context); }
String key = beanDescriptor.cacheKey(idValue);
CachedBeanData d = cacheHelp.beanCacheGetData(cacheKey(id)); if (d != null) { Object shareableBean = d.getSharableBean();
/** * Remove a collection of beans from the cache given the ids. */ public void cacheApplyInvalidate(Collection<Object> ids) { List<String> keys = new ArrayList<>(ids.size()); for (Object id : ids) { keys.add(cacheKey(id)); } cacheHelp.beanCacheApplyInvalidate(keys); }
/** * Returns true if it managed to populate/load the bean from the cache. */ public boolean cacheBeanLoad(EntityBean bean, EntityBeanIntercept ebi, Object id, PersistenceContext context) { return cacheHelp.beanCacheLoad(bean, ebi, cacheKey(id), context); }
/** * Return a bean from the bean cache (or null). */ public T cacheBeanGet(Object id, Boolean readOnly, PersistenceContext context) { return cacheHelp.beanCacheGet(cacheKey(id), readOnly, context); }
/** * Return the cache key for the given bean (based on id value). */ public String cacheKeyForBean(EntityBean bean) { return cacheKey(idProperty.getValue(bean)); }
String key = beanDescriptor.cacheKey(idValue);
CachedBeanData d = cacheHelp.beanCacheGetData(cacheKey(id)); if (d != null) { Object shareableBean = d.getSharableBean();