Skip to content

Commit

Permalink
Polishing.
Browse files Browse the repository at this point in the history
Refine type visibility.

Original pull request: #4728
See #4710
  • Loading branch information
mp911de committed Aug 28, 2024
1 parent e08cf35 commit ac0fd6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ public void setCodecRegistryProvider(@Nullable CodecRegistryProvider codecRegist
this.codecRegistryProvider = codecRegistryProvider;
}

@Override
public MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> getMappingContext() {
return mappingContext;
}
Expand Down Expand Up @@ -432,6 +433,7 @@ public Map<String, Object> getBean() {
}
}

@Override
public <S extends Object> S read(Class<S> clazz, Bson bson) {
return read(TypeInformation.of(clazz), bson);
}
Expand Down Expand Up @@ -729,6 +731,7 @@ private Object readUnwrapped(ConversionContext context, DocumentAccessor documen
return null;
}

@Override
public DBRef toDBRef(Object object, @Nullable MongoPersistentProperty referringProperty) {

org.springframework.data.mongodb.core.mapping.DBRef annotation;
Expand Down Expand Up @@ -795,6 +798,7 @@ DocumentPointer<?> createDocumentPointer(Object source, @Nullable MongoPersisten
*
* @see org.springframework.data.mongodb.core.convert.MongoWriter#write(java.lang.Object, java.lang.Object)
*/
@Override
public void write(Object obj, Bson bson) {

if (null == obj) {
Expand Down Expand Up @@ -934,7 +938,7 @@ private void writeAssociation(Association<MongoPersistentProperty> association,
}

@SuppressWarnings({ "unchecked" })
protected void writePropertyInternal(@Nullable Object obj, DocumentAccessor accessor, MongoPersistentProperty prop,
void writePropertyInternal(@Nullable Object obj, DocumentAccessor accessor, MongoPersistentProperty prop,
PersistentPropertyAccessor<?> persistentPropertyAccessor) {

if (obj == null) {
Expand Down Expand Up @@ -1610,13 +1614,13 @@ public Object convertToMongoType(@Nullable Object obj, @Nullable TypeInformation
}

@Override
public Object convertToMongoType(@Nullable Object obj, MongoPersistentEntity entity) {
public Object convertToMongoType(@Nullable Object obj, MongoPersistentEntity<?> entity) {
Document newDocument = new Document();
writeInternal(obj, newDocument, entity);
return newDocument;
}

// TODO: hide in 4.0
// TODO: hide in 5.0
public List<Object> maybeConvertList(Iterable<?> source, @Nullable TypeInformation<?> typeInformation) {

List<Object> newDbl = new ArrayList<>();
Expand Down Expand Up @@ -1948,6 +1952,7 @@ static class MongoDbPropertyValueProvider implements PropertyValueProvider<Mongo
this.spELContext = spELContext;
}

@Override
@Nullable
@SuppressWarnings("unchecked")
public <T> T getPropertyValue(MongoPersistentProperty property) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* @author Christoph Strobl
* @since 1.6
*/
class ObjectPath {
public class ObjectPath {

static final ObjectPath ROOT = new ObjectPath();

Expand Down

0 comments on commit ac0fd6c

Please sign in to comment.