Package org.springframework.data.repository.invoker

Examples of org.springframework.data.repository.invoker.RepositoryInvoker


  public void registerCustomEditors(PropertyEditorRegistry registry) {

    for (Class<?> domainClass : repositories) {

      RepositoryInformation repositoryInformation = repositories.getRepositoryInformationFor(domainClass);
      RepositoryInvoker invoker = repositoryInvokerFactory.getInvokerFor(domainClass);

      DomainClassPropertyEditor<Object, Serializable> editor = new DomainClassPropertyEditor<Object, Serializable>(
          invoker, repositories.getEntityInformationFor(repositoryInformation.getDomainType()), registry);

      registry.registerCustomEditor(repositoryInformation.getDomainType(), editor);
View Full Code Here


    }

    Class<?> domainType = targetType.getType();

    RepositoryInformation info = repositories.getRepositoryInformationFor(domainType);
    RepositoryInvoker invoker = repositoryInvokerFactory.getInvokerFor(domainType);

    return invoker.invokeFindOne(conversionService.convert(source, info.getIdType()));
  }
View Full Code Here

   * @param object must not be {@literal null}.
   * @param repositories must not be {@literal null}.
   */
  private void persist(Object object, RepositoryInvokerFactory invokerFactory) {

    RepositoryInvoker invoker = invokerFactory.getInvokerFor(object.getClass());
    LOGGER.debug(String.format("Persisting %s using repository %s", object, invoker));
    invoker.invokeSave(object);
  }
View Full Code Here

TOP

Related Classes of org.springframework.data.repository.invoker.RepositoryInvoker

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.