Browse Source

DATAJPA-19 - Adapted generics and metadata changes made in core.

pull/1/head
Oliver Gierke 15 years ago
parent
commit
4daab96bc4
  1. 7
      spring-data-mongodb/src/main/java/org/springframework/data/document/mongodb/repository/MongoQueryMethod.java
  2. 17
      spring-data-mongodb/src/main/java/org/springframework/data/document/mongodb/repository/SimpleMongoRepository.java

7
spring-data-mongodb/src/main/java/org/springframework/data/document/mongodb/repository/MongoQueryMethod.java

@ -15,17 +15,17 @@
*/ */
package org.springframework.data.document.mongodb.repository; package org.springframework.data.document.mongodb.repository;
import java.lang.reflect.Method;
import org.springframework.core.annotation.AnnotationUtils; import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.data.repository.query.QueryMethod; import org.springframework.data.repository.query.QueryMethod;
import org.springframework.data.repository.util.ClassUtils; import org.springframework.data.repository.util.ClassUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.lang.reflect.Method;
/** /**
*
* TODO - Extract methods for {@link #getAnnotatedQuery()} into superclass as it is currently copied from Spring Data * TODO - Extract methods for {@link #getAnnotatedQuery()} into superclass as it is currently copied from Spring Data
* JPA * JPA
*
* @author Oliver Gierke * @author Oliver Gierke
*/ */
class MongoQueryMethod extends QueryMethod { class MongoQueryMethod extends QueryMethod {
@ -38,7 +38,6 @@ class MongoQueryMethod extends QueryMethod {
* *
* @param method * @param method
*/ */
@SuppressWarnings({"unchecked"})
public MongoQueryMethod(Method method, Class<?> domainClass) { public MongoQueryMethod(Method method, Class<?> domainClass) {
super(method); super(method);
this.method = method; this.method = method;

17
spring-data-mongodb/src/main/java/org/springframework/data/document/mongodb/repository/SimpleMongoRepository.java

@ -15,6 +15,13 @@
*/ */
package org.springframework.data.document.mongodb.repository; package org.springframework.data.document.mongodb.repository;
import static org.springframework.data.document.mongodb.query.Criteria.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.bson.types.ObjectId; import org.bson.types.ObjectId;
import org.springframework.data.document.mongodb.MongoTemplate; import org.springframework.data.document.mongodb.MongoTemplate;
import org.springframework.data.document.mongodb.query.Criteria; import org.springframework.data.document.mongodb.query.Criteria;
@ -26,13 +33,6 @@ import org.springframework.data.domain.Sort;
import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import static org.springframework.data.document.mongodb.query.Criteria.where;
/** /**
* Repository base implementation for Mongo. * Repository base implementation for Mongo.
* *
@ -105,9 +105,6 @@ public class SimpleMongoRepository<T, ID extends Serializable> implements Paging
return where(entityInformation.getIdAttribute()).is(objectId); return where(entityInformation.getIdAttribute()).is(objectId);
} }
public T findOne(ID id) {
return null;
}
/* /*
* (non-Javadoc) * (non-Javadoc)

Loading…
Cancel
Save