Package org.springframework.data.mongodb.core.mapping

Examples of org.springframework.data.mongodb.core.mapping.Document


   * @throws IllegalArgumentException in case of missing {@link Document} annotation marking root entities.
   */
  public List<IndexDefinitionHolder> resolveIndexForEntity(final MongoPersistentEntity<?> root) {

    Assert.notNull(root, "Index cannot be resolved for given 'null' entity.");
    Document document = root.findAnnotation(Document.class);
    Assert.notNull(document, "Given entity is not collection root.");

    final List<IndexDefinitionHolder> indexInformation = new ArrayList<MongoPersistentEntityIndexResolver.IndexDefinitionHolder>();
    indexInformation.addAll(potentiallyCreateCompoundIndexDefinitions("", root.getCollection(), root));
    indexInformation.addAll(potentiallyCreateTextIndexDefinition(root));
View Full Code Here


     * @see DATAMONGO-962
     */
    @Test
    public void shouldCatchCyclicReferenceExceptionOnRoot() {

      Document documentDummy = new Document() {

        @Override
        public Class<? extends Annotation> annotationType() {
          return Document.class;
        }
View Full Code Here

TOP

Related Classes of org.springframework.data.mongodb.core.mapping.Document

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.