/** * Loading embed object without instantiating owner entity */ public Object loadProjection(JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException { Boolean isNull = indicatesNull(res); if (isNull == null) return null; StoreContext ctx = store.getContext(); // load primary key of owner entity Object owner = field.getDefiningMapping().getObjectId(store, res, null, true, joins); OpenJPAStateManager em = ctx.embed(null, null, null, field); // set owner id ((StateManagerImpl) em).setOwner(owner); boolean needsLoad = loadFields(em, store, fetch, res); // After loading everything from result, load the rest of the // configured fields if anything is missing. if (needsLoad && fetch.requiresFetch(field.getFieldMetaData()) == JDBCFetchConfiguration.FETCH_LOAD) { em.load(fetch); } return em.getManagedInstance(); }
/** * Loading embed object without instantiating owner entity */ public Object loadProjection(JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException { Boolean isNull = indicatesNull(res); if (isNull == null) return null; StoreContext ctx = store.getContext(); // load primary key of owner entity Object owner = field.getDefiningMapping().getObjectId(store, res, null, true, joins); OpenJPAStateManager em = ctx.embed(null, null, null, field); // set owner id ((StateManagerImpl) em).setOwner(owner); boolean needsLoad = loadFields(em, store, fetch, res); // After loading everything from result, load the rest of the // configured fields if anything is missing. if (needsLoad && fetch.requiresFetch(field.getFieldMetaData()) == JDBCFetchConfiguration.FETCH_LOAD) { em.load(fetch); } return em.getManagedInstance(); }
/** * Loading embed object without instantiating owner entity */ public Object loadProjection(JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException { Boolean isNull = indicatesNull(res); if (isNull == null) return null; StoreContext ctx = store.getContext(); // load primary key of owner entity Object owner = field.getDefiningMapping().getObjectId(store, res, null, true, joins); OpenJPAStateManager em = ctx.embed(null, null, null, field); // set owner id ((StateManagerImpl) em).setOwner(owner); boolean needsLoad = loadFields(em, store, fetch, res); // After loading everything from result, load the rest of the // configured fields if anything is missing. if (needsLoad && fetch.requiresFetch(field.getFieldMetaData()) == JDBCFetchConfiguration.FETCH_LOAD) { em.load(fetch); } return em.getManagedInstance(); }
/** * Loading embed object without instantiating owner entity */ public Object loadProjection(JDBCStore store, JDBCFetchConfiguration fetch, Result res, Joins joins) throws SQLException { Boolean isNull = indicatesNull(res); if (isNull == null) return null; StoreContext ctx = store.getContext(); // load primary key of owner entity Object owner = field.getDefiningMapping().getObjectId(store, res, null, true, joins); OpenJPAStateManager em = ctx.embed(null, null, null, field); // set owner id ((StateManagerImpl) em).setOwner(owner); boolean needsLoad = loadFields(em, store, fetch, res); // After loading everything from result, load the rest of the // configured fields if anything is missing. if (needsLoad && fetch.requiresFetch(field.getFieldMetaData()) == JDBCFetchConfiguration.FETCH_LOAD) { em.load(fetch); } return em.getManagedInstance(); }
sm.setOwner((StateManagerImpl) owner, ownerMeta);
sm.setOwner((StateManagerImpl) owner, ownerMeta);
sm.setOwner((StateManagerImpl) owner, ownerMeta);
sm.setOwner((StateManagerImpl) owner, ownerMeta);
sm.setOwner((StateManagerImpl) owner, ownerMeta);