Examples of AnnotationRepositoryMetadata


Examples of org.springframework.data.repository.core.support.AnnotationRepositoryMetadata

public class AnnotationRepositoryMetadataUnitTests {

  @Test
  public void handlesRepositoryProxyAnnotationCorrectly() {

    RepositoryMetadata metadata = new AnnotationRepositoryMetadata(AnnotatedRepository.class);
    assertEquals(User.class, metadata.getDomainType());
    assertEquals(Integer.class, metadata.getIdType());
  }
View Full Code Here

Examples of org.springframework.data.repository.core.support.AnnotationRepositoryMetadata

  }

  @Test(expected = IllegalArgumentException.class)
  public void preventsUnannotatedInterface() {

    new AnnotationRepositoryMetadata(UnannotatedRepository.class);
  }
View Full Code Here

Examples of org.springframework.data.repository.core.support.AnnotationRepositoryMetadata

        || AnnotationUtils.findAnnotation(type, RepositoryDefinition.class) != null;
  }

  private static RepositoryMetadata getMetadataFor(Class<?> type) {
    return Repository.class.isAssignableFrom(type) ? new DefaultRepositoryMetadata(type)
        : new AnnotationRepositoryMetadata(type);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.