Skip to content

hugperez/java-exercices

Repository files navigation

javaExercises

This application was generated using JHipster 7.9.3, you can find documentation and help at https://www.jhipster.tech/documentation-archive/v7.9.3.

Product domain format

This project was generated using JHipster with Java framework Spring, the architecture of class Product is:

    private String name; // not null
    private Integer note;
    private String content;
    private Integer quantity;
    private Float weight;
    private Float totalWeight;
    private Boolean isVerified;

with getter and setter (example: product.getName() , product.setName("superName"))

File architecture

  • src/main/java/com/javaexercises/app/web/rest: Resource
  • src/main/java/com/javaexercises/app/service: Service
  • src/main/java/com/javaexercises/app/repository: Repository

The exercises can be done on files:

  • src/main/java/com/javaexercises/app/service/extended/ProductServiceExtended.java
  • src/main/java/com/javaexercises/app/web/rest/extended/ProductResourceExtended.java
  • src/main/java/com/javaexercises/app/repository/AuthorityRepository.java

Exercises

1 - Fibonacci suite

Implement the fibonacci sequence algorithm In method fibonacciSequence(Integer n) on file src/main/java/com/javaexercises/app/service/extended/ProductServiceExtended.java

2 - findAll with list

Work on the Java.util.List to perform several filters

In method findAll(boolean isVerified, Integer minNote) on file src/main/java/com/javaexercises/app/service/extended/ProductServiceExtended.java

3 - findAll with JPQL (Specific to Spring, else you can provide the SQL Request in order to perform these filters)

Same filters using JPQL Or provide the SQL request for isVerified = false and minNote = 5

4 - Checks and actions

Perform the different actions for save and delete methods In method deleteProduct(Long id) on file src/main/java/com/javaexercises/app/service/extended/ProductServiceExtended.java In method save(Product product) on file src/main/java/com/javaexercises/app/service/extended/ProductServiceExtended.java

5 - Implement getById

Implement the resource and the service methods for getById, with endpoint GET /api/v1/extended/products/{id}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages