DATADOC-175 - Broke up cyclic dependencies and added architecture management file.

Added initial architecture description for Sonargraph. Moved some types around and introduced core package to break up cyclic dependencies.
This commit is contained in:
Oliver Gierke
2011-07-13 09:38:08 +02:00
parent 1604c80d32
commit 523612a3a9
200 changed files with 678 additions and 558 deletions

View File

@@ -11,8 +11,8 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.dao.DataAccessException; import org.springframework.dao.DataAccessException;
import org.springframework.dao.DataAccessResourceFailureException; import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.dao.DataIntegrityViolationException; import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.data.mongodb.CollectionCallback; import org.springframework.data.mongodb.core.CollectionCallback;
import org.springframework.data.mongodb.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.persistence.ChangeSet; import org.springframework.data.persistence.ChangeSet;
import org.springframework.data.persistence.ChangeSetBacked; import org.springframework.data.persistence.ChangeSetBacked;
import org.springframework.data.persistence.ChangeSetPersister; import org.springframework.data.persistence.ChangeSetPersister;

View File

@@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.document.persistence.test.Address; import org.springframework.data.document.persistence.test.Address;
import org.springframework.data.document.persistence.test.Person; import org.springframework.data.document.persistence.test.Person;
import org.springframework.data.document.persistence.test.Resume; import org.springframework.data.document.persistence.test.Resume;
import org.springframework.data.mongodb.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.test.annotation.Rollback; import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

View File

@@ -4,7 +4,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.bson.types.ObjectId; import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.mapping.Document; import org.springframework.data.mongodb.core.mapping.Document;
@Document @Document
public class Resume { public class Resume {

View File

@@ -20,22 +20,22 @@
<mongo:mapping-converter/> <mongo:mapping-converter/>
<!-- Mongo config --> <!-- Mongo config -->
<bean id="mongo" class="org.springframework.data.mongodb.MongoFactoryBean"> <bean id="mongo" class="org.springframework.data.mongodb.core.MongoFactoryBean">
<property name="host" value="localhost"/> <property name="host" value="localhost"/>
<property name="port" value="27017"/> <property name="port" value="27017"/>
</bean> </bean>
<bean id="mongoDbFactory" class="org.springframework.data.mongodb.SimpleMongoDbFactory"> <bean id="mongoDbFactory" class="org.springframework.data.mongodb.core.SimpleMongoDbFactory">
<constructor-arg name="mongo" ref="mongo"/> <constructor-arg name="mongo" ref="mongo"/>
<constructor-arg name="databaseName" value="database"/> <constructor-arg name="databaseName" value="database"/>
</bean> </bean>
<bean id="mongoTemplate" class="org.springframework.data.mongodb.MongoTemplate"> <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg name="mongoDbFactory" ref="mongoDbFactory"/> <constructor-arg name="mongoDbFactory" ref="mongoDbFactory"/>
<constructor-arg name="mongoConverter" ref="mappingConverter"/> <constructor-arg name="mongoConverter" ref="mappingConverter"/>
</bean> </bean>
<bean class="org.springframework.data.mongodb.MongoExceptionTranslator"/> <bean class="org.springframework.data.mongodb.core.MongoExceptionTranslator"/>
<!-- Mongo aspect config --> <!-- Mongo aspect config -->
<bean class="org.springframework.data.persistence.document.mongodb.MongoDocumentBacking" <bean class="org.springframework.data.persistence.document.mongodb.MongoDocumentBacking"

View File

@@ -0,0 +1,118 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<context version="7.0.1.1111">
<scope name="spring-data-mongodb" type="Project">
<element name="Filter" type="TypeFilterReferenceOverridden">
<element name="org.springframework.data.mongodb.core.**" type="IncludeTypePattern"/>
</element>
<architecture>
<element name="Config" type="Layer">
<element name="Assignment" type="TypeFilter">
<element name="**.config.**" type="IncludeTypePattern"/>
</element>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Core"/>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Monitoring"/>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Repositories"/>
</element>
<element name="Repositories" type="Layer">
<element name="Assignment" type="TypeFilter">
<element name="**.repository.**" type="IncludeTypePattern"/>
</element>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Core"/>
</element>
<element name="Monitoring" type="Layer">
<element name="Assignment" type="TypeFilter">
<element name="**.monitor.**" type="IncludeTypePattern"/>
</element>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Core"/>
</element>
<element name="Core" type="Layer">
<element name="Assignment" type="TypeFilter">
<element name="org.springframework.data.mongodb.core.**" type="IncludeTypePattern"/>
<element name="**.repository.**" type="ExcludeTypePattern"/>
<element name="**.config.**" type="ExcludeTypePattern"/>
<element name="**.monitor.**" type="ExcludeTypePattern"/>
</element>
<element name="Mapping" type="Subsystem">
<element name="Assignment" type="TypeFilter">
<element name="**.mapping.**" type="IncludeTypePattern"/>
</element>
</element>
<element name="Geospatial" type="Subsystem">
<element name="Assignment" type="TypeFilter">
<element name="**.geo.**" type="IncludeTypePattern"/>
</element>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Core::Subsystem|Mapping"/>
</element>
<element name="Query" type="Subsystem">
<element name="Assignment" type="TypeFilter">
<element name="**.query.**" type="IncludeTypePattern"/>
</element>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Core::Subsystem|Geospatial"/>
</element>
<element name="Index" type="Subsystem">
<element name="Assignment" type="TypeFilter">
<element name="**.index.**" type="IncludeTypePattern"/>
</element>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Core::Subsystem|Mapping"/>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Core::Subsystem|Query"/>
</element>
<element name="Core" type="Subsystem">
<element name="Assignment" type="TypeFilter">
<element name="**.core.**" type="WeakTypePattern"/>
</element>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Core::Subsystem|Index"/>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Core::Subsystem|Mapping"/>
<dependency type="AllowedDependency" toName="Project|spring-data-mongodb::Layer|Core::Subsystem|Query"/>
</element>
</element>
</architecture>
<workspace>
<element name="src/main/java" type="JavaRootDirectory">
<reference name="Project|spring-data-mongodb::BuildUnit|spring-data-mongodb"/>
</element>
<element name="target/classes" type="JavaRootDirectory">
<reference name="Project|spring-data-mongodb::BuildUnit|spring-data-mongodb"/>
</element>
</workspace>
<physical>
<element name="spring-data-mongodb" type="BuildUnit"/>
</physical>
</scope>
<scope name="External" type="External">
<element name="Filter" type="TypeFilter">
<element name="**" type="IncludeTypePattern"/>
<element name="java.**" type="ExcludeTypePattern"/>
<element name="javax.**" type="ExcludeTypePattern"/>
</element>
<architecture>
<element name="Spring" type="Subsystem">
<element name="Assignment" type="TypeFilter">
<element name="org.springframework.**" type="IncludeTypePattern"/>
<element name="org.springframework.data.**" type="ExcludeTypePattern"/>
</element>
</element>
<element name="Spring Data Core" type="Subsystem">
<element name="Assignment" type="TypeFilter">
<element name="org.springframework.data.**" type="IncludeTypePattern"/>
</element>
</element>
<element name="Mongo Java Driver" type="Subsystem">
<element name="Assignment" type="TypeFilter">
<element name="com.mongodb.**" type="IncludeTypePattern"/>
<element name="org.bson.**" type="IncludeTypePattern"/>
</element>
</element>
<element name="Querydsl" type="Subsystem">
<element name="Assignment" type="TypeFilter">
<element name="com.mysema.query.**" type="IncludeTypePattern"/>
</element>
</element>
</architecture>
</scope>
<scope name="Global" type="Global">
<element name="Configuration" type="Configuration"/>
<element name="Filter" type="TypeFilter">
<element name="**" type="IncludeTypePattern"/>
</element>
</scope>
</context>

View File

@@ -28,11 +28,11 @@ import org.springframework.data.annotation.Persistent;
import org.springframework.data.authentication.UserCredentials; import org.springframework.data.authentication.UserCredentials;
import org.springframework.data.mapping.context.MappingContextAwareBeanPostProcessor; import org.springframework.data.mapping.context.MappingContextAwareBeanPostProcessor;
import org.springframework.data.mongodb.MongoDbFactory; import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.SimpleMongoDbFactory; import org.springframework.data.mongodb.core.SimpleMongoDbFactory;
import org.springframework.data.mongodb.convert.MappingMongoConverter; import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
import org.springframework.data.mongodb.mapping.Document; import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.mapping.MongoMappingContext; import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@@ -39,11 +39,11 @@ import org.springframework.context.annotation.ClassPathScanningCandidateComponen
import org.springframework.core.type.filter.AnnotationTypeFilter; import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.data.annotation.Persistent; import org.springframework.data.annotation.Persistent;
import org.springframework.data.mapping.context.MappingContextAwareBeanPostProcessor; import org.springframework.data.mapping.context.MappingContextAwareBeanPostProcessor;
import org.springframework.data.mongodb.convert.CustomConversions; import org.springframework.data.mongodb.core.convert.CustomConversions;
import org.springframework.data.mongodb.convert.MappingMongoConverter; import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
import org.springframework.data.mongodb.mapping.Document; import org.springframework.data.mongodb.core.index.MongoPersistentEntityIndexCreator;
import org.springframework.data.mongodb.mapping.MongoMappingContext; import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.mapping.MongoPersistentEntityIndexCreator; import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils; import org.springframework.util.xml.DomUtils;
import org.w3c.dom.Element; import org.w3c.dom.Element;

View File

@@ -26,8 +26,8 @@ import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser; import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext; import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.data.authentication.UserCredentials; import org.springframework.data.authentication.UserCredentials;
import org.springframework.data.mongodb.MongoFactoryBean; import org.springframework.data.mongodb.core.MongoFactoryBean;
import org.springframework.data.mongodb.SimpleMongoDbFactory; import org.springframework.data.mongodb.core.SimpleMongoDbFactory;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.w3c.dom.Element; import org.w3c.dom.Element;

View File

@@ -21,7 +21,7 @@ import org.springframework.beans.factory.parsing.CompositeComponentDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.BeanDefinitionParser; import org.springframework.beans.factory.xml.BeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext; import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.data.mongodb.MongoAdmin; import org.springframework.data.mongodb.core.MongoAdmin;
import org.springframework.data.mongodb.monitor.*; import org.springframework.data.mongodb.monitor.*;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.w3c.dom.Element; import org.w3c.dom.Element;

View File

@@ -22,8 +22,8 @@ import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.ManagedList; import org.springframework.beans.factory.support.ManagedList;
import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser; import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser;
import org.springframework.beans.factory.xml.ParserContext; import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.data.mongodb.MongoFactoryBean; import org.springframework.data.mongodb.core.MongoFactoryBean;
import org.springframework.data.mongodb.MongoOptionsFactoryBean; import org.springframework.data.mongodb.core.MongoOptionsFactoryBean;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils; import org.springframework.util.xml.DomUtils;
import org.w3c.dom.Element; import org.w3c.dom.Element;

View File

@@ -19,7 +19,7 @@ package org.springframework.data.mongodb.config;
import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.ManagedList; import org.springframework.beans.factory.support.ManagedList;
import org.springframework.beans.factory.xml.ParserContext; import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.data.mongodb.MongoOptionsFactoryBean; import org.springframework.data.mongodb.core.MongoOptionsFactoryBean;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils; import org.springframework.util.xml.DomUtils;
import org.w3c.dom.Element; import org.w3c.dom.Element;

View File

@@ -48,7 +48,7 @@ public class SimpleMongoRepositoryConfiguration
} }
/** /**
* Returns the bean name of the {@link org.springframework.data.mongodb.MongoTemplate} to be referenced. * Returns the bean name of the {@link org.springframework.data.mongodb.core.core.MongoTemplate} to be referenced.
* *
* @return * @return
*/ */

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import com.mongodb.DBCollection; import com.mongodb.DBCollection;
import com.mongodb.MongoException; import com.mongodb.MongoException;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
/** /**
* Provides a simple wrapper to encapsulate the variety of settings you can use when creating a collection. * Provides a simple wrapper to encapsulate the variety of settings you can use when creating a collection.

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import com.mongodb.DBCursor; import com.mongodb.DBCursor;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import com.mongodb.DB; import com.mongodb.DB;
import com.mongodb.MongoException; import com.mongodb.MongoException;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import com.mongodb.DB; import com.mongodb.DB;
import com.mongodb.Mongo; import com.mongodb.Mongo;
@@ -45,7 +45,7 @@ public class MongoAdmin implements MongoAdminOperations {
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.MongoAdminOperations#dropDatabase(java.lang.String) * @see org.springframework.data.mongodb.core.core.MongoAdminOperations#dropDatabase(java.lang.String)
*/ */
@ManagedOperation @ManagedOperation
public void dropDatabase(String databaseName) { public void dropDatabase(String databaseName) {
@@ -53,7 +53,7 @@ public class MongoAdmin implements MongoAdminOperations {
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.MongoAdminOperations#createDatabase(java.lang.String) * @see org.springframework.data.mongodb.core.core.MongoAdminOperations#createDatabase(java.lang.String)
*/ */
@ManagedOperation @ManagedOperation
public void createDatabase(String databaseName) { public void createDatabase(String databaseName) {
@@ -61,7 +61,7 @@ public class MongoAdmin implements MongoAdminOperations {
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.MongoAdminOperations#getDatabaseStats(java.lang.String) * @see org.springframework.data.mongodb.core.core.MongoAdminOperations#getDatabaseStats(java.lang.String)
*/ */
@ManagedOperation @ManagedOperation
public String getDatabaseStats(String databaseName) { public String getDatabaseStats(String databaseName) {

View File

@@ -1,4 +1,4 @@
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import org.springframework.jmx.export.annotation.ManagedOperation; import org.springframework.jmx.export.annotation.ManagedOperation;

View File

@@ -14,12 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import com.mongodb.DB; import com.mongodb.DB;
import com.mongodb.Mongo; import com.mongodb.Mongo;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.data.mongodb.CannotGetMongoDbConnectionException;
import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.transaction.support.TransactionSynchronizationManager;
import org.springframework.util.Assert; import org.springframework.util.Assert;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
public interface MongoDocumentWriter { public interface MongoDocumentWriter {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import com.mongodb.MongoException; import com.mongodb.MongoException;
import com.mongodb.MongoException.CursorNotFound; import com.mongodb.MongoException.CursorNotFound;
@@ -28,6 +28,7 @@ import org.springframework.dao.DuplicateKeyException;
import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.dao.InvalidDataAccessResourceUsageException; import org.springframework.dao.InvalidDataAccessResourceUsageException;
import org.springframework.dao.support.PersistenceExceptionTranslator; import org.springframework.dao.support.PersistenceExceptionTranslator;
import org.springframework.data.mongodb.UncategorizedMongoDbException;
/** /**
* Simple {@link PersistenceExceptionTranslator} for Mongo. Convert the given runtime exception to an appropriate * Simple {@link PersistenceExceptionTranslator} for Mongo. Convert the given runtime exception to an appropriate

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import java.util.List; import java.util.List;
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.dao.DataAccessException; import org.springframework.dao.DataAccessException;
import org.springframework.dao.support.PersistenceExceptionTranslator; import org.springframework.dao.support.PersistenceExceptionTranslator;
import org.springframework.data.mongodb.CannotGetMongoDbConnectionException;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
@@ -24,9 +24,9 @@ import com.mongodb.DBCollection;
import com.mongodb.DBObject; import com.mongodb.DBObject;
import com.mongodb.WriteResult; import com.mongodb.WriteResult;
import org.springframework.data.mongodb.index.IndexDefinition; import org.springframework.data.mongodb.core.index.IndexDefinition;
import org.springframework.data.mongodb.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.query.Update; import org.springframework.data.mongodb.core.query.Update;
/** /**
* Interface that specifies a basic set of MongoDB operations. Implemented by {@link MongoTemplate}. Not often used but * Interface that specifies a basic set of MongoDB operations. Implemented by {@link MongoTemplate}. Not often used but

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import com.mongodb.MongoOptions; import com.mongodb.MongoOptions;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import org.springframework.transaction.support.ResourceHolder; import org.springframework.transaction.support.ResourceHolder;
import org.springframework.transaction.support.ResourceHolderSynchronization; import org.springframework.transaction.support.ResourceHolderSynchronization;

View File

@@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import static org.springframework.data.mongodb.query.Criteria.*; import static org.springframework.data.mongodb.core.query.Criteria.*;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList; import java.util.ArrayList;
@@ -56,23 +56,25 @@ import org.springframework.data.authentication.UserCredentials;
import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.mapping.model.BeanWrapper; import org.springframework.data.mapping.model.BeanWrapper;
import org.springframework.data.mapping.model.MappingException; import org.springframework.data.mapping.model.MappingException;
import org.springframework.data.mongodb.convert.MappingMongoConverter; import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.convert.MongoConverter; import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
import org.springframework.data.mongodb.index.IndexDefinition; import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.data.mongodb.mapping.MongoMappingContext; import org.springframework.data.mongodb.core.convert.MongoReader;
import org.springframework.data.mongodb.mapping.MongoPersistentEntity; import org.springframework.data.mongodb.core.convert.MongoWriter;
import org.springframework.data.mongodb.mapping.MongoPersistentEntityIndexCreator; import org.springframework.data.mongodb.core.index.IndexDefinition;
import org.springframework.data.mongodb.mapping.MongoPersistentProperty; import org.springframework.data.mongodb.core.index.MongoMappingEventPublisher;
import org.springframework.data.mongodb.mapping.event.AfterConvertEvent; import org.springframework.data.mongodb.core.index.MongoPersistentEntityIndexCreator;
import org.springframework.data.mongodb.mapping.event.AfterLoadEvent; import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
import org.springframework.data.mongodb.mapping.event.AfterSaveEvent; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.mapping.event.BeforeConvertEvent; import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
import org.springframework.data.mongodb.mapping.event.BeforeSaveEvent; import org.springframework.data.mongodb.core.mapping.event.AfterConvertEvent;
import org.springframework.data.mongodb.mapping.event.MongoMappingEvent; import org.springframework.data.mongodb.core.mapping.event.AfterLoadEvent;
import org.springframework.data.mongodb.mapping.event.MongoMappingEventPublisher; import org.springframework.data.mongodb.core.mapping.event.AfterSaveEvent;
import org.springframework.data.mongodb.query.Query; import org.springframework.data.mongodb.core.mapping.event.BeforeConvertEvent;
import org.springframework.data.mongodb.query.QueryMapper; import org.springframework.data.mongodb.core.mapping.event.BeforeSaveEvent;
import org.springframework.data.mongodb.query.Update; import org.springframework.data.mongodb.core.mapping.event.MongoMappingEvent;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;
import org.springframework.jca.cci.core.ConnectionCallback; import org.springframework.jca.cci.core.ConnectionCallback;
import org.springframework.util.Assert; import org.springframework.util.Assert;
@@ -244,7 +246,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
/** /**
* Returns the default * Returns the default
* {@link org.springframework.data.mongodb.convert.MongoConverter}. * {@link org.springframework.data.mongodb.core.core.convert.MongoConverter}.
* *
* @return * @return
*/ */
@@ -254,7 +256,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
/** /**
* Returns the * Returns the
* {@link org.springframework.data.mongodb.MongoDbFactory}. * {@link org.springframework.data.mongodb.core.MongoDbFactory}.
* *
* @return * @return
*/ */
@@ -269,7 +271,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see org.springframework.data.mongodb.MongoOperations# * @see org.springframework.data.mongodb.core.core.MongoOperations#
* getDefaultCollectionName() * getDefaultCollectionName()
*/ */
public String getCollectionName(Class<?> entityClass) { public String getCollectionName(Class<?> entityClass) {
@@ -280,7 +282,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#executeCommand * org.springframework.data.mongodb.core.core.MongoOperations#executeCommand
* (java.lang.String) * (java.lang.String)
*/ */
public CommandResult executeCommand(String jsonCommand) { public CommandResult executeCommand(String jsonCommand) {
@@ -291,7 +293,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#executeCommand * org.springframework.data.mongodb.core.core.MongoOperations#executeCommand
* (com.mongodb.DBObject) * (com.mongodb.DBObject)
*/ */
public CommandResult executeCommand(final DBObject command) { public CommandResult executeCommand(final DBObject command) {
@@ -319,7 +321,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#execute(org. * org.springframework.data.mongodb.core.core.MongoOperations#execute(org.
* springframework.data.document.mongodb.DBCallback) * springframework.data.document.mongodb.DBCallback)
*/ */
public <T> T execute(DbCallback<T> action) { public <T> T execute(DbCallback<T> action) {
@@ -338,7 +340,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#execute(org. * org.springframework.data.mongodb.core.core.MongoOperations#execute(org.
* springframework.data.document.mongodb.CollectionCallback) * springframework.data.document.mongodb.CollectionCallback)
*/ */
public <T> T execute(Class<?> entityClass, CollectionCallback<T> callback) { public <T> T execute(Class<?> entityClass, CollectionCallback<T> callback) {
@@ -349,7 +351,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#execute(org. * org.springframework.data.mongodb.core.core.MongoOperations#execute(org.
* springframework.data.document.mongodb.CollectionCallback, * springframework.data.document.mongodb.CollectionCallback,
* java.lang.String) * java.lang.String)
*/ */
@@ -370,8 +372,8 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#executeInSession * org.springframework.data.mongodb.core.core.MongoOperations#executeInSession
* (org.springframework.data.mongodb.DBCallback) * (org.springframework.data.mongodb.core.core.DBCallback)
*/ */
public <T> T executeInSession(final DbCallback<T> action) { public <T> T executeInSession(final DbCallback<T> action) {
@@ -391,7 +393,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#createCollection * org.springframework.data.mongodb.core.core.MongoOperations#createCollection
* (java.lang.Class) * (java.lang.Class)
*/ */
public <T> DBCollection createCollection(Class<T> entityClass) { public <T> DBCollection createCollection(Class<T> entityClass) {
@@ -402,9 +404,9 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#createCollection * org.springframework.data.mongodb.core.core.MongoOperations#createCollection
* (java.lang.Class, * (java.lang.Class,
* org.springframework.data.mongodb.CollectionOptions) * org.springframework.data.mongodb.core.core.CollectionOptions)
*/ */
public <T> DBCollection createCollection(Class<T> entityClass, public <T> DBCollection createCollection(Class<T> entityClass,
CollectionOptions collectionOptions) { CollectionOptions collectionOptions) {
@@ -415,7 +417,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#createCollection * org.springframework.data.mongodb.core.core.MongoOperations#createCollection
* (java.lang.String) * (java.lang.String)
*/ */
public DBCollection createCollection(final String collectionName) { public DBCollection createCollection(final String collectionName) {
@@ -426,9 +428,9 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#createCollection * org.springframework.data.mongodb.core.core.MongoOperations#createCollection
* (java.lang.String, * (java.lang.String,
* org.springframework.data.mongodb.CollectionOptions) * org.springframework.data.mongodb.core.core.CollectionOptions)
*/ */
public DBCollection createCollection(final String collectionName, public DBCollection createCollection(final String collectionName,
final CollectionOptions collectionOptions) { final CollectionOptions collectionOptions) {
@@ -440,7 +442,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#getCollection * org.springframework.data.mongodb.core.core.MongoOperations#getCollection
* (java.lang.String) * (java.lang.String)
*/ */
public DBCollection getCollection(final String collectionName) { public DBCollection getCollection(final String collectionName) {
@@ -456,7 +458,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#collectionExists * org.springframework.data.mongodb.core.core.MongoOperations#collectionExists
* (java.lang.Class) * (java.lang.Class)
*/ */
public <T> boolean collectionExists(Class<T> entityClass) { public <T> boolean collectionExists(Class<T> entityClass) {
@@ -467,7 +469,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#collectionExists * org.springframework.data.mongodb.core.core.MongoOperations#collectionExists
* (java.lang.String) * (java.lang.String)
*/ */
public boolean collectionExists(final String collectionName) { public boolean collectionExists(final String collectionName) {
@@ -483,7 +485,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#dropCollection * org.springframework.data.mongodb.core.core.MongoOperations#dropCollection
* (java.lang.Class) * (java.lang.Class)
*/ */
public <T> void dropCollection(Class<T> entityClass) { public <T> void dropCollection(Class<T> entityClass) {
@@ -496,7 +498,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#dropCollection * org.springframework.data.mongodb.core.core.MongoOperations#dropCollection
* (java.lang.String) * (java.lang.String)
*/ */
public void dropCollection(String collectionName) { public void dropCollection(String collectionName) {
@@ -628,7 +630,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#insert(java * org.springframework.data.mongodb.core.core.MongoOperations#insert(java
* .lang .Object) * .lang .Object)
*/ */
public void insert(Object objectToSave) { public void insert(Object objectToSave) {
@@ -640,7 +642,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#insert(java * org.springframework.data.mongodb.core.core.MongoOperations#insert(java
* .lang .String, java.lang.Object) * .lang .String, java.lang.Object)
*/ */
public void insert(Object objectToSave, String collectionName) { public void insert(Object objectToSave, String collectionName) {
@@ -701,7 +703,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#insertList(java * org.springframework.data.mongodb.core.core.MongoOperations#insertList(java
* .util.List) * .util.List)
*/ */
public void insert(Collection<? extends Object> batchToSave, Class<?> entityClass) { public void insert(Collection<? extends Object> batchToSave, Class<?> entityClass) {
@@ -712,7 +714,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#insertList(java * org.springframework.data.mongodb.core.core.MongoOperations#insertList(java
* .lang.String, java.util.List) * .lang.String, java.util.List)
*/ */
public void insert(Collection<? extends Object> batchToSave, public void insert(Collection<? extends Object> batchToSave,
@@ -724,7 +726,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#insertAll(java * org.springframework.data.mongodb.core.core.MongoOperations#insertAll(java
* .util.Collection) * .util.Collection)
*/ */
public void insertAll(Collection<? extends Object> objectsToSave) { public void insertAll(Collection<? extends Object> objectsToSave) {
@@ -790,7 +792,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#save(java.lang * org.springframework.data.mongodb.core.core.MongoOperations#save(java.lang
* .Object) * .Object)
*/ */
public void save(Object objectToSave) { public void save(Object objectToSave) {
@@ -801,7 +803,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#save(java.lang * org.springframework.data.mongodb.core.core.MongoOperations#save(java.lang
* .String, java.lang.Object) * .String, java.lang.Object)
*/ */
public void save(Object objectToSave, String collectionName) { public void save(Object objectToSave, String collectionName) {
@@ -901,7 +903,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#updateFirst(com * org.springframework.data.mongodb.core.core.MongoOperations#updateFirst(com
* .mongodb.DBObject, com.mongodb.DBObject) * .mongodb.DBObject, com.mongodb.DBObject)
*/ */
public WriteResult updateFirst(Query query, Update update, public WriteResult updateFirst(Query query, Update update,
@@ -914,7 +916,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#updateFirst * org.springframework.data.mongodb.core.core.MongoOperations#updateFirst
* (java .lang.String, com.mongodb.DBObject, com.mongodb.DBObject) * (java .lang.String, com.mongodb.DBObject, com.mongodb.DBObject)
*/ */
public WriteResult updateFirst(final Query query, public WriteResult updateFirst(final Query query,
@@ -926,7 +928,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#updateMulti(com * org.springframework.data.mongodb.core.core.MongoOperations#updateMulti(com
* .mongodb.DBObject, com.mongodb.DBObject) * .mongodb.DBObject, com.mongodb.DBObject)
*/ */
public WriteResult updateMulti(Query query, Update update, public WriteResult updateMulti(Query query, Update update,
@@ -939,7 +941,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#updateMulti * org.springframework.data.mongodb.core.core.MongoOperations#updateMulti
* (java .lang.String, com.mongodb.DBObject, com.mongodb.DBObject) * (java .lang.String, com.mongodb.DBObject, com.mongodb.DBObject)
*/ */
public WriteResult updateMulti(final Query query, final Update update, public WriteResult updateMulti(final Query query, final Update update,
@@ -1048,7 +1050,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#remove(java * org.springframework.data.mongodb.core.core.MongoOperations#remove(java
* .lang .String, com.mongodb.DBObject) * .lang .String, com.mongodb.DBObject)
*/ */
public void remove(final Query query, String collectionName) { public void remove(final Query query, String collectionName) {
@@ -1059,7 +1061,7 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
* (non-Javadoc) * (non-Javadoc)
* *
* @see * @see
* org.springframework.data.mongodb.MongoOperations#getCollection * org.springframework.data.mongodb.core.core.MongoOperations#getCollection
* (java.lang.Class) * (java.lang.Class)
*/ */
public <T> List<T> findAll(Class<T> entityClass) { public <T> List<T> findAll(Class<T> entityClass) {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
@@ -25,8 +25,8 @@ import org.bson.types.BasicBSONList;
import org.bson.types.ObjectId; import org.bson.types.ObjectId;
import org.springframework.core.convert.ConversionException; import org.springframework.core.convert.ConversionException;
import org.springframework.data.mapping.PersistentEntity; import org.springframework.data.mapping.PersistentEntity;
import org.springframework.data.mongodb.convert.MongoConverter; import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.data.mongodb.mapping.MongoPersistentEntity; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@@ -1,10 +1,11 @@
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.DisposableBean;
import org.springframework.dao.DataAccessException; import org.springframework.dao.DataAccessException;
import org.springframework.data.authentication.UserCredentials; import org.springframework.data.authentication.UserCredentials;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import com.mongodb.DB; import com.mongodb.DB;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core;
public enum WriteResultChecking { public enum WriteResultChecking {
NONE, LOG, EXCEPTION NONE, LOG, EXCEPTION

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.convert; package org.springframework.data.mongodb.core.convert;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;
@@ -28,12 +28,12 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.support.ConversionServiceFactory; import org.springframework.core.convert.support.ConversionServiceFactory;
import org.springframework.core.convert.support.GenericConversionService; import org.springframework.core.convert.support.GenericConversionService;
import org.springframework.data.mongodb.convert.MongoConverters.BigDecimalToStringConverter; import org.springframework.data.mongodb.core.convert.MongoConverters.BigDecimalToStringConverter;
import org.springframework.data.mongodb.convert.MongoConverters.BigIntegerToObjectIdConverter; import org.springframework.data.mongodb.core.convert.MongoConverters.BigIntegerToObjectIdConverter;
import org.springframework.data.mongodb.convert.MongoConverters.ObjectIdToBigIntegerConverter; import org.springframework.data.mongodb.core.convert.MongoConverters.ObjectIdToBigIntegerConverter;
import org.springframework.data.mongodb.convert.MongoConverters.ObjectIdToStringConverter; import org.springframework.data.mongodb.core.convert.MongoConverters.ObjectIdToStringConverter;
import org.springframework.data.mongodb.convert.MongoConverters.StringToBigDecimalConverter; import org.springframework.data.mongodb.core.convert.MongoConverters.StringToBigDecimalConverter;
import org.springframework.data.mongodb.convert.MongoConverters.StringToObjectIdConverter; import org.springframework.data.mongodb.core.convert.MongoConverters.StringToObjectIdConverter;
import com.mongodb.BasicDBList; import com.mongodb.BasicDBList;
import com.mongodb.BasicDBObject; import com.mongodb.BasicDBObject;
@@ -96,7 +96,7 @@ public abstract class AbstractMongoConverter implements MongoConverter, Initiali
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see org.springframework.data.mongodb.convert.MongoConverter#getConversionService() * @see org.springframework.data.mongodb.core.core.convert.MongoConverter#getConversionService()
*/ */
public ConversionService getConversionService() { public ConversionService getConversionService() {
return conversionService; return conversionService;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.convert; package org.springframework.data.mongodb.core.convert;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@@ -31,8 +31,8 @@ import org.springframework.core.convert.converter.GenericConverter;
import org.springframework.core.convert.converter.GenericConverter.ConvertiblePair; import org.springframework.core.convert.converter.GenericConverter.ConvertiblePair;
import org.springframework.core.convert.support.GenericConversionService; import org.springframework.core.convert.support.GenericConversionService;
import org.springframework.data.mapping.model.SimpleTypeHolder; import org.springframework.data.mapping.model.SimpleTypeHolder;
import org.springframework.data.mongodb.convert.MongoConverters.BigDecimalToStringConverter; import org.springframework.data.mongodb.core.convert.MongoConverters.BigDecimalToStringConverter;
import org.springframework.data.mongodb.convert.MongoConverters.StringToBigDecimalConverter; import org.springframework.data.mongodb.core.convert.MongoConverters.StringToBigDecimalConverter;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import com.mongodb.DBObject; import com.mongodb.DBObject;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.convert; package org.springframework.data.mongodb.core.convert;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
@@ -52,8 +52,8 @@ import org.springframework.data.mapping.model.MappingException;
import org.springframework.data.mapping.model.ParameterValueProvider; import org.springframework.data.mapping.model.ParameterValueProvider;
import org.springframework.data.mapping.model.SpELAwareParameterValueProvider; import org.springframework.data.mapping.model.SpELAwareParameterValueProvider;
import org.springframework.data.mongodb.MongoDbFactory; import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.mapping.MongoPersistentEntity; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.mapping.MongoPersistentProperty; import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
import org.springframework.data.util.ClassTypeInformation; import org.springframework.data.util.ClassTypeInformation;
import org.springframework.data.util.TypeInformation; import org.springframework.data.util.TypeInformation;
import org.springframework.expression.Expression; import org.springframework.expression.Expression;
@@ -103,7 +103,7 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see org.springframework.data.mongodb.convert.MongoConverter#getMappingContext() * @see org.springframework.data.mongodb.core.core.convert.MongoConverter#getMappingContext()
*/ */
public MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> getMappingContext() { public MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> getMappingContext() {
return mappingContext; return mappingContext;
@@ -130,7 +130,7 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see org.springframework.data.mongodb.convert.MongoConverter#convertObjectId(org.bson.types.ObjectId, java.lang.Class) * @see org.springframework.data.mongodb.core.core.convert.MongoConverter#convertObjectId(org.bson.types.ObjectId, java.lang.Class)
*/ */
public <T> T convertObjectId(ObjectId id, Class<T> targetType) { public <T> T convertObjectId(ObjectId id, Class<T> targetType) {
return conversionService.convert(id, targetType); return conversionService.convert(id, targetType);
@@ -138,7 +138,7 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see org.springframework.data.mongodb.convert.MongoConverter#convertObjectId(java.lang.Object) * @see org.springframework.data.mongodb.core.core.convert.MongoConverter#convertObjectId(java.lang.Object)
*/ */
public ObjectId convertObjectId(Object id) { public ObjectId convertObjectId(Object id) {
return conversionService.convert(id, ObjectId.class); return conversionService.convert(id, ObjectId.class);
@@ -146,7 +146,7 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see org.springframework.data.mongodb.MongoReader#read(java.lang.Class, com.mongodb.DBObject) * @see org.springframework.data.mongodb.core.core.MongoReader#read(java.lang.Class, com.mongodb.DBObject)
*/ */
public <S extends Object> S read(Class<S> clazz, final DBObject dbo) { public <S extends Object> S read(Class<S> clazz, final DBObject dbo) {
return read(ClassTypeInformation.from(clazz), dbo); return read(ClassTypeInformation.from(clazz), dbo);
@@ -293,7 +293,7 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App
* Root entry method into write conversion. Adds a type discriminator to the {@link DBObject}. Shouldn't be called for * Root entry method into write conversion. Adds a type discriminator to the {@link DBObject}. Shouldn't be called for
* nested conversions. * nested conversions.
* *
* @see org.springframework.data.mongodb.MongoWriter#write(java.lang.Object, com.mongodb.DBObject) * @see org.springframework.data.mongodb.core.core.convert.MongoWriter#write(java.lang.Object, com.mongodb.DBObject)
*/ */
public void write(final Object obj, final DBObject dbo) { public void write(final Object obj, final DBObject dbo) {
@@ -613,7 +613,7 @@ public class MappingMongoConverter extends AbstractMongoConverter implements App
dbObject.put(key, valueToSet); dbObject.put(key, valueToSet);
} }
protected DBRef createDBRef(Object target, org.springframework.data.mongodb.mapping.DBRef dbref) { protected DBRef createDBRef(Object target, org.springframework.data.mongodb.core.mapping.DBRef dbref) {
MongoPersistentEntity<?> targetEntity = mappingContext.getPersistentEntity(target.getClass()); MongoPersistentEntity<?> targetEntity = mappingContext.getPersistentEntity(target.getClass());
if (null == targetEntity || null == targetEntity.getIdProperty()) { if (null == targetEntity || null == targetEntity.getIdProperty()) {
return null; return null;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.convert; package org.springframework.data.mongodb.core.convert;
import static org.springframework.beans.PropertyAccessorFactory.forBeanPropertyAccess; import static org.springframework.beans.PropertyAccessorFactory.forBeanPropertyAccess;
import static org.springframework.beans.PropertyAccessorFactory.forDirectFieldAccess; import static org.springframework.beans.PropertyAccessorFactory.forDirectFieldAccess;
@@ -22,8 +22,7 @@ import org.springframework.beans.BeanWrapper;
import org.springframework.beans.ConfigurablePropertyAccessor; import org.springframework.beans.ConfigurablePropertyAccessor;
import org.springframework.beans.NotWritablePropertyException; import org.springframework.beans.NotWritablePropertyException;
import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.ConversionService;
import org.springframework.data.mongodb.MongoPropertyDescriptors; import org.springframework.data.mongodb.core.convert.MongoPropertyDescriptors.MongoPropertyDescriptor;
import org.springframework.data.mongodb.MongoPropertyDescriptors.MongoPropertyDescriptor;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@@ -13,16 +13,14 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.convert; package org.springframework.data.mongodb.core.convert;
import com.mongodb.BasicDBList; import com.mongodb.BasicDBList;
import org.bson.types.ObjectId; import org.bson.types.ObjectId;
import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.ConversionService;
import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.mongodb.MongoReader; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.MongoWriter; import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
import org.springframework.data.mongodb.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.mapping.MongoPersistentProperty;
public interface MongoConverter extends MongoWriter<Object>, MongoReader<Object> { public interface MongoConverter extends MongoWriter<Object>, MongoReader<Object> {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.convert; package org.springframework.data.mongodb.core.convert;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.BigInteger; import java.math.BigInteger;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core.convert;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
import java.lang.reflect.Method; import java.lang.reflect.Method;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core.convert;
import com.mongodb.DBObject; import com.mongodb.DBObject;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb; package org.springframework.data.mongodb.core.convert;
import com.mongodb.DBObject; import com.mongodb.DBObject;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.convert; package org.springframework.data.mongodb.core.convert;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.lang.reflect.GenericArrayType; import java.lang.reflect.GenericArrayType;
@@ -50,10 +50,10 @@ import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.converter.Converter; import org.springframework.core.convert.converter.Converter;
import org.springframework.core.convert.support.ConversionServiceFactory; import org.springframework.core.convert.support.ConversionServiceFactory;
import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.mongodb.MongoPropertyDescriptors.MongoPropertyDescriptor; import org.springframework.data.mongodb.core.convert.MongoPropertyDescriptors.MongoPropertyDescriptor;
import org.springframework.data.mongodb.mapping.MongoPersistentEntity; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.mapping.MongoPersistentProperty; import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
import org.springframework.data.mongodb.mapping.SimpleMongoMappingContext; import org.springframework.data.mongodb.core.mapping.SimpleMongoMappingContext;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.comparator.CompoundComparator; import org.springframework.util.comparator.CompoundComparator;
@@ -64,7 +64,7 @@ import org.springframework.util.comparator.CompoundComparator;
* @author Thomas Risberg * @author Thomas Risberg
* @author Oliver Gierke * @author Oliver Gierke
* *
* @deprecated since Spring 1.0 M3 in favor of {@link org.springframework.data.mongodb.convert.MappingMongoConverter} * @deprecated since Spring 1.0 M3 in favor of {@link org.springframework.data.mongodb.core.core.convert.MappingMongoConverter}
* The MappingMongoConverter provides all the functionality of the SimpleMongoConverter and will replace it as the default * The MappingMongoConverter provides all the functionality of the SimpleMongoConverter and will replace it as the default
* converter used. The SimpleMongoCOnverter will be removed at some point before the GA release. * converter used. The SimpleMongoCOnverter will be removed at some point before the GA release.
*/ */
@@ -137,7 +137,7 @@ public class SimpleMongoConverter extends AbstractMongoConverter implements Init
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.convert.MongoConverter#getMappingContext() * @see org.springframework.data.mongodb.core.core.convert.MongoConverter#getMappingContext()
*/ */
public MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> getMappingContext() { public MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> getMappingContext() {
return mappingContext; return mappingContext;
@@ -146,7 +146,7 @@ public class SimpleMongoConverter extends AbstractMongoConverter implements Init
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see org.springframework.data.mongodb.MongoWriter#write(java.lang.Object, com.mongodb.DBObject) * @see org.springframework.data.mongodb.core.core.MongoWriter#write(java.lang.Object, com.mongodb.DBObject)
*/ */
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
public void write(Object obj, DBObject dbo) { public void write(Object obj, DBObject dbo) {
@@ -318,7 +318,7 @@ public class SimpleMongoConverter extends AbstractMongoConverter implements Init
/* /*
* (non-Javadoc) * (non-Javadoc)
* *
* @see org.springframework.data.mongodb.MongoReader#read(java.lang.Class, com.mongodb.DBObject) * @see org.springframework.data.mongodb.core.core.MongoReader#read(java.lang.Class, com.mongodb.DBObject)
*/ */
public <S> S read(Class<S> clazz, DBObject source) { public <S> S read(Class<S> clazz, DBObject source) {
@@ -501,14 +501,14 @@ public class SimpleMongoConverter extends AbstractMongoConverter implements Init
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.convert.MongoConverter#convertObjectId(org.bson.types.ObjectId, java.lang.Class) * @see org.springframework.data.mongodb.core.core.convert.MongoConverter#convertObjectId(org.bson.types.ObjectId, java.lang.Class)
*/ */
public <T> T convertObjectId(ObjectId id, Class<T> targetType) { public <T> T convertObjectId(ObjectId id, Class<T> targetType) {
return conversionService.convert(id, targetType); return conversionService.convert(id, targetType);
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.convert.MongoConverter#convertObjectId(java.lang.Object) * @see org.springframework.data.mongodb.core.core.convert.MongoConverter#convertObjectId(java.lang.Object)
*/ */
public ObjectId convertObjectId(Object id) { public ObjectId convertObjectId(Object id) {
return conversionService.convert(id, ObjectId.class); return conversionService.convert(id, ObjectId.class);

View File

@@ -13,9 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.geo; package org.springframework.data.mongodb.core.geo;
import org.springframework.data.mongodb.mapping.Field; import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.geo; package org.springframework.data.mongodb.core.geo;
import org.springframework.data.annotation.PersistenceConstructor; import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.util.Assert; import org.springframework.util.Assert;

View File

@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.geo; package org.springframework.data.mongodb.core.geo;
import org.springframework.data.annotation.PersistenceConstructor; import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.data.mongodb.mapping.Field; import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.index; package org.springframework.data.mongodb.core.index;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.index; package org.springframework.data.mongodb.core.index;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.index; package org.springframework.data.mongodb.core.index;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@@ -13,9 +13,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.index;
import org.springframework.data.mongodb.index.IndexDefinition;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import com.mongodb.BasicDBObject; import com.mongodb.BasicDBObject;

View File

@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.index;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import org.springframework.data.mongodb.index.IndexDefinition; import org.springframework.data.mongodb.core.query.Order;
import com.mongodb.BasicDBObject; import com.mongodb.BasicDBObject;
import com.mongodb.DBObject; import com.mongodb.DBObject;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.index; package org.springframework.data.mongodb.core.index;
import com.mongodb.DBObject; import com.mongodb.DBObject;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.index; package org.springframework.data.mongodb.core.index;
/** /**
* @author Jon Brisbin <jbrisbin@vmware.com> * @author Jon Brisbin <jbrisbin@vmware.com>

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.index; package org.springframework.data.mongodb.core.index;
/** /**
* @author Jon Brisbin <jbrisbin@vmware.com> * @author Jon Brisbin <jbrisbin@vmware.com>

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.index; package org.springframework.data.mongodb.core.index;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@@ -14,14 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping.event; package org.springframework.data.mongodb.core.index;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisher;
import org.springframework.data.mapping.event.MappingContextEvent; import org.springframework.data.mapping.event.MappingContextEvent;
import org.springframework.data.mongodb.mapping.MongoPersistentEntity; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.mapping.MongoPersistentEntityIndexCreator; import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
import org.springframework.data.mongodb.mapping.MongoPersistentProperty;
/** /**
* @author Jon Brisbin <jbrisbin@vmware.com> * @author Jon Brisbin <jbrisbin@vmware.com>

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping; package org.springframework.data.mongodb.core.index;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.Collections; import java.util.Collections;
@@ -30,12 +30,10 @@ import org.springframework.context.ApplicationListener;
import org.springframework.data.mapping.PropertyHandler; import org.springframework.data.mapping.PropertyHandler;
import org.springframework.data.mapping.event.MappingContextEvent; import org.springframework.data.mapping.event.MappingContextEvent;
import org.springframework.data.mongodb.MongoDbFactory; import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.data.mongodb.index.CompoundIndex; import org.springframework.data.mongodb.core.mapping.BasicMongoPersistentEntity;
import org.springframework.data.mongodb.index.CompoundIndexes; import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
import org.springframework.data.mongodb.index.GeoSpatialIndexed; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.index.IndexDirection; import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
import org.springframework.data.mongodb.index.Indexed;
import org.springframework.data.mongodb.query.GeospatialIndex;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping; package org.springframework.data.mongodb.core.mapping;
import java.util.Comparator; import java.util.Comparator;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping; package org.springframework.data.mongodb.core.mapping;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
import java.lang.reflect.Field; import java.lang.reflect.Field;
@@ -106,17 +106,17 @@ public class BasicMongoPersistentProperty extends AnnotationBasedPersistentPrope
return ID_FIELD_NAME; return ID_FIELD_NAME;
} }
org.springframework.data.mongodb.mapping.Field annotation = getField().getAnnotation( org.springframework.data.mongodb.core.mapping.Field annotation = getField().getAnnotation(
org.springframework.data.mongodb.mapping.Field.class); org.springframework.data.mongodb.core.mapping.Field.class);
return annotation != null && StringUtils.hasText(annotation.value()) ? annotation.value() : field.getName(); return annotation != null && StringUtils.hasText(annotation.value()) ? annotation.value() : field.getName();
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.mapping.MongoPersistentProperty#getFieldOrder() * @see org.springframework.data.mongodb.core.core.mapping.MongoPersistentProperty#getFieldOrder()
*/ */
public int getFieldOrder() { public int getFieldOrder() {
org.springframework.data.mongodb.mapping.Field annotation = getField().getAnnotation( org.springframework.data.mongodb.core.mapping.Field annotation = getField().getAnnotation(
org.springframework.data.mongodb.mapping.Field.class); org.springframework.data.mongodb.core.mapping.Field.class);
return annotation != null ? annotation.order() : Integer.MAX_VALUE; return annotation != null ? annotation.order() : Integer.MAX_VALUE;
} }
@@ -129,14 +129,14 @@ public class BasicMongoPersistentProperty extends AnnotationBasedPersistentPrope
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.mapping.MongoPersistentProperty#isDbReference() * @see org.springframework.data.mongodb.core.core.mapping.MongoPersistentProperty#isDbReference()
*/ */
public boolean isDbReference() { public boolean isDbReference() {
return getField().isAnnotationPresent(DBRef.class); return getField().isAnnotationPresent(DBRef.class);
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.mapping.MongoPersistentProperty#getDBRef() * @see org.springframework.data.mongodb.core.core.mapping.MongoPersistentProperty#getDBRef()
*/ */
public DBRef getDBRef() { public DBRef getDBRef() {
return getField().getAnnotation(DBRef.class); return getField().getAnnotation(DBRef.class);

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping; package org.springframework.data.mongodb.core.mapping;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping; package org.springframework.data.mongodb.core.mapping;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited; import java.lang.annotation.Inherited;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.mongodb.mapping; package org.springframework.data.mongodb.core.mapping;
import java.lang.annotation.Documented; import java.lang.annotation.Documented;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping; package org.springframework.data.mongodb.core.mapping;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
import java.lang.reflect.Field; import java.lang.reflect.Field;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.mongodb.mapping; package org.springframework.data.mongodb.core.mapping;
import org.springframework.data.mapping.PersistentEntity; import org.springframework.data.mapping.PersistentEntity;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping; package org.springframework.data.mongodb.core.mapping;
import org.springframework.data.mapping.PersistentProperty; import org.springframework.data.mapping.PersistentProperty;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping; package org.springframework.data.mongodb.core.mapping;
import java.beans.PropertyDescriptor; import java.beans.PropertyDescriptor;
import java.lang.reflect.Field; import java.lang.reflect.Field;
@@ -76,7 +76,7 @@ public class SimpleMongoMappingContext extends
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.mapping.MongoPersistentProperty#getKey() * @see org.springframework.data.mongodb.core.core.mapping.MongoPersistentProperty#getKey()
*/ */
public String getFieldName() { public String getFieldName() {
return isIdProperty() ? "_id" : getName(); return isIdProperty() ? "_id" : getName();
@@ -84,7 +84,7 @@ public class SimpleMongoMappingContext extends
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see org.springframework.data.mongodb.mapping.MongoPersistentProperty#getFieldOrder() * @see org.springframework.data.mongodb.core.core.mapping.MongoPersistentProperty#getFieldOrder()
*/ */
public int getFieldOrder() { public int getFieldOrder() {
return Integer.MAX_VALUE; return Integer.MAX_VALUE;
@@ -99,14 +99,14 @@ public class SimpleMongoMappingContext extends
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.mapping.MongoPersistentProperty#isDbReference() * @see org.springframework.data.mongodb.core.core.mapping.MongoPersistentProperty#isDbReference()
*/ */
public boolean isDbReference() { public boolean isDbReference() {
return false; return false;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.mapping.MongoPersistentProperty#getDBRef() * @see org.springframework.data.mongodb.core.core.mapping.MongoPersistentProperty#getDBRef()
*/ */
public DBRef getDBRef() { public DBRef getDBRef() {
return null; return null;
@@ -124,7 +124,7 @@ public class SimpleMongoMappingContext extends
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.springframework.data.mongodb.mapping.MongoPersistentEntity#getCollection() * @see org.springframework.data.mongodb.core.core.mapping.MongoPersistentEntity#getCollection()
*/ */
public String getCollection() { public String getCollection() {
return MongoCollectionUtils.getPreferredCollectionName(getType()); return MongoCollectionUtils.getPreferredCollectionName(getType());

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping.event; package org.springframework.data.mongodb.core.mapping.event;
import com.mongodb.DBObject; import com.mongodb.DBObject;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping.event; package org.springframework.data.mongodb.core.mapping.event;
import com.mongodb.DBObject; import com.mongodb.DBObject;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping.event; package org.springframework.data.mongodb.core.mapping.event;
/** /**
* @author Jon Brisbin <jbrisbin@vmware.com> * @author Jon Brisbin <jbrisbin@vmware.com>

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping.event; package org.springframework.data.mongodb.core.mapping.event;
import com.mongodb.DBObject; import com.mongodb.DBObject;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping.event; package org.springframework.data.mongodb.core.mapping.event;
/** /**
* @author Jon Brisbin <jbrisbin@vmware.com> * @author Jon Brisbin <jbrisbin@vmware.com>

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping.event; package org.springframework.data.mongodb.core.mapping.event;
import com.mongodb.DBObject; import com.mongodb.DBObject;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping.event; package org.springframework.data.mongodb.core.mapping.event;
import com.mongodb.DBObject; import com.mongodb.DBObject;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.mapping.event; package org.springframework.data.mongodb.core.mapping.event;
import com.mongodb.DBObject; import com.mongodb.DBObject;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;

View File

@@ -0,0 +1,5 @@
/**
* MongoDB core support.
*/
package org.springframework.data.mongodb.core;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
import com.mongodb.DBObject; import com.mongodb.DBObject;
import com.mongodb.util.JSON; import com.mongodb.util.JSON;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
import java.util.Collections; import java.util.Collections;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
@@ -25,9 +25,9 @@ import com.mongodb.BasicDBObject;
import com.mongodb.DBObject; import com.mongodb.DBObject;
import org.springframework.data.mongodb.InvalidMongoDbApiUsageException; import org.springframework.data.mongodb.InvalidMongoDbApiUsageException;
import org.springframework.data.mongodb.geo.Box; import org.springframework.data.mongodb.core.geo.Box;
import org.springframework.data.mongodb.geo.Circle; import org.springframework.data.mongodb.core.geo.Circle;
import org.springframework.data.mongodb.geo.Point; import org.springframework.data.mongodb.core.geo.Point;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
import com.mongodb.DBObject; import com.mongodb.DBObject;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
public class NorCriteria extends OrCriteria { public class NorCriteria extends OrCriteria {

View File

@@ -1,4 +1,4 @@
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
public class NorQuery extends Query { public class NorQuery extends Query {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
import com.mongodb.BasicDBObject; import com.mongodb.BasicDBObject;
import com.mongodb.DBObject; import com.mongodb.DBObject;

View File

@@ -1,4 +1,4 @@
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
public class OrQuery extends Query { public class OrQuery extends Query {

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
/** /**
* An enum that specifies the ordering for sort or index specifications * An enum that specifies the ordering for sort or index specifications

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;

View File

@@ -1,5 +1,5 @@
/** /**
* MongoDB specific query and update support. * MongoDB specific query and update support.
*/ */
package org.springframework.data.mongodb.query; package org.springframework.data.mongodb.core.query;

View File

@@ -21,7 +21,7 @@ import com.mongodb.Mongo;
import com.mongodb.MongoException; import com.mongodb.MongoException;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.data.mongodb.MongoDbUtils; import org.springframework.data.mongodb.core.MongoDbUtils;
/** /**
* Base class to encapsulate common configuration settings when connecting to a database * Base class to encapsulate common configuration settings when connecting to a database

View File

@@ -1,5 +0,0 @@
/**
* MongoDB core support.
*/
package org.springframework.data.mongodb;

View File

@@ -24,9 +24,9 @@ import com.mongodb.DBCursor;
import com.mongodb.DBObject; import com.mongodb.DBObject;
import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.CollectionCallback; import org.springframework.data.mongodb.core.CollectionCallback;
import org.springframework.data.mongodb.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.repository.query.ParameterAccessor; import org.springframework.data.repository.query.ParameterAccessor;
import org.springframework.data.repository.query.ParametersParameterAccessor; import org.springframework.data.repository.query.ParametersParameterAccessor;
import org.springframework.data.repository.query.RepositoryQuery; import org.springframework.data.repository.query.RepositoryQuery;
@@ -185,7 +185,7 @@ public abstract class AbstractMongoQuery implements RepositoryQuery {
/* /*
* (non-Javadoc) * (non-Javadoc)
* @see org.springframework.data.mongodb.repository.AbstractMongoQuery.Execution#execute(org.springframework.data.mongodb.query.Query) * @see org.springframework.data.mongodb.repository.AbstractMongoQuery.Execution#execute(org.springframework.data.mongodb.core.core.query.Query)
*/ */
@Override @Override
Object execute(Query query) { Object execute(Query query) {

View File

@@ -24,8 +24,8 @@ import com.mongodb.BasicDBObject;
import com.mongodb.DBObject; import com.mongodb.DBObject;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.MongoWriter; import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
import org.springframework.data.mongodb.convert.MappingMongoConverter; import org.springframework.data.mongodb.core.convert.MongoWriter;
import org.springframework.data.repository.query.ParameterAccessor; import org.springframework.data.repository.query.ParameterAccessor;
/** /**

View File

@@ -17,9 +17,9 @@ package org.springframework.data.mongodb.repository;
import java.io.Serializable; import java.io.Serializable;
import org.springframework.data.mapping.model.BeanWrapper; import org.springframework.data.mapping.model.BeanWrapper;
import org.springframework.data.mongodb.mapping.BasicMongoPersistentEntity; import org.springframework.data.mongodb.core.mapping.BasicMongoPersistentEntity;
import org.springframework.data.mongodb.mapping.MongoPersistentEntity; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.mapping.MongoPersistentProperty; import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
import org.springframework.data.repository.core.support.AbstractEntityInformation; import org.springframework.data.repository.core.support.AbstractEntityInformation;
/** /**

View File

@@ -27,7 +27,7 @@ import javax.lang.model.SourceVersion;
import javax.lang.model.element.TypeElement; import javax.lang.model.element.TypeElement;
import javax.tools.Diagnostic; import javax.tools.Diagnostic;
import org.springframework.data.mongodb.mapping.Document; import org.springframework.data.mongodb.core.mapping.Document;
import com.mysema.query.annotations.QueryEmbeddable; import com.mysema.query.annotations.QueryEmbeddable;
import com.mysema.query.annotations.QueryEmbedded; import com.mysema.query.annotations.QueryEmbedded;
@@ -42,7 +42,7 @@ import com.mysema.query.apt.Processor;
* *
* @author Oliver Gierke * @author Oliver Gierke
*/ */
@SupportedAnnotationTypes({ "com.mysema.query.annotations.*", "org.springframework.data.mongodb.mapping.*" }) @SupportedAnnotationTypes({ "com.mysema.query.annotations.*", "org.springframework.data.mongodb.core.core.mapping.*" })
@SupportedSourceVersion(SourceVersion.RELEASE_6) @SupportedSourceVersion(SourceVersion.RELEASE_6)
public class MongoAnnotationProcessor extends AbstractProcessor { public class MongoAnnotationProcessor extends AbstractProcessor {

View File

@@ -15,7 +15,7 @@
*/ */
package org.springframework.data.mongodb.repository; package org.springframework.data.mongodb.repository;
import static org.springframework.data.mongodb.query.Criteria.*; import static org.springframework.data.mongodb.core.query.Criteria.*;
import java.util.Collection; import java.util.Collection;
import java.util.Iterator; import java.util.Iterator;
@@ -24,12 +24,12 @@ import java.util.regex.Pattern;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.geo.Box; import org.springframework.data.mongodb.core.geo.Box;
import org.springframework.data.mongodb.geo.Circle; import org.springframework.data.mongodb.core.geo.Circle;
import org.springframework.data.mongodb.geo.Point; import org.springframework.data.mongodb.core.geo.Point;
import org.springframework.data.mongodb.query.Criteria; import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.query.CriteriaDefinition; import org.springframework.data.mongodb.core.query.CriteriaDefinition;
import org.springframework.data.mongodb.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.repository.ConvertingParameterAccessor.PotentiallyConvertingIterator; import org.springframework.data.mongodb.repository.ConvertingParameterAccessor.PotentiallyConvertingIterator;
import org.springframework.data.repository.query.ParameterAccessor; import org.springframework.data.repository.query.ParameterAccessor;
import org.springframework.data.repository.query.ParametersParameterAccessor; import org.springframework.data.repository.query.ParametersParameterAccessor;

View File

@@ -27,13 +27,13 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.mapping.context.MappingContext; import org.springframework.data.mapping.context.MappingContext;
import org.springframework.data.mongodb.MongoOperations; import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.MongoPropertyDescriptors.MongoPropertyDescriptor; import org.springframework.data.mongodb.core.convert.MongoPropertyDescriptors.MongoPropertyDescriptor;
import org.springframework.data.mongodb.mapping.MongoPersistentEntity; import org.springframework.data.mongodb.core.index.Index;
import org.springframework.data.mongodb.mapping.MongoPersistentProperty; import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
import org.springframework.data.mongodb.query.Index; import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
import org.springframework.data.mongodb.query.Order; import org.springframework.data.mongodb.core.query.Order;
import org.springframework.data.querydsl.QueryDslPredicateExecutor; import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.data.repository.Repository; import org.springframework.data.repository.Repository;
import org.springframework.data.repository.core.NamedQueries; import org.springframework.data.repository.core.NamedQueries;

View File

@@ -15,8 +15,8 @@
*/ */
package org.springframework.data.mongodb.repository; package org.springframework.data.mongodb.repository;
import org.springframework.data.mongodb.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.repository.query.QueryMethod; import org.springframework.data.repository.query.QueryMethod;
import org.springframework.data.repository.query.RepositoryQuery; import org.springframework.data.repository.query.RepositoryQuery;
import org.springframework.data.repository.query.parser.PartTree; import org.springframework.data.repository.query.parser.PartTree;

View File

@@ -24,9 +24,9 @@ import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Order; import org.springframework.data.domain.Sort.Order;
import org.springframework.data.mongodb.MongoOperations; import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.convert.MongoConverter; import org.springframework.data.mongodb.core.convert.MongoConverter;
import org.springframework.data.querydsl.EntityPathResolver; import org.springframework.data.querydsl.EntityPathResolver;
import org.springframework.data.querydsl.QueryDslPredicateExecutor; import org.springframework.data.querydsl.QueryDslPredicateExecutor;
import org.springframework.data.querydsl.SimpleEntityPathResolver; import org.springframework.data.querydsl.SimpleEntityPathResolver;

View File

@@ -19,7 +19,7 @@ import com.mongodb.DBCursor;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Order; import org.springframework.data.domain.Sort.Order;
import org.springframework.data.mongodb.query.Query; import org.springframework.data.mongodb.core.query.Query;
/** /**
* Collection of utility methods to apply sorting and pagination to a {@link DBCursor}. * Collection of utility methods to apply sorting and pagination to a {@link DBCursor}.
@@ -65,12 +65,12 @@ abstract class QueryUtils {
return query; return query;
} }
org.springframework.data.mongodb.query.Sort bSort = query.sort(); org.springframework.data.mongodb.core.query.Sort bSort = query.sort();
for (Order order : sort) { for (Order order : sort) {
bSort.on(order.getProperty(), bSort.on(order.getProperty(),
order.isAscending() ? org.springframework.data.mongodb.query.Order.ASCENDING order.isAscending() ? org.springframework.data.mongodb.core.query.Order.ASCENDING
: org.springframework.data.mongodb.query.Order.DESCENDING); : org.springframework.data.mongodb.core.query.Order.DESCENDING);
} }
return query; return query;

View File

@@ -15,7 +15,7 @@
*/ */
package org.springframework.data.mongodb.repository; package org.springframework.data.mongodb.repository;
import static org.springframework.data.mongodb.query.Criteria.*; import static org.springframework.data.mongodb.core.query.Criteria.*;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
@@ -26,10 +26,10 @@ import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.data.mongodb.MongoOperations; import org.springframework.data.mongodb.core.MongoOperations;
import org.springframework.data.mongodb.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.query.Criteria; import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.query.Query; import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.util.Assert; import org.springframework.util.Assert;

View File

@@ -21,9 +21,9 @@ import java.util.regex.Pattern;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.bson.types.ObjectId; import org.bson.types.ObjectId;
import org.springframework.data.mongodb.MongoTemplate; import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.query.BasicQuery; import org.springframework.data.mongodb.core.query.BasicQuery;
import org.springframework.data.mongodb.query.Query; import org.springframework.data.mongodb.core.query.Query;
/** /**
* Query to use a plain JSON String to create the {@link Query} to actually execute. * Query to use a plain JSON String to create the {@link Query} to actually execute.
@@ -59,7 +59,7 @@ public class StringBasedMongoQuery extends AbstractMongoQuery {
* *
* @see * @see
* org.springframework.data.mongodb.repository.AbstractMongoQuery#createQuery(org.springframework.data. * org.springframework.data.mongodb.repository.AbstractMongoQuery#createQuery(org.springframework.data.
* repository.query.SimpleParameterAccessor, org.springframework.data.mongodb.support.convert.MongoConverter) * repository.query.SimpleParameterAccessor, org.springframework.data.mongodb.core.core.support.convert.MongoConverter)
*/ */
@Override @Override
protected Query createQuery(ConvertingParameterAccessor accessor) { protected Query createQuery(ConvertingParameterAccessor accessor) {

View File

@@ -21,7 +21,7 @@
<xsd:element name="mongo" type="mongoType"> <xsd:element name="mongo" type="mongoType">
<xsd:annotation> <xsd:annotation>
<xsd:documentation source="org.springframework.data.mongodb.MongoFactoryBean"><![CDATA[ <xsd:documentation source="org.springframework.data.mongodb.core.core.MongoFactoryBean"><![CDATA[
Defines a Mongo instance used for accessing MongoDB'. Defines a Mongo instance used for accessing MongoDB'.
]]></xsd:documentation> ]]></xsd:documentation>
<xsd:appinfo> <xsd:appinfo>
@@ -194,7 +194,7 @@ The base package in which to scan for entities annotated with @Document
</xsd:attribute> </xsd:attribute>
<xsd:attribute name="mongo-template-ref" type="mongoTemplateRef" use="optional"> <xsd:attribute name="mongo-template-ref" type="mongoTemplateRef" use="optional">
<xsd:annotation> <xsd:annotation>
<xsd:documentation source="org.springframework.data.mongodb.MongoTemplate"> <xsd:documentation source="org.springframework.data.mongodb.core.core.MongoTemplate">
The reference to a MongoTemplate. Will default to 'mongoTemplate'. The reference to a MongoTemplate. Will default to 'mongoTemplate'.
</xsd:documentation> </xsd:documentation>
</xsd:annotation> </xsd:annotation>
@@ -233,7 +233,7 @@ The name of the Mongo object that determines what server to monitor. (by default
<xsd:annotation> <xsd:annotation>
<xsd:appinfo> <xsd:appinfo>
<tool:annotation kind="ref"> <tool:annotation kind="ref">
<tool:assignable-to type="org.springframework.data.mongodb.MongoTemplate"/> <tool:assignable-to type="org.springframework.data.mongodb.core.core.MongoTemplate"/>
</tool:annotation> </tool:annotation>
</xsd:appinfo> </xsd:appinfo>
</xsd:annotation> </xsd:annotation>
@@ -244,7 +244,7 @@ The name of the Mongo object that determines what server to monitor. (by default
<xsd:annotation> <xsd:annotation>
<xsd:appinfo> <xsd:appinfo>
<tool:annotation kind="ref"> <tool:annotation kind="ref">
<tool:assignable-to type="org.springframework.data.mongodb.MongoFactoryBean"/> <tool:assignable-to type="org.springframework.data.mongodb.core.core.MongoFactoryBean"/>
</tool:annotation> </tool:annotation>
</xsd:appinfo> </xsd:appinfo>
</xsd:annotation> </xsd:annotation>

Some files were not shown because too many files have changed in this diff Show More