chapter_011_Spring_Boot/src/main/java/my/jpa/controllers/ItemServlet.java
private Function<ItemRequestWrapper, HttpEntity> findAll() {
        return requestWrapper -> {
            logger.info("Find items");
            List<Item> all = null;
            if (requestWrapper.getParameters() != null) {
                all = logicItem.findAllByFilter(requestWrapper);
            } else {
                all = logicItem.findAll();
            }
            return new ResponseEntity<>(all, HttpStatus.OK);
        };
    }
/**
     * Find all and find all by parameters.
     *
     * @return HttpEntity.
     */
Find all and find all by parameters.
Find all and find all by parameters .
private Function<ItemRequestWrapper, HttpEntity> findAll() {
        return requestWrapper -> {
            logger.info("Find items");
            List<Item> all = null;
            if (requestWrapper.getParameters() != null) {
                all = logicItem.findAllByFilter(requestWrapper);
            } else {
                all = logicItem.findAll();
            }
            return new ResponseEntity<>(all, HttpStatus.OK);
        };
    }
private Function < ItemRequestWrapper , HttpEntity > findAll ( ) { return requestWrapper -> { logger . info ( "Find items" ) ; List < Item > all = null ; if ( requestWrapper . getParameters ( ) != null ) { all = logicItem . findAllByFilter ( requestWrapper ) ; } else { all = logicItem . findAll ( ) ; } return new ResponseEntity < > ( all , HttpStatus . OK ) ; } ; }
Find all and find all by parameters.
Find all and find all by parameters .