Browse Source

DATACMNS-61 - Adapted changes in Spring Data Commons.

Use QueryMethod accessor methods instead of dropped Type enum to determine query execution. Added custom MongoParameters and MongoParameter to allow discovering a Distance parameter for repository queries which will transparently add a 'maxDistance' clause for *Near criterias in query methods. If the given Distance is equipped with a Metric we will rather use $nearSphere over $near.

Added asList() to Point class to circumvent bug in BasicBSONObject.equals(…) which breaks equals(…) comparisons of DBObjects in case they use arrays as values. See [0] for details. Adapted usage of Point objects to use asList() over asArray().

[0] https://jira.mongodb.org/browse/JAVA-416
pull/1/head
Oliver Gierke 15 years ago
parent
commit
ce59d893ba
  1. 15
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/MongoParameters.java

15
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/repository/MongoParameters.java

@ -1,3 +1,18 @@
/*
* Copyright 2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.data.mongodb.repository; package org.springframework.data.mongodb.repository;
import java.lang.reflect.Method; import java.lang.reflect.Method;

Loading…
Cancel
Save