/** * Return the value to cache for the given embedded PC. Caches a * {@link PCData} from {@link #newEmbeddedPCData} by default. */ protected Object toEmbeddedData(Object val, StoreContext ctx) { if (ctx == null) return NULL; OpenJPAStateManager sm = ctx.getStateManager(val); if (sm == null) return NULL; // have to cache all data, so make sure it's all loaded // ### prevent loading of things that aren't cached (lobs, lrs, etc) ctx.retrieve(val, false, null); PCData pcdata = newEmbeddedPCData(sm); pcdata.store(sm); return pcdata; }
/** * Return the value to cache for the given embedded PC. Caches a * {@link PCData} from {@link #newEmbeddedPCData} by default. */ protected Object toEmbeddedData(Object val, StoreContext ctx) { if (ctx == null) return NULL; OpenJPAStateManager sm = ctx.getStateManager(val); if (sm == null) return NULL; // have to cache all data, so make sure it's all loaded // ### prevent loading of things that aren't cached (lobs, lrs, etc) ctx.retrieve(val, false, null); PCData pcdata = newEmbeddedPCData(sm); pcdata.store(sm); return pcdata; }
/** * Return the value to cache for the given embedded PC. Caches a * {@link PCData} from {@link #newEmbeddedPCData} by default. */ protected Object toEmbeddedData(Object val, StoreContext ctx) { if (ctx == null) return NULL; OpenJPAStateManager sm = ctx.getStateManager(val); if (sm == null) return NULL; // have to cache all data, so make sure it's all loaded // ### prevent loading of things that aren't cached (lobs, lrs, etc) ctx.retrieve(val, false, null); PCData pcdata = newEmbeddedPCData(sm); pcdata.store(sm); return pcdata; }
/** * Return the value to cache for the given embedded PC. Caches a * {@link PCData} from {@link #newEmbeddedPCData} by default. */ protected Object toEmbeddedData(Object val, StoreContext ctx) { if (ctx == null) return NULL; OpenJPAStateManager sm = ctx.getStateManager(val); if (sm == null) return NULL; // have to cache all data, so make sure it's all loaded // ### prevent loading of things that aren't cached (lobs, lrs, etc) ctx.retrieve(val, false, null); PCData pcdata = newEmbeddedPCData(sm); pcdata.store(sm); return pcdata; }
/** * Return the value to cache for the given embedded PC. Caches a * {@link PCData} from {@link #newEmbeddedPCData} by default. */ protected Object toEmbeddedData(Object val, StoreContext ctx) { if (ctx == null) return NULL; OpenJPAStateManager sm = ctx.getStateManager(val); if (sm == null) return NULL; // have to cache all data, so make sure it's all loaded // ### prevent loading of things that aren't cached (lobs, lrs, etc) ctx.retrieve(val, false, null); PCData pcdata = newEmbeddedPCData(sm); pcdata.store(sm); return pcdata; }