Refactor - no effective chang - Add SpiQuery getOriginKey()

This commit is contained in:
Rob Bygrave committed 2016-11-05 14:48:03 +13:00
1 parent 83a3ef43bd
commit 4663162f95
2 files changed
+14

No files matched your search

@@ -166,6 +166,11 @@ public interface SpiQuery<T> extends Query<T> {
*/
PersistenceContextScope getPersistenceContextScope();
/**
* Return the origin key.
*/
String getOriginKey();
/**
* Return the default lazy load batch size.
*/
@@ -339,6 +339,15 @@ public class DefaultOrmQuery<T> implements SpiQuery<T> {
return this;
}
@Override
public String getOriginKey() {
if (parentNode == null || parentNode.getOriginQueryPoint() == null) {
return null;
} else {
return parentNode.getOriginQueryPoint().getKey();
}
}
@Override
public int getLazyLoadBatchSize() {
return lazyLoadBatchSize;