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

@@ -167,6 +167,8 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
private Boolean readOnly;
private PersistenceContextScope persistenceContextScope;
private boolean sqlSelect;
/**
@@ -459,6 +461,7 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
if (havingExpressions != null) {
copy.havingExpressions = havingExpressions.copy(copy);
}
copy.persistenceContextScope = persistenceContextScope;
copy.usageProfiling = usageProfiling;
copy.autoFetch = autoFetch;
copy.parentNode = parentNode;
@@ -468,6 +471,16 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
return copy;
}
@Override
public Query<T> setPersistenceContextScope(PersistenceContextScope scope) {
this.persistenceContextScope = scope;
return this;
}
public PersistenceContextScope getPersistenceContextScope() {
return persistenceContextScope;
}
public Type getType() {
return type;
}