mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-23 07:11:55 +00:00
Refactor - no effective chang - Add SpiQuery getOriginKey()
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user