#595 - Refactor - persistence context root type handling - fully expect root type

This commit is contained in:
Robin Bygrave committed 2016-03-11 20:54:57 +13:00
1 parent 33f69902dc
commit 49121a9c1f
8 files changed
+60 -36

No files matched your search

@@ -1675,6 +1675,13 @@ public class BeanDescriptor<T> implements MetaBeanInfo, BeanType<T> {
return pc.get(rootBeanType, id);
}
/**
* Get the bean from the persistence context with delete check option.
*/
public PersistenceContext.WithOption contextGetWithOption(PersistenceContext pc, Object id) {
return pc.getWithOption(rootBeanType, id);
}
/**
* Put the bean into the persistence context.
*/
@@ -1700,6 +1707,20 @@ public class BeanDescriptor<T> implements MetaBeanInfo, BeanType<T> {
return ref;
}
/**
* Clear a bean from the persistence context.
*/
public void contextClear(PersistenceContext pc, Object idValue) {
pc.clear(rootBeanType, idValue);
}
/**
* Delete a bean from the persistence context (such that we don't fetch it in the same transaction).
*/
public void contextDeleted(PersistenceContext pc, Object idValue) {
pc.deleted(rootBeanType, idValue);
}
/**
* Helper method to return the unique property. If only one property makes up
* the unique id then it's value is returned. If there is a concatenated