Browse Source

DATAMONGO-1001 - Renamed LazyLoadingProxy.initialize() to getTarget().

Original pull request: #208.
pull/210/merge
Christoph Strobl 12 years ago committed by Oliver Gierke
parent
commit
51e7be8aa0
  1. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/DefaultDbRefResolver.java
  2. 3
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/LazyLoadingProxy.java

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/DefaultDbRefResolver.java

@ -171,6 +171,7 @@ public class DefaultDbRefResolver implements DbRefResolver { @@ -171,6 +171,7 @@ public class DefaultDbRefResolver implements DbRefResolver {
*
* @author Thomas Darimont
* @author Oliver Gierke
* @author Christoph Strobl
*/
static class LazyLoadingInterceptor implements MethodInterceptor, org.springframework.cglib.proxy.MethodInterceptor,
Serializable {
@ -187,7 +188,7 @@ public class DefaultDbRefResolver implements DbRefResolver { @@ -187,7 +188,7 @@ public class DefaultDbRefResolver implements DbRefResolver {
static {
try {
INITIALIZE_METHOD = LazyLoadingProxy.class.getMethod("initialize");
INITIALIZE_METHOD = LazyLoadingProxy.class.getMethod("getTarget");
TO_DBREF_METHOD = LazyLoadingProxy.class.getMethod("toDBRef");
} catch (Exception e) {
throw new RuntimeException(e);

3
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/LazyLoadingProxy.java

@ -23,6 +23,7 @@ import com.mongodb.DBRef; @@ -23,6 +23,7 @@ import com.mongodb.DBRef;
* Allows direct interaction with the underlying {@link LazyLoadingInterceptor}.
*
* @author Thomas Darimont
* @author Christoph Strobl
* @since 1.5
*/
public interface LazyLoadingProxy {
@ -33,7 +34,7 @@ public interface LazyLoadingProxy { @@ -33,7 +34,7 @@ public interface LazyLoadingProxy {
* @return
* @since 1.5
*/
Object initialize();
Object getTarget();
/**
* Returns the {@link DBRef} represented by this {@link LazyLoadingProxy}, may be null.

Loading…
Cancel
Save