Fix for #207: Add support for PeristenceContextScope QUERY and NONE (in addition to the existing TRANSACTION scope)

This commit is contained in:
rbygrave committed 2014-11-20 00:53:32 +13:00
1 parent 55eaa0b484
commit 6677a6199c
15 files changed
+472 -35

No files matched your search

@@ -725,6 +725,13 @@ public class BeanDescriptor<T> implements MetaBeanInfo {
return inheritInfo == null || inheritInfo.isRoot();
}
/**
* Set the bean caching on or off.
*/
public void setUseCache(boolean useCache) {
cacheHelp.setUseCache(useCache);
}
/**
* Return true if there is currently query caching for this type of bean.
*/
@@ -105,7 +105,16 @@ public final class BeanDescriptorCacheHelp<T> {
}
}
}
public void setUseCache(boolean useCache) {
if (useCache) {
getBeanCache();
} else {
beanCacheClear();
beanCache = null;
}
}
/**
* Return true if there is currently query caching for this type of bean.
*/