|
1 | 1 | /*
|
2 |
| - * Copyright 2013-2015 the original author or authors. |
| 2 | + * Copyright 2013-2016 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -200,7 +200,8 @@ public void lazyLoadingProxyForLazyDbRefOnConcreteCollection() {
|
200 | 200 |
|
201 | 201 | BasicDBObject dbo = new BasicDBObject();
|
202 | 202 | ClassWithLazyDbRefs lazyDbRefs = new ClassWithLazyDbRefs();
|
203 |
| - lazyDbRefs.dbRefToConcreteCollection = new ArrayList<LazyDbRefTarget>(Arrays.asList(new LazyDbRefTarget(id, value))); |
| 203 | + lazyDbRefs.dbRefToConcreteCollection = new ArrayList<LazyDbRefTarget>( |
| 204 | + Arrays.asList(new LazyDbRefTarget(id, value))); |
204 | 205 | converterSpy.write(lazyDbRefs, dbo);
|
205 | 206 |
|
206 | 207 | ClassWithLazyDbRefs result = converterSpy.read(ClassWithLazyDbRefs.class, dbo);
|
@@ -248,8 +249,8 @@ public void lazyLoadingProxyForLazyDbRefOnConcreteTypeWithPersistenceConstructor
|
248 | 249 |
|
249 | 250 | BasicDBObject dbo = new BasicDBObject();
|
250 | 251 | ClassWithLazyDbRefs lazyDbRefs = new ClassWithLazyDbRefs();
|
251 |
| - lazyDbRefs.dbRefToConcreteTypeWithPersistenceConstructor = new LazyDbRefTargetWithPeristenceConstructor( |
252 |
| - (Object) id, (Object) value); |
| 252 | + lazyDbRefs.dbRefToConcreteTypeWithPersistenceConstructor = new LazyDbRefTargetWithPeristenceConstructor((Object) id, |
| 253 | + (Object) value); |
253 | 254 | converterSpy.write(lazyDbRefs, dbo);
|
254 | 255 |
|
255 | 256 | ClassWithLazyDbRefs result = converterSpy.read(ClassWithLazyDbRefs.class, dbo);
|
@@ -733,18 +734,23 @@ static class ClassWithLazyDbRefs {
|
733 | 734 |
|
734 | 735 | @Id String id;
|
735 | 736 | @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) List<LazyDbRefTarget> dbRefToInterface;
|
736 |
| - @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) ArrayList<LazyDbRefTarget> dbRefToConcreteCollection; |
| 737 | + @org.springframework.data.mongodb.core.mapping.DBRef( |
| 738 | + lazy = true) ArrayList<LazyDbRefTarget> dbRefToConcreteCollection; |
737 | 739 | @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) LazyDbRefTarget dbRefToConcreteType;
|
738 |
| - @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) LazyDbRefTargetPropertyAccess dbRefToConcreteTypeWithPropertyAccess; |
739 |
| - @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) LazyDbRefTargetWithPeristenceConstructor dbRefToConcreteTypeWithPersistenceConstructor; |
740 |
| - @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) LazyDbRefTargetWithPeristenceConstructorWithoutDefaultConstructor dbRefToConcreteTypeWithPersistenceConstructorWithoutDefaultConstructor; |
| 740 | + @org.springframework.data.mongodb.core.mapping.DBRef( |
| 741 | + lazy = true) LazyDbRefTargetPropertyAccess dbRefToConcreteTypeWithPropertyAccess; |
| 742 | + @org.springframework.data.mongodb.core.mapping.DBRef( |
| 743 | + lazy = true) LazyDbRefTargetWithPeristenceConstructor dbRefToConcreteTypeWithPersistenceConstructor; |
| 744 | + @org.springframework.data.mongodb.core.mapping.DBRef( |
| 745 | + lazy = true) LazyDbRefTargetWithPeristenceConstructorWithoutDefaultConstructor dbRefToConcreteTypeWithPersistenceConstructorWithoutDefaultConstructor; |
741 | 746 | }
|
742 | 747 |
|
743 | 748 | static class SerializableClassWithLazyDbRefs implements Serializable {
|
744 | 749 |
|
745 | 750 | private static final long serialVersionUID = 1L;
|
746 | 751 |
|
747 |
| - @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) SerializableLazyDbRefTarget dbRefToSerializableTarget; |
| 752 | + @org.springframework.data.mongodb.core.mapping.DBRef( |
| 753 | + lazy = true) SerializableLazyDbRefTarget dbRefToSerializableTarget; |
748 | 754 | }
|
749 | 755 |
|
750 | 756 | static class LazyDbRefTarget implements Serializable {
|
@@ -901,9 +907,12 @@ public boolean equals(Object obj) {
|
901 | 907 | static class WithObjectMethodOverrideLazyDbRefs {
|
902 | 908 |
|
903 | 909 | @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) LazyDbRefTarget dbRefToPlainObject;
|
904 |
| - @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) ToStringObjectMethodOverrideLazyDbRefTarget dbRefToToStringObjectMethodOverride; |
905 |
| - @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) EqualsAndHashCodeObjectMethodOverrideLazyDbRefTarget dbRefEqualsAndHashcodeObjectMethodOverride2; |
906 |
| - @org.springframework.data.mongodb.core.mapping.DBRef(lazy = true) EqualsAndHashCodeObjectMethodOverrideLazyDbRefTarget dbRefEqualsAndHashcodeObjectMethodOverride1; |
| 910 | + @org.springframework.data.mongodb.core.mapping.DBRef( |
| 911 | + lazy = true) ToStringObjectMethodOverrideLazyDbRefTarget dbRefToToStringObjectMethodOverride; |
| 912 | + @org.springframework.data.mongodb.core.mapping.DBRef( |
| 913 | + lazy = true) EqualsAndHashCodeObjectMethodOverrideLazyDbRefTarget dbRefEqualsAndHashcodeObjectMethodOverride2; |
| 914 | + @org.springframework.data.mongodb.core.mapping.DBRef( |
| 915 | + lazy = true) EqualsAndHashCodeObjectMethodOverrideLazyDbRefTarget dbRefEqualsAndHashcodeObjectMethodOverride1; |
907 | 916 | }
|
908 | 917 |
|
909 | 918 | class ClassWithDbRefField {
|
|
0 commit comments