/** * Create lazy loading proxies for the Many's except for the one that is * included in the actual query. */ private void createListProxies(STreeType localDesc, DbReadContext ctx, EntityBean localBean, boolean disableLazyLoad) { STreePropertyAssocMany fetchedMany = ctx.getManyProperty(); // load the List/Set/Map proxy objects (deferred fetching of lists) for (STreePropertyAssocMany many : localDesc.propsMany()) { if (fetchedMany == null || !fetchedMany.equals(many)) { // create a proxy for the many (deferred fetching) BeanCollection<?> ref = many.createReferenceIfNull(localBean); if (ref != null) { if (disableLazyLoad) { ref.setDisableLazyLoad(true); } if (!ref.isRegisteredWithLoadContext()) { ctx.register(many.getName(), ref); } } } } }
/** * Read and return the bean. */ Object read(DbReadContext ctx) throws SQLException { // Support for Inheritance hierarchy on exported OneToOne ? Object id = property.targetIdBinder.read(ctx); if (id == null) { return null; } PersistenceContext pc = ctx.getPersistenceContext(); Object existing = target.contextGet(pc, id); if (existing != null) { return existing; } boolean disableLazyLoading = ctx.isDisableLazyLoading(); Object ref = target.contextRef(pc, ctx.isReadOnly(), disableLazyLoading, id); if (!disableLazyLoading) { ctx.register(path, ((EntityBean) ref)._ebean_getIntercept()); } return ref; }
Object ref = desc.contextRef(pc, ctx.isReadOnly(), disableLazyLoading, id); if (!disableLazyLoading) { ctx.register(property.name, ((EntityBean) ref)._ebean_getIntercept());
/** * Create lazy loading proxies for the Many's except for the one that is * included in the actual query. */ private void createListProxies(STreeType localDesc, DbReadContext ctx, EntityBean localBean, boolean disableLazyLoad) { STreePropertyAssocMany fetchedMany = ctx.getManyProperty(); // load the List/Set/Map proxy objects (deferred fetching of lists) for (STreePropertyAssocMany many : localDesc.propsMany()) { if (fetchedMany == null || !fetchedMany.equals(many)) { // create a proxy for the many (deferred fetching) BeanCollection<?> ref = many.createReferenceIfNull(localBean); if (ref != null) { if (disableLazyLoad) { ref.setDisableLazyLoad(true); } if (!ref.isRegisteredWithLoadContext()) { ctx.register(many.getName(), ref); } } } } }
if (readId) { ctx.register(null, ebi);
/** * Read and return the bean. */ Object read(DbReadContext ctx) throws SQLException { // Support for Inheritance hierarchy on exported OneToOne ? Object id = property.targetIdBinder.read(ctx); if (id == null) { return null; } PersistenceContext pc = ctx.getPersistenceContext(); Object existing = target.contextGet(pc, id); if (existing != null) { return existing; } boolean disableLazyLoading = ctx.isDisableLazyLoading(); Object ref = target.contextRef(pc, ctx.isReadOnly(), disableLazyLoading, id); if (!disableLazyLoading) { ctx.register(path, ((EntityBean) ref)._ebean_getIntercept()); } return ref; }
Object ref = desc.contextRef(pc, ctx.isReadOnly(), disableLazyLoading, id); if (!disableLazyLoading) { ctx.register(property.name, ((EntityBean) ref)._ebean_getIntercept());
if (readId) { ctx.register(null, ebi);