@SuppressWarnings("unchecked") @Test void testUpdatePartialEntity() { String entityTypeId = "MyEntityTypeId"; String entityId = "MyId"; Map<String, Object> requestValueMap = mock(Map.class); entityController.updatePartialEntity(entityTypeId, entityId, requestValueMap); verify(dataServiceV3).updatePartial(entityTypeId, entityId, requestValueMap); }
@Transactional @PatchMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) public void updatePartialEntity( @PathVariable("entityTypeId") String entityTypeId, @PathVariable("entityId") String entityId, @RequestBody Map<String, Object> entityMap) { dataServiceV3.updatePartial(entityTypeId, entityId, entityMap); }
EntityController extends ApiController { @Transactional @PatchMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) public void updatePartialEntity( @PathVariable("entityTypeId") String entityTypeId, @PathVariable("entityId") String entityId, @RequestBody Map<String, Object> entityMap) { dataServiceV3.updatePartial(entityTypeId, entityId, entityMap); } }
EntityController extends ApiController { @Transactional @PatchMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) public void updatePartialEntity( @PathVariable("entityTypeId") String entityTypeId, @PathVariable("entityId") String entityId, @RequestBody Map<String, Object> entityMap) { dataServiceV3.updatePartial(entityTypeId, entityId, entityMap); } EntityController(DataServiceV3 dataServiceV3, EntityMapper entityMapper); }
EntityController extends ApiController { @Transactional @PatchMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) public void updatePartialEntity( @PathVariable("entityTypeId") String entityTypeId, @PathVariable("entityId") String entityId, @RequestBody Map<String, Object> entityMap) { dataServiceV3.updatePartial(entityTypeId, entityId, entityMap); } EntityController(DataServiceV3 dataServiceV3, EntityMapper entityMapper); @Transactional @PostMapping("/{entityTypeId}") ResponseEntity createEntity(
      @PathVariable("entityTypeId") String entityTypeId,
      @RequestBody Map<String, Object> entityMap); @Transactional(readOnly = true) @GetMapping("/{entityTypeId}/{entityId}") EntityResponse getEntity(@Valid ReadEntityRequest entityRequest); @Transactional(readOnly = true) @GetMapping("/{entityTypeId}/{entityId}/{fieldId}") EntitiesResponse getReferencedEntities(@Valid ReadSubresourceRequest entitiesRequest); @Transactional @PutMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) void updateEntity(
      @PathVariable("entityTypeId") String entityTypeId,
      @PathVariable("entityId") String entityId,
      @RequestBody Map<String, Object> entityMap); @Transactional @PatchMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) void updatePartialEntity(
      @PathVariable("entityTypeId") String entityTypeId,
      @PathVariable("entityId") String entityId,
      @RequestBody Map<String, Object> entityMap); @Transactional @DeleteMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) void deleteEntity(@Valid DeleteEntityRequest deleteRequest); @DeleteMapping("/{entityTypeId}") @ResponseStatus(HttpStatus.NO_CONTENT) void deleteEntities(@Valid DeleteEntitiesRequest deleteRequest); @Transactional(readOnly = true) @GetMapping("/{entityTypeId}") EntitiesResponse getEntities(@Valid ReadEntitiesRequest entitiesRequest); }
EntityController extends ApiController { @Transactional @PatchMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) public void updatePartialEntity( @PathVariable("entityTypeId") String entityTypeId, @PathVariable("entityId") String entityId, @RequestBody Map<String, Object> entityMap) { dataServiceV3.updatePartial(entityTypeId, entityId, entityMap); } EntityController(DataServiceV3 dataServiceV3, EntityMapper entityMapper); @Transactional @PostMapping("/{entityTypeId}") ResponseEntity createEntity(
      @PathVariable("entityTypeId") String entityTypeId,
      @RequestBody Map<String, Object> entityMap); @Transactional(readOnly = true) @GetMapping("/{entityTypeId}/{entityId}") EntityResponse getEntity(@Valid ReadEntityRequest entityRequest); @Transactional(readOnly = true) @GetMapping("/{entityTypeId}/{entityId}/{fieldId}") EntitiesResponse getReferencedEntities(@Valid ReadSubresourceRequest entitiesRequest); @Transactional @PutMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) void updateEntity(
      @PathVariable("entityTypeId") String entityTypeId,
      @PathVariable("entityId") String entityId,
      @RequestBody Map<String, Object> entityMap); @Transactional @PatchMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) void updatePartialEntity(
      @PathVariable("entityTypeId") String entityTypeId,
      @PathVariable("entityId") String entityId,
      @RequestBody Map<String, Object> entityMap); @Transactional @DeleteMapping("/{entityTypeId}/{entityId}") @ResponseStatus(HttpStatus.NO_CONTENT) void deleteEntity(@Valid DeleteEntityRequest deleteRequest); @DeleteMapping("/{entityTypeId}") @ResponseStatus(HttpStatus.NO_CONTENT) void deleteEntities(@Valid DeleteEntitiesRequest deleteRequest); @Transactional(readOnly = true) @GetMapping("/{entityTypeId}") EntitiesResponse getEntities(@Valid ReadEntitiesRequest entitiesRequest); static final String API_ENTITY_PATH; }