Use WeakReferences when in iterate query mode

This commit is contained in:
Roland Praml
2021-10-11 16:25:21 +02:00
parent ea3fb833a4
commit 3f5009aa91
5 changed files with 195 additions and 298 deletions
@@ -60,10 +60,15 @@ public interface PersistenceContext {
int size(Class<?> rootType);
/**
* Return a copy of the Persistence context to use for large query iteration.
* Signalizes the PersistenceContext, the begin for large query iteration.
*/
PersistenceContext forIterate();
void beginIterate();
/**
* Signalizes the PersistenceContext, the end for large query iteration.
*/
void endIterate();
/**
* Wrapper on a bean to also indicate if a bean has been deleted.
* <p>