@Override public Object resolveDbRef(MongoPersistentProperty property, @Nullable DBRef dbref, DbRefResolverCallback callback, DbRefProxyHandler handler) { Assert.notNull(property, "Property must not be null!"); Assert.notNull(callback, "Callback must not be null!"); Assert.notNull(handler, "Handler must not be null!"); if (isLazyDbRef(property)) { return createLazyLoadingProxy(property, dbref, callback, handler); } return callback.resolve(property); }
/** * Resolves the proxy into its backing object. * * @return */ @Nullable private synchronized Object resolve() { if (!resolved) { try { return callback.resolve(property); } catch (RuntimeException ex) { DataAccessException translatedException = this.exceptionTranslator.translateExceptionIfPossible(ex); if (translatedException instanceof ClientSessionException) { throw new LazyLoadingException("Unable to lazily resolve DBRef! Invalid session state.", ex); } throw new LazyLoadingException("Unable to lazily resolve DBRef!", translatedException != null ? translatedException : ex); } } return result; } }
@Override public Object resolveDbRef(MongoPersistentProperty property, @Nullable DBRef dbref, DbRefResolverCallback callback, DbRefProxyHandler handler) { Assert.notNull(property, "Property must not be null!"); Assert.notNull(callback, "Callback must not be null!"); Assert.notNull(handler, "Handler must not be null!"); if (isLazyDbRef(property)) { return createLazyLoadingProxy(property, dbref, callback, handler); } return callback.resolve(property); }
/** * Resolves the proxy into its backing object. * * @return */ @Nullable private synchronized Object resolve() { if (!resolved) { try { return callback.resolve(property); } catch (RuntimeException ex) { DataAccessException translatedException = this.exceptionTranslator.translateExceptionIfPossible(ex); if (translatedException instanceof ClientSessionException) { throw new LazyLoadingException("Unable to lazily resolve DBRef! Invalid session state.", ex); } throw new LazyLoadingException("Unable to lazily resolve DBRef!", translatedException != null ? translatedException : ex); } } return result; } }
@Override public Object resolveDbRef(MongoPersistentProperty property, DBRef dbref, DbRefResolverCallback callback, DbRefProxyHandler handler) { Assert.notNull(property, "Property must not be null!"); Assert.notNull(callback, "Callback must not be null!"); if (isLazyDbRef(property)) { return createLazyLoadingProxy(property, dbref, callback, handler); } return callback.resolve(property); }
/** * Resolves the proxy into its backing object. * * @return */ private synchronized Object resolve() { if (!resolved) { try { return callback.resolve(property); } catch (RuntimeException ex) { DataAccessException translatedException = this.exceptionTranslator.translateExceptionIfPossible(ex); throw new LazyLoadingException("Unable to lazily resolve DBRef!", translatedException); } } return result; } }