Examples of invokeFindOne()


Examples of org.springframework.data.repository.invoker.RepositoryInvoker.invokeFindOne()

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

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

    return invoker.invokeFindOne(conversionService.convert(source, info.getIdType()));
  }

  /*
   * (non-Javadoc)
   * @see org.springframework.core.convert.converter.ConditionalGenericConverter#matches(org.springframework.core.convert.TypeDescriptor, org.springframework.core.convert.TypeDescriptor)
View Full Code Here

Examples of org.springframework.data.rest.core.invoke.RepositoryInvoker.invokeFindOne()

    if (!invoker.exposesFindOne()) {
      throw new HttpRequestMethodNotSupportedException(method.name());
    }

    Object domainObj = invoker.invokeFindOne(id);

    if (null == domainObj) {
      throw new ResourceNotFoundException();
    }
View Full Code Here

Examples of org.springframework.data.rest.core.invoke.RepositoryInvoker.invokeFindOne()

    incomingWrapper.setProperty(payload.getPersistentEntity().getIdProperty(), id);

    RepositoryInvoker invoker = resourceInformation.getInvoker();
    Object objectToSave = incomingWrapper.getBean();

    return invoker.invokeFindOne(id) == null ? createAndReturn(objectToSave, invoker, assembler) : saveAndReturn(
        objectToSave, invoker, PUT, assembler);
  }

  /**
   * <code>PUT /{repository}/{id}</code> - Updates an existing entity or creates one at exactly that place.
View Full Code Here

Examples of org.springframework.data.rest.core.invoke.RepositoryInvoker.invokeFindOne()

      throws ResourceNotFoundException, HttpRequestMethodNotSupportedException {

    resourceInformation.verifySupportedMethod(HttpMethod.DELETE, ResourceType.ITEM);

    RepositoryInvoker invoker = resourceInformation.getInvoker();
    Object domainObj = invoker.invokeFindOne(id);

    if (domainObj == null) {
      throw new ResourceNotFoundException();
    }
View Full Code Here

Examples of org.springframework.data.rest.core.invoke.RepositoryInvoker.invokeFindOne()

    if (!repoMethodInvoker.exposesFindOne()) {
      throw new ResourceNotFoundException();
    }

    return repoMethodInvoker.invokeFindOne(id);
  }
}
View Full Code Here

Examples of org.springframework.data.rest.core.invoke.RepositoryInvoker.invokeFindOne()

      if (id == null) {
        new ResourceNotFoundException();
      }

      RepositoryInvoker invoker = information.getInvoker();
      Object existingObject = invoker.invokeFindOne(id);

      if (existingObject == null) {
        throw new ResourceNotFoundException();
      }
View Full Code Here

Examples of org.springframework.data.rest.core.invoke.RepositoryInvoker.invokeFindOne()

    @RequestMapping(value = BASE_MAPPING + "/file", method = GET)
    public void filePropertyOfEntity(RootResourceInformation repoRequest, ServletResponse response, @BackendId Serializable id, @PathVariable String property) throws Exception {
        PersistentEntity<?, ?> persistentEntity = repoRequest.getPersistentEntity();
        RepositoryInvoker invoker = repoRequest.getInvoker();

        Object domainObj = invoker.invokeFindOne(id);

        if (null == domainObj) {
            throw new ResourceNotFoundException();
        }
View Full Code Here

Examples of org.springframework.data.rest.core.invoke.RepositoryInvoker.invokeFindOne()

    @RequestMapping(value = BASE_MAPPING + "/binary", method = GET)
    public ResponseEntity<?> filePropertyValueOfEntity(RootResourceInformation repoRequest, @BackendId Serializable id, @PathVariable String property) throws Exception {
        PersistentEntity<?, ?> persistentEntity = repoRequest.getPersistentEntity();
        RepositoryInvoker invoker = repoRequest.getInvoker();

        Object domainObj = invoker.invokeFindOne(id);

        if (null == domainObj) {
            throw new ResourceNotFoundException();
        }
View Full Code Here

Examples of org.springframework.data.rest.core.invoke.RepositoryInvoker.invokeFindOne()

    @RequestMapping(value = BASE_MAPPING + "/file", method = DELETE)
    public ResponseEntity<?> deleteFileOfPropertyOfEntity(RootResourceInformation repoRequest, @BackendId Serializable id, @PathVariable String property) throws Exception {
        PersistentEntity<?, ?> persistentEntity = repoRequest.getPersistentEntity();
        RepositoryInvoker invoker = repoRequest.getInvoker();

        Object domainObj = invoker.invokeFindOne(id);

        if (null == domainObj) {
            throw new ResourceNotFoundException();
        }
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.