Examples of RepositoryMetadata


Examples of org.springframework.data.repository.core.RepositoryMetadata

   * @see DATACMNS-98
   */
  @Test
  public void handlesGenericTypeInReturnedCollectionCorrectly() throws SecurityException, NoSuchMethodException {

    RepositoryMetadata metadata = new DummyRepositoryMetadata(ExtendingRepository.class);
    Method method = ExtendingRepository.class.getMethod("anotherMethod");
    assertThat(metadata.getReturnedDomainClass(method), is(typeCompatibleWith(Map.class)));
  }
View Full Code Here

Examples of org.springframework.data.repository.core.RepositoryMetadata

   * @see DATACMNS-471
   */
  @Test
  public void detectsArrayReturnTypeCorrectly() throws Exception {

    RepositoryMetadata metadata = new DefaultRepositoryMetadata(PagedRepository.class);
    Method method = PagedRepository.class.getMethod("returnsArray");

    assertThat(metadata.getReturnedDomainClass(method), is(typeCompatibleWith(User.class)));
  }
View Full Code Here

Examples of org.springframework.data.repository.core.RepositoryMetadata

        RepositoryWithDeleteMethodForEntityOverloaded.class.getMethod("delete", Domain.class));
  }

  private static CrudMethods getMethodsFor(Class<?> repositoryInterface) {

    RepositoryMetadata metadata = new DefaultRepositoryMetadata(repositoryInterface);
    RepositoryInformation information = new DefaultRepositoryInformation(metadata, PagingAndSortingRepository.class,
        null);

    return new DefaultCrudMethods(information);
  }
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.